
    W
                     L   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	lmZ d
ddZ ej                  ej                   j"                  ej                   j$                  ej                   j&                         G d dej(                               Zee_        y)z'ids endpoints delete' command.    )absolute_import)division)unicode_literalsN)base)ids_api)flags)	resourcesz0
          Delete a Cloud IDS endpoint.
        a  
          To delete an endpoint called `my-ep` in project `my-project`
          and zone `us-central1-a`, run:

          $ {command} my-ep --project=my-project --zone=us-central1-a

          OR

          $ {command} projects/myproject/locations/us-central1-a/endpoints/my-ep

    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)DeletezDelete a Cloud IDS endpoint.c                     t        j                  |        t        j                  j	                  |        t        j                  j                  | d       t        j                  | d       y )NT60m)r   AddEndpointResourcer   
ASYNC_FLAGAddToParser
SetDefault
AddMaxWait)parsers    #lib/surface/ids/endpoints/delete.pyArgszDelete.Args4   sF    	f%OO'OOvt,	VU#    c                    |j                   j                  j                         }|j                  }t	        j
                  |j                        }t        j                  | j                               }|j                  |j                               }|r|j                  d      sd|_        |S |j                  |j                  |      dj                  |j                               d|      S )N)secondsformatdefaultz'waiting for endpoint [{}] to be deletedF)operation_refmessage
has_resultmax_wait)CONCEPTSendpointParseasync_datetime	timedeltar    r   ClientReleaseTrackDeleteEndpointRelativeNameIsSpecifiedr   WaitForOperationGetOperationRef)selfargsr"   is_asyncr    client	operations          r   Runz
Delete.Run;   s    }}%%++-H{{H!!$--8H^^D--/0F%%h&;&;&=>I  h'"",,Y79@@!!#% #  r   N)__name__
__module____qualname____doc__staticmethodr   r3    r   r   r   r   /   s     %$ $r   r   )r7   
__future__r   r   r   r%   googlecloudsdk.callioper   googlecloudsdk.api_lib.idsr   googlecloudsdk.command_lib.idsr   googlecloudsdk.corer	   DETAILED_HELPReleaseTracksr(   ALPHABETAGADeleteCommandr   detailed_helpr9   r   r   <module>rF      s    & &  '  ( . 0 )	
	( D%%++T->->-C-C%%((*T *B % r   