
    
                     F   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	lmZ dd
lZe
j                   e
j                   e
j"                  j$                  e
j"                  j&                         G d de
j(                                      Zddie_        y
)z6Command for describing organization security policies.    )absolute_import)division)unicode_literals)base_classes)client)base)flags)org_security_policies_utilsNc                   *    e Zd ZdZdZed        Zd Zy)DescribezDescribe a Compute Engine organization security policy.

  *{command}* is used to describe organization security policies. An
  organization security policy is a set of rules that controls access to various
  resources.
  Nc                     t        j                  dd      | _        | j                  j                  |d       |j	                  dd       y )	NTdescribe)required	operationget)operation_typez--organizationzxOrganization in which the organization security policy is to be described. Must be set if SECURITY_POLICY is short name.)help)r	   OrgSecurityPolicyArgumentORG_SECURITY_POLICY_ARGAddArgumentadd_argument)clsparsers     5lib/surface/compute/org_security_policies/describe.pyArgszDescribe.Args)   sP    "'"A"A#-C++F5+I
J  L    c           	         t        j                  | j                               }| j                  j	                  ||j
                  d      }t        j                  ||j                  |j
                  t        j                  | j                               j                               }t        j                  ||j                         |j                        }|j                  |d      S )NF)with_project)refcompute_client	resourcesversion)organization)sp_idonly_generate_request)r   ComputeApiHolderReleaseTrackr   ResolveAsResourcer!   r   OrgSecurityPolicysix	text_typelowerr
   GetSecurityPolicyIdNamer#   r   )selfargsholderr   org_security_policyr$   s         r   RunzDescribe.Run3   s    **4+<+<+>?F

&
&
8
8fU 9 4C 22}}""d//1288:	< (;;SXXZd6G6GIE''5 ( 2 2r   )__name__
__module____qualname____doc__r   classmethodr   r3    r   r   r   r      s(     !L L2r   r   EXAMPLESzm    To describe an organization security policy with ID ``123456789'', run:

      $ {command} 123456789
    )r7   
__future__r   r   r   googlecloudsdk.api_lib.computer   4googlecloudsdk.api_lib.compute.org_security_policiesr   googlecloudsdk.callioper   8googlecloudsdk.command_lib.compute.org_security_policiesr	   r
   r*   UniverseCompatibleReleaseTracksr'   ALPHABETADescribeCommandr   detailed_helpr9   r   r   <module>rF      s    = &  ' 7 G ( J ` 
 D%%++T->->-C-CD!2t## !2 E !2J 	 r   