
    ^                         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\	R                  5      rg)z$Command to update fleet information.    )absolute_import)division)unicode_literals)client)util)base)	resources)labels_utilc                   .    \ rS rSrSr\S 5       rS rSrg)Update   a  Update a fleet namespace.

This command can fail for the following reasons:
* The project specified does not exist.
* The fleet namespace does not exist in the project.
* The caller does not have permission to access the project or namespace.

## EXAMPLES

To update the namespace `NAMESPACE` in the active project:

  $ {command} NAMESPACE

To update the namespace `NAMESPACE` in project `PROJECT_ID`:

  $ {command} NAMESPACE --project=PROJECT_ID
c                     [         R                  " U[        R                  U R	                  5          SSS9  [
        R                  " U5        [         R                  " U5        g )Nz*Name of the fleet namespace to be updated.T)api_versionnamespace_helprequired)r	   AddScopeNamespaceResourceArgr   VERSION_MAPReleaseTrackr
   AddUpdateLabelsFlagsAddUpdateNamespaceLabelsFlags)clsparsers     7lib/surface/container/fleet/scopes/namespaces/update.pyArgsUpdate.Args/   sN    **$$S%5%5%78C	 $$V,++F3    c                 N   / nUR                   R                  R                  5       nUR                  5       n[        R
                  " U R                  5       S9nUR                  U5      n[        R                  R                  U5      nUR                  UR                  R                  R                  UR                  5      R!                  5       nU(       a  UR#                  S5        [        R                  " UR$                  UR&                  UR(                  5      n	U	R                  UR                  R                  R*                  UR,                  5      R!                  5       n
U
(       a  UR#                  S5        U(       d  g UR/                  XHU
SR1                  U5      S9$ )N)release_tracklabelsnamespace_labels,)mask)CONCEPTS	namespaceParseRelativeNamer   FleetClientr   GetScopeNamespacer
   DiffFromUpdateArgsApplymessages	NamespaceLabelsValuer   	GetOrNoneappendupdate_namespace_labelsremove_namespace_labelsclear_namespace_labelsNamespaceLabelsValuenamespaceLabelsUpdateScopeNamespacejoin)selfargsr"   namespace_argnamespace_pathfleetclientcurrent_namespacelabels_diff
new_labelsnamespace_labels_diffnew_namespace_labelss              r   Run
Update.Run:   sd   DMM++113M"//1N$$43D3D3FGK#55nE ""11$7K""&&224E4L4Lik  
kk( (,,$$$$##
 166&&;;)) ik  
kk$% ++$8sxx~ ,  r    N)	__name__
__module____qualname____firstlineno____doc__classmethodr   rB   __static_attributes__rD   r   r   r   r      s     $ 4 4!r   r   N)rI   
__future__r   r   r   &googlecloudsdk.api_lib.container.fleetr   r   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.fleetr	   $googlecloudsdk.command_lib.util.argsr
   UpdateCommandr   rD   r   r   <module>rR      s4    + &  ' 9 7 ( @ <?T ?r   