
    )                     t   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddl
mZ ddlmZ  e	j                  e	j                  j                          G d	 d
e	j"                               Z e	j                  e	j                  j&                         G d de             ZddddZee_        ee_        y)z?`gcloud access-context-manager authorized-orgs update` command.    )absolute_import)division)unicode_literals)authorized_orgs)base)policies)repeatedc                   @    e Zd ZdZdZed        Zed        Zd Zd Z	y)UpdateAuthorizedOrgsDescsBasez8Update an existing authorized organizations description.v1c                 .    t         j                  |        y Nr   ArgsVersionedparsers    <lib/surface/access_context_manager/authorized_orgs/update.pyArgsz"UpdateAuthorizedOrgsDescsBase.Args!       !//7    c                 Z    t        j                  | d       t        j                  |        y )Nz	to update)r   AddResourceArgAddAuthorizedOrgsDescUpdateArgsr   s    r   r   z+UpdateAuthorizedOrgsDescsBase.ArgsVersioned%   s     ""6;733F;r   c                 Z   t        j                  | j                        }|j                  j                  j                         }t        j                  j                  |j                  |      }t        j                  ||       | j                  ||t        j                  ||            S )N)version)clientauthorized_orgs_desc_reforgs)authorized_orgs_apiClient_API_VERSIONCONCEPTSauthorized_orgs_descParser	   CachedResultFromFuncGetr   ValidateAccessPolicyArgPatchr   	ParseOrgs)selfargsr   r   results        r   Runz!UpdateAuthorizedOrgsDescsBase.Run*   s     ''0A0ABF#}}AAGGI""++FJJ,DFF$$%=tD::!9&&tV4   r   c                 (    |j                  ||      S )N)r   )r)   )r+   r   r   r   s       r   r)   z#UpdateAuthorizedOrgsDescsBase.Patch7   s    <<0t<<<r   N)
__name__
__module____qualname____doc__r!   staticmethodr   r   r.   r)    r   r   r   r      s:    @,8 8 < <=r   r   c                   (    e Zd ZdZdZdZed        Zy)UpdateAuthorizedOrgsDescsAlphaz)Update an existing authorized orgsd desc.Fv1alphac                 .    t         j                  |        y r   r   r   s    r   r   z#UpdateAuthorizedOrgsDescsAlpha.ArgsA   r   r   N)r0   r1   r2   r3   _INCLUDE_UNRESTRICTEDr!   r4   r   r5   r   r   r7   r7   ;   s"    1,8 8r   r7   zNUpdate the organizations for an existing authorized organizations description.z=This command updates an authorized organizations description.zTo update the organizations for an authorized organizations description:

  $ {command} my-authorized-orgs --add-orgs="organizations/123,organizations/456" )briefDESCRIPTIONEXAMPLESN)r3   
__future__r   r   r   +googlecloudsdk.api_lib.accesscontextmanagerr   r   googlecloudsdk.callioper   /googlecloudsdk.command_lib.accesscontextmanagerr   $googlecloudsdk.command_lib.util.argsr	   ReleaseTracksReleaseTrackGAUpdateCommandr   ALPHAr7   detailed_helpr5   r   r   <module>rI      s    F &  ' ^ ( K D 9 D%%(()=D$6$6 = *=< D%%++,8%B 8 -8	 
I	<
 /<  +/<  ,r   