
    	                         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
S.r\	R                  " \	R                  R                   5       " S S\	R"                  5      5       r\\l        g)z(Describe command for the Org Policy CLI.    )absolute_import)division)unicode_literals)service)base)	arguments)utilsz.      Describes an organization policy.
      z      To describe the policy associated with the constraint 'gcp.resourceLocations'
      and the Project 'foo-project', run:

      $ {command} gcp.resourceLocations --project=foo-project
      )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Describe)   z Describe an organization policy.c                 ~    [         R                  " U 5        [         R                  " U 5        U R                  SSSS9  g )Nz--effective
store_truezDescribe the effective policy.)actionhelp)r   AddConstraintArgToParserAddResourceFlagsToParseradd_argument)parsers    $lib/surface/org_policies/describe.pyArgsDescribe.Args-   s:    &&v.&&v.
-  /    c                     [         R                  " U R                  5       5      n[        R                  " U5      nUR
                  (       a  UR                  U5      $ UR                  U5      $ )av  Gets the (effective) organization policy.

If --effective is not specified, then the policy is retrieved using
GetPolicy.

If --effective is specified, then the effective policy is retrieved using
GetEffectivePolicy.

Args:
  args: argparse.Namespace, An object that contains the values for the
    arguments specified in the Args method.

Returns:
   The retrieved policy.
)org_policy_serviceOrgPolicyApiReleaseTrackr	   GetPolicyNameFromArgs	effectiveGetEffectivePolicy	GetPolicy)selfargsorg_policy_apipolicy_names       r   RunDescribe.Run6   sV      (44T5F5F5HIN--d3K~~..{;;##K00r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r'   __static_attributes__r)   r   r   r   r   )   s    (/ /1r   r   N)r.   
__future__r   r   r    googlecloudsdk.api_lib.orgpolicyr   r   googlecloudsdk.callioper   'googlecloudsdk.command_lib.org_policiesr   r	   DETAILED_HELPReleaseTracksr   GADescribeCommandr   detailed_helpr)   r   r   <module>r:      ss    / &  ' J ( = 9	
	
 D%%(()"1t## "1 *"1J ' r   