
    	                         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 G d dej                        Zee_        y)z'logging sinks delete' command.    )absolute_import)division)unicode_literals)util)base)log)
console_ioa  /
        Deletes a sink and halts the export of traces associated with that sink.
        Deleting a sink does not affect traces already exported through
        the deleted sink, and will not affect other sinks that are exporting
        the same traces.
    z#/

        $ {command} my-sink
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)DeletezDeletes a sink.c                     | j                  dd       | j                  dd       | j                  j                  d       y)z Register flags for this command.	sink_namezThe name of the sink to delete.)helpz	--projectzSDelete a sink associated with this project. This will override the default project.N)add_argumentdisplay_infoAddCacheUpdater)parsers    !lib/surface/trace/sinks/delete.pyArgszDelete.Args-   sI     *KL
3  4 ''-    c                    t        j                  d|j                  z  dd       t        j                  |j                  |j
                        }|j                         }t        j                         j                  j                  t        j                         j                  |             t        j                  |       y)zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.
    zReally delete sink [%s]?TF)cancel_on_nodefault)nameN)r	   PromptContinuer   r   GetTraceSinkResourceprojectRelativeName	GetClientprojects_traceSinksr   GetMessages)CloudtraceProjectsTraceSinksDeleteRequestr   DeletedResource)selfargssink_refsink_resource_names       r   Runz
Delete.Run7   s     "T^^3
 ((FH!..0NN((//DD# 	E 	%& !r   N)__name__
__module____qualname____doc__staticmethodr   r)    r   r   r   r   *   s    . ."r   r   N)r-   
__future__r   r   r   googlecloudsdk.api_lib.tracer   googlecloudsdk.callioper   googlecloudsdk.corer   googlecloudsdk.core.consoler	   DETAILED_HELPDeleteCommandr   detailed_helpr/   r   r   <module>r8      sM    & &  ' - ( # 2		 !"T !"H % r   