
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SS	K	Jr  SS
K	Jr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  \
R,                   " S S\
R.                  5      5       rg)z$Command to update fleet information.    )absolute_import)division)unicode_literals)client)types)util)base)parser_arguments)parser_extensions)flags)update_mask)labels_util)logc                   ~    \ rS rSrSr\S\R                  4S j5       rS\	R                  S\R                  4S jrSrg	)
Update#   a  Update a fleet.

This command can fail for the following reasons:
* The project specified does not exist.
* The project specified already has a fleet.
* The active account does not have permission to access the given project.

## EXAMPLES

To update the display name of the fleet in project `example-foo-bar-1`
to `updated-name`, run:

  $ {command} --display-name=updated-name --project=example-foo-bar-1
parserc                     [         R                  " U 5      nUR                  5         UR                  5         UR	                  5         [
        R                  " U 5        g )N)fleet_flags
FleetFlagsAddAsyncAddDisplayNameAddDefaultClusterConfigr   AddUpdateLabelsFlags)r   r   s     %lib/surface/container/fleet/update.pyArgsUpdate.Args4   sB    ""6*E	NN		!!#$$V,    argsreturnc                    [         R                  " XR                  5       5      nSUR                  5       ;  a@  UR	                  5       (       a  [
        R                  Ul        O[
        R                  Ul        [        R                  " U R                  5       5      nSn/ nSn[        R                  R                  U5      nUR                  5       (       d  [        R                   " U5      (       ag  UR#                  UR%                  5       5      nUR'                  UR(                  R*                  R,                  UR.                  5      R1                  5       nU(       a  UR3                  S5        [        R4                  " U5      (       a%  UR3                  [        R4                  " U5      5        UR+                  U5      nXHl        UR(                  R7                  U[8        R:                  " UR%                  5       5      SR=                  U5      S9n	UR?                  U	5      n
[8        R@                  " UR%                  5       5      nUR	                  5       (       a&  [B        RD                  " USUR	                  5       S9  U
$ [        RF                  " U R                  5       5      n[8        RH                  " U
5      nURK                  U5      n[B        RD                  " USUR	                  5       S9  U$ )	a  Runs the fleet update command.

User specified --format takes the highest priority. If not specified, it
returns the default format of long-running operation or fleet, depending on
whether --async is specified.

$ {command} --async
  The output is in default operation format.

$ {command} --async --format
  The output is in user specified format.

$ {command}
  The output is in default fleet format.

$ {command} --format
  The output is in user specified format.

Args:
  args: Arguments received from command line.

Returns:
  A completed update operation; if `--async` is specified, return a
  long-running operation to be polled manually.
z--formatNlabels,)fleetname
updateMaskzAnthos fleet)is_async)kindr'   )&r   FleetFlagParserReleaseTrackGetSpecifiedArgNamesAsync
fleet_utilOPERATION_FORMATformatFLEET_FORMATr   FleetClientr   DiffFromUpdateArgsMayHaveUpdatesr   HasBinauthzConfigGetFleetProjectApplymessagesFleetLabelsValuer"   	GetOrNoneappendGetFleetUpdateMask)GkehubProjectsLocationsFleetsPatchRequestr   FleetResourceNamejoinUpdateFleetFleetRefr   UpdatedResourceOperationClientOperationRefWait)selfr   flag_parserfleetclient
new_labelsmaskcurrent_fleetlabels_diffr$   req	operation	fleet_refoperation_clientoperation_refcompleted_operations                  r   Run
Update.Run<   sY   4 --d4E4E4GHK2244					 11 --$$T%6%6%89K JD M""11$7K!!##{'D'DT'J'J!**;+>+>+@Am$$



$
$
0
0


 		  
kk(%%d++
kk+0067m,EL



H
H##K$7$7$9:88D> I C '',Ik1134I	
^k.?.?.A --d.?.?.AB%%i0M*//>1B1B1D r    N)__name__
__module____qualname____firstlineno____doc__staticmethodr
   ArgumentInterceptorr   r   	Namespacer   	OperationrU   __static_attributes__rW   r   r   r   r   #   sJ     -#77 - -N'11 Neoo Nr   r   N)r\   
__future__r   r   r   &googlecloudsdk.api_lib.container.fleetr   r   r   googlecloudsdk.callioper	   r
   r   *googlecloudsdk.command_lib.container.fleetr   r   r   r-   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   DefaultUniverseOnlyUpdateCommandr   rW   r   r   <module>rj      s^     + &  ' 9 8 7 ( 4 5 K B I < # fT f fr   