
                              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 ej                   G d	 d
ej                               Zy)z'Command to cancel a transfer operation.    )absolute_import)division)unicode_literals)apis)base)	name_util)logc                   0    e Zd ZdZdddZed        Zd Zy)CancelzCancel a transfer operation.z)      Cancel a transfer operation.
      zM      To cancel an operation, run:

        $ {command} OPERATION-NAME
      )DESCRIPTIONEXAMPLESc                 *    | j                  dd       y )Nnamez6The name of the transfer operation you want to cancel.)help)add_argument)parsers    )lib/surface/transfer/operations/cancel.pyArgszCancel.Args,   s    
M  O    c                 L   t        j                  dd      }t        j                  dd      }t        j                  |j
                        }|j                  j                  |j                  |             t        j                  j                  dj                  |             y )Ntransferv1)r   zSent cancel request for {})r   GetClientInstanceGetMessagesModuler   add_operation_prefixr   transferOperationsr   .StoragetransferTransferOperationsCancelRequestr	   statusPrintformat)selfargsclientmessagesformatted_names        r   Runz
Cancel.Run1   s    ##J5F%%j$7H33DII>N
$$?? 	@ 	!" JJ188HIr   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r&    r   r   r   r      s2    $

- O OJr   r   N)r*   
__future__r   r   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.transferr   googlecloudsdk.corer	   UniverseCompatibleCommandr   r-   r   r   <module>r5      sG    . &  ' , ( 9 # JT\\ J Jr   