
                             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	lmZ  G d
 de	j                         Zy)zCancel operation command.    )absolute_import)division)unicode_literals)dataproc)base)flags)log)
console_ioc                   &    e Zd ZdZed        Zd Zy)CancelzCancel an active operation.

  Cancel an active operation.

  ## EXAMPLES

  To cancel an operation, run:

    $ {command} operation_id
  c                     t        j                  | j                               }t        j                  |d|j
                         y )Ncancel)dpDataprocReleaseTrackr   AddOperationResourceArgapi_version)clsparserr   s      )lib/surface/dataproc/operations/cancel.pyArgszCancel.Args)   s1    {{3++-.H	!!&(H4H4HI    c                    t        j                  | j                               }|j                  j                  j                         }|j                  j                  |j                               }t        j                  dj                  |j                        dd       |j                  j                  j                  |       t        j                   j#                  dj                  |j                               y )N)namez&The operation '{0}' will be cancelled.TzCancellation aborted by user.)messagecancel_on_nocancel_stringzCancelled [{0}].
)r   r   r   CONCEPTS	operationParsemessages.DataprocProjectsRegionsOperationsCancelRequestRelativeNamer
   PromptContinueformatclientprojects_regions_operationsr   r	   statuswrite)selfargsr   operation_refrequests        r   Runz
Cancel.Run.   s    {{4,,./HMM++113MNN'') O +G 8??NN5	7 OO//66w? JJ)00@Ar   N)__name__
__module____qualname____doc__classmethodr   r.    r   r   r   r      s#    	 J JBr   r   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr   googlecloudsdk.corer	   googlecloudsdk.core.consoler
   Commandr   r4   r   r   <module>r<      s4       &  ' : ( 5 # 2"BT\\ "Br   