
    ;                     8   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  \R                  " S
SSS9\	R                  " \	R                   R"                  \	R                   R$                  5       " S S\	R&                  5      5       5       rg)z$Command to update fleet information.    )absolute_import)division)unicode_literals)client)util)base)deprecation_utils)	resourcesz447.0.0Tz+gcloud fleet scopes rbacrolebindings update)remove_versionremovealt_commandc                   .    \ rS rSrSr\S 5       rS rSrg)Update   a=  Update a fleet namespace RBAC RoleBinding.

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

## EXAMPLES

To update the RBAC RoleBinding `RBRB` in namespace `NAMESPACE` in the active
project to the `viewer` role:

  $ {command} RBRB --namespace=NAMESPACE --role=viewer

To update the RBAC RoleBinding `RBRB` in namespace `NAMESPACE` in the active
project to the user `someone@google.com`:

  $ {command} RBRB --namespace=NAMESPACE --user=someone@google.com

c                    [         R                  " U[        R                  U R	                  5          SS9  UR                  5       nUR                  S[        SS9  UR                  S[        SS9  UR                  S/ S	QS
S9  g )NzqName of the RBAC RoleBinding to be updated. Must comply with RFC 1123 (up to 63 characters, alphanumeric and '-'))api_versionrbacrb_helpz--userz*User for the RBACRoleBinding to update to.)typehelpz--groupz+Group for the RBACRoleBinding to update to.z--role)admineditviewz*Role for the RBACRoleBinding to update to.)choicesr   )r
   AddRBACResourceArgr   VERSION_MAPReleaseTrackadd_mutually_exclusive_groupadd_argumentstr)clsparsergroups      Alib/surface/container/fleet/namespaces/rbacrolebindings/update.pyArgsUpdate.Args7   s      $$S%5%5%78$	 //1E	9  
 
:  
 )9      c           	      V   [         R                  " U R                  5       S9n/ nS H,  nUR                  U5      (       d  M  UR	                  U5        M.     UR                  [        R                  " U5      UR                  UR                  UR                  SR                  U5      S9$ )N)release_track)roleuserr"   ,)r*   r"   r)   mask)r   FleetClientr   IsKnownAndSpecifiedappendUpdateRBACRoleBindingr
   RBACResourceNamer*   r"   r)   join)selfargsfleetclientr,   flags        r#   Run
Update.RunS   s    $$43D3D3FGKD)		!	!$	'	'D * ,,""4(YYjjYYXXd^ -  r&    N)	__name__
__module____qualname____firstlineno____doc__classmethodr$   r7   __static_attributes__r9   r&   r#   r   r      s     (  6r&   r   N)r>   
__future__r   r   r   &googlecloudsdk.api_lib.container.fleetr   r   googlecloudsdk.callioper   googlecloudsdk.command_libr	   *googlecloudsdk.command_lib.container.fleetr
   DeprecateCommandAtVersionReleaseTracksr   ALPHABETAUpdateCommandr   r9   r&   r#   <module>rK      s    + &  ' 9 7 ( 8 @ ,,=
 D%%++T->->-C-CD<T < E<r&   