
    	                     n   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	Z ej                  ej                  j                          G d
 dej"                               Z ej                  ej                  j&                  ej                  j(                         G d de             Zy)zH`gcloud service-directory namespaces remove-iam-policy-binding` command.    )absolute_import)division)unicode_literals)
namespaces)base)iam_util)resource_args	namespacec                   4    e Zd ZdZddiZed        Zd Zd Zy)RemoveIamPolicyBinding,Removes IAM policy binding from a namespace.EXAMPLESz          To remove an IAM policy binding to a Service Directory namespace, run:

            $ {command} my-namespace --location=us-east1 --role=roles/owner --member=user:foo@gmail.com
          c                 Z    t        j                  | d       t        j                  |        y )Nz"to remove IAM policy binding from.)r	   AddNamespaceResourceArgr    AddArgsForRemoveIamPolicyBinding)parsers    Elib/surface/service_directory/namespaces/remove_iam_policy_binding.pyArgszRemoveIamPolicyBinding.Args*   s&    ))02 --f5    c                 2   t        j                  | j                               }|j                  j                  j                         }|j                  ||j                  |j                        }t        j                  |j                         t               |S N)r   NamespacesClientGetReleaseTrackCONCEPTSr
   Parser   memberroler   LogSetIamPolicyName_RESOURCE_TYPE)selfargsclientnamespace_refresults        r   RunzRemoveIamPolicyBinding.Run2   sp    (()=)=)?@FMM++113M**=$+++/996F]//1>BMr   c                 6    t         j                  j                  S r   )r   ReleaseTrackGAr!   s    r   r   z&RemoveIamPolicyBinding.GetReleaseTrack<   s    r   N)	__name__
__module____qualname____doc__detailed_helpstaticmethodr   r&   r    r   r   r   r      s4    4 - 6 6 r   r   c                       e Zd ZdZd Zy)RemoveIamPolicyBindingBetar   c                 6    t         j                  j                  S r   )r   r(   BETAr*   s    r   r   z*RemoveIamPolicyBindingBeta.GetReleaseTrackD   s    !!!r   N)r+   r,   r-   r.   r   r1   r   r   r3   r3   @   s
    4"r   r3   N)r.   
__future__r   r   r   (googlecloudsdk.api_lib.service_directoryr   googlecloudsdk.callioper   googlecloudsdk.command_lib.iamr   ,googlecloudsdk.command_lib.service_directoryr	   r    ReleaseTracksr(   r)   Commandr   ALPHAr5   r3   r1   r   r   <module>r>      s    O &  ' ? ( 3 F D%%(() T\\   * D D%%++T->->-C-CD"!7 " E"r   