
    S
                         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  SSKJr  SS	KJr   " S
 S\R"                  5      rg)z'Cloud Pub/Sub snapshots delete command.    )absolute_import)division)unicode_literals)
exceptions)	snapshots)base)util)logc                   .    \ rS rSrSr\S 5       rS rSrg)Delete   z,Deletes one or more Cloud Pub/Sub snapshots.c                 &    U R                  SSSS9  g)z!Registers flags for this command.snapshot+z%One or more snapshot names to delete.)nargshelpN)add_argument)parsers    &lib/surface/pubsub/snapshots/delete.pyArgsDelete.Args!   s      #$K  M    c           	   #     #    [         R                  " 5       n/ nUR                   H  n[        R                  " U5      n UR                  U5        [        R"                  " UR$                  R'                  UR                  5       S95      n[        R                  " UR                  5       SS9  Uv   M     U(       a  [        R(                  " US5      eg! [        R                   a  n[        R                  " U5      n[        R                  " UR                  5       S[        R                  " UR                  R                  5      S9  UR!                  U5         SnAGM>  SnAff = f7f)a  This 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.

Yields:
  A serialized object (dict) describing the results of the operation.
  This description fits the Resource described in the ResourceRegistry under
  'pubsub.projects.snapshots'.

Raises:
  util.RequestFailedError: if any of the requests to the API failed.
r   )kindfailedN)name)r   delete)r   SnapshotsClientr   r	   ParseSnapshotr   api_ex	HttpErrorr   HttpExceptionr
   DeletedResourceRelativeNameCreateFailureErrorMessagepayloadstatus_messageappendSnapshotDisplayDictmessagesSnapshotRequestsFailedError)	selfargsclientr   snapshot_namesnapshot_referrorexcresults	            r   Run
Delete.Run(   s"     &&(FF''6l
l# ''
//
"
"(A(A(C
"
DFf	,335JGl% '( $$VX66   &&u-%%'11#++2L2LM	

 	m$s1   =E, CBE,E)*A3E$E,$E))E, N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r5   __static_attributes__r7   r   r   r   r      s    4M M'7r   r   N)r<   
__future__r   r   r   apitools.base.pyr   r    googlecloudsdk.api_lib.pubsubr   googlecloudsdk.api_lib.utilgooglecloudsdk.callioper   !googlecloudsdk.command_lib.pubsubr	   googlecloudsdk.corer
   DeleteCommandr   r7   r   r   <module>rG      s7    . &  ' 1 3 2 ( 2 #17T 17r   