
    	                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  \R                   " S	 S
\R                  5      5       rg)z'logging sinks delete' command.    )absolute_import)division)unicode_literals)util)base)log)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Delete   a>  Delete a sink.

Delete a sink and halt the export of log entries associated with that sink.
Deleting a sink does not affect log entries already exported through
the deleted sink, and will not affect other sinks that are exporting
the same log(s).

## EXAMPLES

To delete a sync 'my-bq-sync':

  $ {command} my-bq-sink
c                     U R                  SSS9  [        R                  " U S5        U R                  R	                  S5        g)z Register flags for this command.	sink_namezThe name of the sink to delete.)helpzsink to deleteN)add_argumentr   AddParentArgsdisplay_infoAddCacheUpdater)parsers    #lib/surface/logging/sinks/delete.pyArgsDelete.Args,   s=     *KLv/0
''-    c                    [         R                  " UR                  U5      n[         R                  " [         R                  " U5      SUR
                  5      n[        R                  " SUR
                  -  SS9  [         R                  " 5       R                  R                  [         R                  " 5       R                  US95        [        R                  " U5        g)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.
sinkszReally delete sink [%s]?T)cancel_on_no)sinkNameN)r   GetSinkReferencer   CreateResourceNameGetParentFromArgssinksIdr	   PromptContinue	GetClientprojects_sinksr   GetMessages!LoggingProjectsSinksDeleteRequestr   DeletedResource)selfargssink_refsink_resources       r   Run
Delete.Run3   s     $$T^^T:H++D,B,B4,H,3X5E5EGM 88;K;KK+/1 	NN##**<<" 	= 	$% !r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r+   __static_attributes__r-   r   r   r   r      s      . ."r   r   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   googlecloudsdk.corer   googlecloudsdk.core.consoler	   UniverseCompatibleDeleteCommandr   r-   r   r   <module>r<      sF     & &  ' / ( # 2 '"T '" '"r   