
                             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  \R                   " S
 S\R                  5      5       rg)z&Command to cancel a storage operation.    )absolute_import)division)unicode_literals)api_factory)base)operations_util)storage_url)logc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Cancel   zCancel a storage operation.z      Cancel a storage operation. Since operations are asynchronous, this
      request is best effort and may fail in cases such as when the operation
      is already complete.
      z      To cancel the operation "C894F35J" on bucket "my-bucket", run:

        $ {command} projects/_/buckets/my-bucket/operations/C894F35J
      )DESCRIPTIONEXAMPLESc                 $    U R                  SSS9  g )Noperation_namezGThe operation name including the Cloud Storage bucket and operation ID.)help)add_argument)parsers    (lib/surface/storage/operations/cancel.pyArgsCancel.Args-   s    
      c                 H   [         R                  " UR                  5      u  p#[        R                  R
                  n[        R                  " U5      R                  X#S9  [        R                  R                  SR                  [        R                  " XB5      U5      5        g )N)bucket_nameoperation_idz.Sent cancel request for bucket {} operation {})r   %get_operation_bucket_and_id_from_namer   r	   ProviderPrefixGCSr   get_apicancel_operationr
   statusPrintformatCloudUrl)selfargsbucketr   schemes        r   Run
Cancel.Run7   s    ==	
 F
 ''++F00 1  JJ8??  0,	
r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r)   __static_attributes__r+   r   r   r   r      s/    #


-  r   r   N)r0   
__future__r   r   r   googlecloudsdk.api_lib.storager   googlecloudsdk.callioper   "googlecloudsdk.command_lib.storager   r	   googlecloudsdk.corer
   UniverseCompatibleCommandr   r+   r   r   <module>r;      sG    - &  ' 6 ( > : # (T\\ ( (r   