
                            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SS.r\R"                  " \R$                  R&                  5      \R(                   " S S\R*                  5      5       5       r\R"                  " \R$                  R.                  5      \R(                   " S S\R*                  5      5       5       rg)zSet the IAM policy for a space.    )absolute_import)division)unicode_literals)spaces)utils)base)flags)iam_utilz         Set the IAM policy for a Design Center space as defined in a JSON/YAML file.

        See https://cloud.google.com/iam/docs/managing-policies for details of
          the policy file format and contents.
        a           To set the space IAM policy using a json file 'my_policy.json' for
        the Space `my-space` in project `my-project` and location `us-central1`, run:

          $ {command} my-space --location=us-central1 --project=my-project /path/to/my_policy.json

        To set the space IAM policy using a yaml file 'my_policy.yaml` for
        the Space `my-space` in project `my-project` and location `us-central1`, run:

          $ {command} my-space --location=us-central1 --project=my-project /path/to/my_policy.yaml
        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                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)SetIamPolicyGA6   Set the IAM policy for a Design Center space as defined in a JSON/YAML file.

See https://cloud.google.com/iam/docs/managing-policies for details of
   the policy file format and contents.
c                 \    [         R                  " U 5        [        R                  " U 5        g Nr	   AddSetIamPolicyFlagsr
   AddArgForPolicyFileparsers    2lib/surface/design_center/spaces/set_iam_policy.pyArgsSetIamPolicyGA.ArgsA       	v&  (    c                     [         R                  " [        R                  R                  S9n[
        R                  " U5      nUR                  UR                  5       UR                  S9$ N)release_track)space_idpolicy_file)
apisSpacesClientr   ReleaseTrackGAapi_lib_utilsGetSpaceRefSetIamPolicyRelativeNamer!   selfargsclient	space_refs       r   RunSetIamPolicyGA.RunF   sZ    T->->-A-ABF))$/I'')t7G7G   r    N__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   r/   __static_attributes__r1   r   r   r   r   6   s%     !-) )r   r   c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)SetIamPolicyAlphaN   r   c                 \    [         R                  " U 5        [        R                  " U 5        g r   r   r   s    r   r   SetIamPolicyAlpha.ArgsX   r   r   c                     [         R                  " [        R                  R                  S9n[
        R                  " U5      nUR                  UR                  5       UR                  S9$ r   )
r"   r#   r   r$   ALPHAr&   r'   r(   r)   r!   r*   s       r   r/   SetIamPolicyAlpha.Run]   sZ    T->->-D-DEF))$/I'')t7G7G   r   r1   Nr2   r1   r   r   r=   r=   N   s%    
 !-) )r   r=   N)r7   
__future__r   r   r   $googlecloudsdk.api_lib.design_centerr   r"   r   r&   googlecloudsdk.callioper   (googlecloudsdk.command_lib.design_centerr	   googlecloudsdk.command_lib.iamr
   r8   ReleaseTracksr$   r%   UniverseCompatibleCommandr   rB   r=   r1   r   r   <module>rL      s    & &  ' ? G ( : 3
%4 D%%(()T\\   *, D%%++,   -r   