
    	                         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
dZ ej                  ej                  j                          G d dej"                               Zy)z)'vmware network-policies delete' command.    )absolute_import)division)unicode_literals)NetworkPoliciesClient)base)flags)logz:
          Delete a VMware Engine network policy.
        a  
          To delete a network policy called `my-network-policy` in project `my-project` and region `us-west2`, run:

            $ {command} my-network-policy --location=us-west2 --project=my-project

          Or:

            $ {command} my-network-policy

          In the second example, the project and the location are taken from gcloud properties core/project and compute/region respectively.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Deletez&Delete a VMware Engine network policy.c                     t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       y)z Register flags for this command.T)
positionalN)r   AddNetworkPolicyToParserr   
ASYNC_FLAGAddToParser
SetDefault)parsers    -lib/surface/vmware/network_policies/delete.pyArgszDelete.Args3   s:     
""6d;OO'OOvt,    c                 d   |j                   j                  j                         }t               }|j                  }|j                  |      }|r$t        j                  |j                  dd       |S |j                  |j                  |      dj                  |j                               d      S )NzVMware Engine network policyT)kindis_asyncz-waiting for network policy [{}] to be deletedF)operation_refmessage
has_result)CONCEPTSnetwork_policyParser   async_r   r	   DeletedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr   clientr   	operations         r   Runz
Delete.Run:   s    ]]11779N"$F{{Hn-I	
..=N"",,Y7?FF'')+	 #  r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r,    r   r   r   r   .   s!    .-- -r   r   N)r0   
__future__r   r   r   -googlecloudsdk.api_lib.vmware.networkpoliciesr   googlecloudsdk.callioper   2googlecloudsdk.command_lib.vmware.network_policiesr   googlecloudsdk.corer	   r1   ReleaseTracksReleaseTrackGADeleteCommandr   r4   r   r   <module>r>      sj    0 &  ' O ( D #	
	( D%%(()T  *r   