
    6                         d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z	 ddl
mZ d	d
dZ G d de	j                        Zee_        y)zDelete endpoint command.    )absolute_import)division)unicode_literalsN)activation_api)base)activation_flagsz
          Delete a firewall endpoint. Check the progress of endpoint deletion
          by using `gcloud network-security firewall-endpoints list`.

          For more examples, refer to the EXAMPLES section below.

        aM  
            To delete a firewall endpoint called `my-endpoint`, in zone
            `us-central1-a` and organization ID 1234, run:

            $ {command} my-endpoint --zone=us-central1-a --organization=1234

            OR

            $ {command} organizations/1234/locations/us-central1-a/firewallEndpoints/my-endpoint

        )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Deletez Delete a Firewall Plus endpoint.c                     t        j                  | j                         |       t        j                  |d       t        j
                  j                  |       t        j
                  j                  |d       y )N60mT)r   AddEndpointResourceReleaseTrack
AddMaxWaitr   
ASYNC_FLAGAddToParser
SetDefault)clsparsers     9lib/surface/network_security/firewall_endpoints/delete.pyArgszDelete.Args3   sQ    (()9)9);VD.OO'OOvt,    c                    t        j                  | j                               }|j                  j                  j                         }|j                  }t        j                  |j                        }|j                  |j                               }|r|j                  d      sd|_        |S |j                  |j                  |      dj                  |j                               d|      S )N)seconds)nameformatdefaultz0waiting for firewall endpoint [{}] to be deletedF)operation_refmessage
has_resultmax_wait)r   Clientr   CONCEPTSfirewall_endpointParseasync_datetime	timedeltar"   DeleteEndpointRelativeNameIsSpecifiedr   WaitForOperationGetOperationRef)selfargsclientendpointis_asyncr"   	operations          r   Runz
Delete.Run:   s    ""4#4#4#67F}}..446H{{H!!$--8H%%""$ & I  h'"",,Y7BII!!#
  #  r   N)__name__
__module____qualname____doc__classmethodr   r5    r   r   r   r   0   s    (- -r   r   )r9   
__future__r   r   r   r(   :googlecloudsdk.api_lib.network_security.firewall_endpointsr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.network_securityr   DETAILED_HELPDeleteCommandr   detailed_helpr;   r   r   <module>rC      sM     &  '  U ( H
,#T #L % r   