
    
                         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 external-access-rules delete' command.    )absolute_import)division)unicode_literals)ExternalAccessRulesClient)base)flags)logzI
          Delete a VMware Engine external access firewall rule.
        a0  
          To delete an external access firewall rule called `my-external-access-rule` in project `my-project` and region `us-west2` associated with network policy `my-network-policy`, run:

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

          Or:

            $ {command} my-external-access-rule --network-policy=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 external access rule.c                     t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       y)z Register flags for this command.T)
positionalN)r   AddExternalAccessRuleToParserr   
ASYNC_FLAGAddToParser
SetDefault)parsers    Clib/surface/vmware/network_policies/external_access_rules/delete.pyArgszDelete.Args3   s:     
''4@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 external access ruleT)kindis_asyncz3waiting for external access rule [{}] to be deletedF)operation_refmessage
has_result)CONCEPTSexternal_access_ruleParser   async_r   r	   DeletedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr   clientr   	operations         r   Runz
Delete.Run:   s    ====CCE&(F{{H23I	
..3 "",,Y7ELL --/1	 #  r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r,    r   r   r   r   .   s!    4-- -r   r   N)r0   
__future__r   r   r   1googlecloudsdk.api_lib.vmware.externalaccessrulesr   googlecloudsdk.callioper   2googlecloudsdk.command_lib.vmware.network_policiesr   googlecloudsdk.corer	   r1   ReleaseTracksReleaseTrackGADeleteCommandr   r4   r   r   <module>r>      sj    5 &  ' W ( D #	
	( D%%(()T  *r   