
                             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 association command.    )absolute_import)division)unicode_literalsN)association_api)base)association_flagsa  
          Unassociate the specified network from a firewall endpoint. Check the
          progress of association deletion by using
          `gcloud network-security firewall-endpoint-associations list`.

          For more examples, refer to the EXAMPLES section below.
        a  
          To unassociate a network from a firewall, run:

            $ {command} my-assoc --zone=us-central1-a --project=my-project
            OR
            $ {command} projects/my-project/locations/us-central1-a/firewallEndpointAssociations/my-association
        )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Deletez,Delete a Firewall Plus endpoint association.c                     t        j                  | j                         |       t        j                  |d       t        j
                  j                  |       t        j
                  j                  |d       y )N60mT)r   AddAssociationResourceReleaseTrack
AddMaxWaitr   
ASYNC_FLAGAddToParser
SetDefault)clsparsers     Elib/surface/network_security/firewall_endpoint_associations/delete.pyArgszDelete.Args/   sQ    ,,S-=-=-?H  /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defaultz<waiting for firewall endpoint association [{}] to be deletedF)operation_refmessage
has_resultmax_wait)r   Clientr   CONCEPTSfirewall_endpoint_associationParseasync_datetime	timedeltar"   DeleteAssociationRelativeNameIsSpecifiedr   WaitForOperationGetOperationRef)selfargsclientassociationis_asyncr"   	operations          r   Runz
Delete.Run6   s    ##D$5$5$78F--==CCEK{{H!!$--8H((%%' ) I  h'"",,Y7JVK,,./ #  r   N)__name__
__module____qualname____doc__classmethodr   r5    r   r   r   r   ,   s    4- -r   r   )r9   
__future__r   r   r   r(   Fgooglecloudsdk.api_lib.network_security.firewall_endpoint_associationsr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.network_securityr   DETAILED_HELPDeleteCommandr   detailed_helpr;   r   r   <module>rC      sM    + &  '  b ( I$$T $N % r   