
    \                        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
ddZ ej                  ej                   j"                        ej$                  ej&                   G d dej(                                             Z ej                  ej                   j,                        ej$                   G d dej(                                      Zy)z!Fetch the IAM policy for a space.    )absolute_import)division)unicode_literals)spaces)utils)base)flagsz         Get the IAM policy for a Design Center space.

        Returns an empty policy if the space does not have
        an existing IAM policy set.
        z         To get the space IAM policy for the Space `my-space` in
        project `my-project` in location `us-central1`, run:

          $ {command} my-space --location=us-central1 --project=my-project
        z         This command uses the designcenter/v1alpha API. The full documentation for
        this API can be found at:
        http://cloud.google.com/application-design-center/docs
        )DESCRIPTIONEXAMPLESzAPI REFERENCEc                   *    e Zd ZdZeZed        Zd Zy)GetIamPolicyGAGet the IAM policy for a Design Center space.

  Returns an empty policy if the space does not have
  an existing IAM policy set.
  c                 l    t        j                  |        t        j                  j	                  |        y Nr	   AddGetIamPolicyFlagsr   URI_FLAGRemoveFromParserparsers    2lib/surface/design_center/spaces/get_iam_policy.pyArgszGetIamPolicyGA.Args;   "    	v&MM""6*    c                     t        j                  t        j                  j                        }t        j                  |      }|j                  |j                               S N)release_track)space_id)	apisSpacesClientr   ReleaseTrackGAapi_lib_utilsGetSpaceRefGetIamPolicyRelativeNameselfargsclient	space_refs       r   RunzGetIamPolicyGA.Run@   sK    T->->-A-ABF))$/I	(>(>(@AAr   N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r,    r   r   r   r   0   s&    
 !-+ +Br   r   c                   *    e Zd ZdZeZed        Zd Zy)r%   r   c                 l    t        j                  |        t        j                  j	                  |        y r   r   r   s    r   r   zGetIamPolicy.ArgsP   r   r   c                     t        j                  t        j                  j                        }t        j                  |      }|j                  |j                               S r   )	r   r    r   r!   ALPHAr#   r$   r%   r&   r'   s       r   r,   zGetIamPolicy.RunU   sK    T->->-D-DEF))$/I	(>(>(@AAr   Nr-   r5   r   r   r%   r%   F   s&    
 !-+ +Br   r%   N)r1   
__future__r   r   r   $googlecloudsdk.api_lib.design_centerr   r   r   r#   googlecloudsdk.callioper   (googlecloudsdk.command_lib.design_centerr	   r2   ReleaseTracksr!   r"   UniverseCompatibleHiddenListCommandr   r9   r%   r5   r   r   <module>rB      s    ( &  ' ? G ( :* D%%(()BT%% B   *B& D%%++,B4## B  -Br   