
                         F   d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddl	m
Z
 ddlmZ e
j                   e
j                  e
j                   j"                  e
j                   j$                  e
j                   j&                         G d	 d
e
j(                                      Zy)z6Command to get a policy on the given attachment point.    )absolute_import)division)unicode_literalsN)policies)base)policies_flagsc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)Getz?Get a policy on the given attachment point with the given name.EXAMPLESa$            The following command gets the IAM policy defined at the resource
          project ``123'' of kind ``denypolicies'' and id ``my-deny-policy'':

            $ {command} my-deny-policy --attachment-point=cloudresourcemanager.googleapis.com/projects/123 --kind=denypolicies
          c                     t        j                         j                  |        t        j                         j                  |        t        j                         j                  |        y )N)flagsGetAttachmentPointFlagAddToParserGetKindFlagGetPolicyIDFlag)parsers    lib/surface/iam/policies/get.pyArgszGet.Args,   sG    	  "..v6	##F+	''/    c           	         t        j                  |j                  j                               }t        j                  |j                  j                               }|j
                  j                  dd      }|j                  j                  |j                  dj                  ||j                  |j                                    }|S )N/z%2Fzpolicies/{}/{}/{})name)apisGetClientInstancecalliope_commandReleaseTrackGetMessagesModuleattachment_pointreplacer   r
   IamPoliciesGetRequestformatkind	policy_id)selfargsclientmessagesr   results         r   RunzGet.Run2   s    ##D$9$9$F$F$HIF%%d&;&;&H&H&JKH,,44S%@__  &&,?,F,Fdii-9& 	:;F Mr   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r)    r   r   r
   r
      s@     H 
(//  - 0 0
	r   r
   )r-   
__future__r   r   r   r.   googlecloudsdk.api_lib.iamr   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iamr   r   UniverseCompatibleReleaseTracksr   ALPHABETAGADescribeCommandr
   r2   r   r   <module>r=      s    = &  '  7 ( B D%%++T->->-C-C%%((*$

 * r   