
    
                         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dZ e	j                   e	j"                  j$                         G d de	j&                               Zee_        y)z&Delete command for the Org Policy CLI.    )absolute_import)division)unicode_literals)service)base)	arguments)utils)logz0        Deletes an organization policy.
        z        To delete the policy associated with the constraint 'gcp.resourceLocations'
        and the Project 'foo-project', run:

        $ {command} gcp.resourceLocations --project=foo-project
        )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)DeletezDelete an organization policy.c                     t        j                  |        t        j                  |        | j                  ddd       y )Nz--etagETAGzThe current top-level etag of the Policy. If an etag is provided and does not match the current etag of the Policy, deletion will fail with a concurrent error.)metavarhelp)r   AddConstraintArgToParserAddResourceFlagsToParseradd_argument)parsers    "lib/surface/org_policies/delete.pyArgszDelete.Args.   s<    &&v.&&v.
-	      c                     t        j                  | j                               }t        j                  |      }|j                  ||j                        }t        j                  |d       |S )a+  Deletes an organization policy.

    The policy is deleted using DeletePolicy.

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

    Returns:
       If the policy is deleted, then messages.GoogleProtobufEmpty.
    policy)	org_policy_serviceOrgPolicyApiReleaseTrackr	   GetPolicyNameFromArgsDeletePolicyetagr
   DeletedResource)selfargsorg_policy_apipolicy_namedelete_responses        r   Runz
Delete.Run<   sY     (44T5F5F5HIN--d3K$11+tyyIOX.r   N)__name__
__module____qualname____doc__staticmethodr   r(    r   r   r   r   *   s    & r   r   N)r,   
__future__r   r   r    googlecloudsdk.api_lib.orgpolicyr   r   googlecloudsdk.callioper   'googlecloudsdk.command_lib.org_policiesr   r	   googlecloudsdk.corer
   DETAILED_HELPReleaseTracksr   GACommandr   detailed_helpr.   r   r   <module>r9      sv    - &  ' J ( = 9 #		 D%%(()"T\\ " *"J % r   