
     	                         d Z ddlmZ ddlmZ ddlmZ ddl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)z5Implementation of gcloud genomics operations cancel.
    )absolute_import)division)unicode_literalsN)genomics_client)GenomicsError)base)display)flags)log)
console_io)resource_printerc                   &    e Zd ZdZed        Zd Zy)CancelzCancels an operation.
  c                 .    t        j                  |        y)z Register flags for this command.N)r
   AddName)parsers    )lib/surface/genomics/operations/cancel.pyArgszCancel.Args&   s     
MM&    c                    t        j                  |j                        \  }}|j                  |      }t	        j
                         }t        j                  | |      j                         }t        j                  |||       t        j                  |j                         dd      st        d      |j                  |       t         j"                  j%                  dj'                  |j)                                      y)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.

    Raises:
      HttpException: An http error response was received while executing api
          request.
    Returns:
      None
    )out
zThis operation will be canceled)messagezCancel aborted by user.zCanceled [{0}].
N)r   CreateFromNamenameGetOperationioStringIOr	   	Displayer	GetFormatr   Printr   PromptContinuegetvaluer   CancelOperationr   statuswriteformatRelativeName)selfargsclientresourceopoperation_stringprint_formats          r   Runz
Cancel.Run+   s     '55dii@FH			X	&B{{}$$T40::<L2|1AB$$!!#%F.H I344
8$JJ(//0E0E0GHIr   N)__name__
__module____qualname____doc__staticmethodr   r0    r   r   r   r   "   s!      Jr   r   )r4   
__future__r   r   r   r   googlecloudsdk.api_lib.genomicsr   *googlecloudsdk.api_lib.genomics.exceptionsr   googlecloudsdk.callioper   r	   #googlecloudsdk.command_lib.genomicsr
   googlecloudsdk.corer   googlecloudsdk.core.consoler   googlecloudsdk.core.resourcer   Commandr   r6   r   r   <module>r@      sB    '  ' 	 ; D ( + 5 # 2 9"JT\\ "Jr   