
    _                        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 dd
lmZ dZ e	j$                  e	j&                  j(                  e	j&                  j*                         G d de	j,                               Zy)zCommand to cancel an operation.    )absolute_import)division)unicode_literals)
operations)base)resource_args)command_util)endpoint_util)logze
To cancel an operation in location ``us-west1'', run:

$ {command} OPERATION_ID --location=us-west1
c                   .    e Zd ZdZdeiZed        Zd Zy)CancelzCancel an operation.EXAMPLESc                 0    t        j                  | d       y)z!Registers flags for this command.z	to cancelN)r   AddOperationResourceArg)parsers    0lib/surface/container/azure/operations/cancel.pyArgszCancel.Args)   s     ))&+>    c                     t        j                  t        j                  |      j                  | j                               5  t        j                         }t        j                  |      }|j                  |      }t        j                  |j                         |j                  |       t        j                  j                  t        j                   |j                  d             |j                  |      cddd       S # 1 sw Y   yxY w)zRuns the cancel command.azureN)r
   GkemulticloudEndpointOverrider   ParseOperationResourceArglocationsIdReleaseTrackop_api_utilOperationsClientGetr	   CancelOperationPromptnamer   r   statusPrintCancelOperationMessage)selfargs	op_clientop_refops        r   Runz
Cancel.Run.   s    		4	4//5AA
 ..0i66t<f== b((1v	jj|::277GLM]]6"
 
 
s   B8DDN)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr   r(    r   r   r   r   #   s&    y)-? ?#r   r   N)r,   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.azurer   2googlecloudsdk.command_lib.container.gkemulticloudr	   r
   googlecloudsdk.corer   r-   ReleaseTracksr   ALPHAGACommandr   r0   r   r   <module>r;      ss    & &  ' T ( D K L #	 D%%++T->->-A-AB#T\\ # C#r   