
                          @   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  S
S0r\R                  " \R                   R"                  \R                   R$                  \R                   R&                  5       " S S\R(                  5      5       rg)'Cancels a Cloud SQL instance operation.    )absolute_import)division)unicode_literals)api_util)base)log)
properties)
console_ioEXAMPLESz        To cancel an operation with the id "prod-operation-id",
        like "acb40108-a483-4a8b-8a5c-e27100000032", run:

          $ {command} prod-operation-id
        c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Cancel&   r   c                 $    U R                  SSS9  g)zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use it to add arguments that go on
    the command line after this command. Positional arguments are allowed.
	operationz,Name that uniquely identifies the operation.)helpN)add_argument)parsers    $lib/surface/sql/operations/cancel.pyArgsCancel.Args-   s     H  J    c                    [         R                  " [         R                  5      nUR                  nUR                  nUR
                  R                  UR                  SS[        R                  R                  R                  R                  0S9n[        R                  " SR                  UR                  S95        [         R"                  " SS9  UR$                  R'                  UR)                  UR                  UR                  S95      n[        R*                  R-                  S	R                  UR                  S95        U$ )
zCancels a Cloud SQL instance operation.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  An empty response.
zsql.operationsproject)
collectionparamsz/Warning: You are about to cancel [{operation}].)r   T)cancel_on_no)r   r   z&Cancellation issued on [{operation}].
)r   	SqlClientAPI_VERSION_DEFAULT
sql_clientsql_messagesresource_parserParser   r
   VALUEScorer   	GetOrFailr	   warningformatr   PromptContinue
operationsr   SqlOperationsCancelRequeststatuswrite)selfargsclientr    r!   operation_refemptys          r   Run
Cancel.Run8   s!     < <=F""J&&L**00#:,,1199CCD 1 FM
 KKAHH)) I + ,40!!((//!))]5L5L 	0 	NOE JJ>EE)) F + ,Lr    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r3   __static_attributes__r5   r   r   r   r   &   s%     0-J Jr   r   N)r:   
__future__r   r   r   googlecloudsdk.api_lib.sqlr   googlecloudsdk.callioper   googlecloudsdk.corer	   r
   googlecloudsdk.core.consoler   r;   ReleaseTracksReleaseTrackGABETAALPHAUpdateCommandr   r5   r   r   <module>rJ      s    . &  ' / ( # * 2 	 D%%(($*;*;*@*@%%++-,T ,-,r   