
                         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
)z4Command for deleting 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)DeletezDelete a Compute Engine organization security policy.

  *{command}* is used to delete 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       |j
                  j                  t         j                         y )NTdelete)required	operation)operation_typez--organizationzvOrganization in which the organization security policy is to be deleted. Must be set if SECURITY_POLICY is short name.)help)r	   OrgSecurityPolicyArgumentORG_SECURITY_POLICY_ARGAddArgumentadd_argumentdisplay_infoAddCacheUpdaterOrgSecurityPoliciesCompleter)clsparsers     3lib/surface/compute/org_security_policies/delete.pyArgszDelete.Args(   sl    "'"A"A#+C++F8+L
H  J ''(J(JK    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
Delete.Run3   s    **4+<+<+>?F

&
&
8
8fU 9 4C 22}}""d//1288:	<
 (;;SXXZd6G6GIE%%E%OOr   )__name__
__module____qualname____doc__r   classmethodr   r5    r   r   r   r      s)     !L LPr   r   EXAMPLESzk    To delete an organization security policy with ID ``123456789'', run:

      $ {command} 123456789
    )r9   
__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DeleteCommandr   detailed_helpr;   r   r   <module>rH      s    ; &  ' 7 G ( J ` 
 D%%++T->->-C-CDPT P E PF 	 r   