
                             S r SSKJr  SSKJr  SSKJr  SSK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\R                   " S5      0r\R$                  \R&                  " \R(                  R*                  5       " S S\R,                  5      5       5       r\R$                  \R&                  " \R(                  R0                  \R(                  R2                  5       " S S\5      5       5       rg)z&Command for spanner operations cancel.    )absolute_import)division)unicode_literalsN)backup_operations)database_operations)instance_config_operations)instance_operations)instance_partition_operations)base)flagsEXAMPLESa~          To cancel an instance operation with ID _auto_12345, run:

          $ {command} _auto_12345 --instance=my-instance-id

        To cancel a database operation with ID _auto_12345, run:

          $ {command}  _auto_12345 --instance=my-instance-id
              --database=my-database-id

        To cancel a backup operation with ID _auto_12345, run:

          $ {command}  _auto_12345 --instance=my-instance-id
              --backup=my-backup-id

        To cancel an instance partition operation with ID auto_12345, run:

          $ {command} auto_12345 --instance=my-instance-id --instance-partition=my-partition-id
        c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Cancel6   !Cancel a Cloud Spanner operation.c                     U R                  SSS9nUR                  S[        R                  SS9  UR                  S[        R                  SS9  [        R
                  " U 5        g)	ah  Args is called by calliope to gather arguments for this command.

Please add arguments in alphabetical order except for no- or a clear-
pair for that argument which can follow the argument itself.
Args:
  parser: An argparse parser that you can use to add arguments that go
      on the command line after this command. Positional arguments are
      allowed.
T)mutexrequiredz--instance-configzCThe ID of the instance configuration the operation is executing on.)	completerhelpz
--instancez5The ID of the instance the operation is executing on.N)	add_groupadd_argumentr   InstanceConfigCompleterInstanceCompleterAddCommonCancelArgs)parsermutex_groups     (lib/surface/spanner/operations/cancel.pyArgsCancel.Args=   sp     """=K//R  
 ))D  F
 
f%    c                    UR                   (       a+  [        R                  " UR                   UR                  5      $ [        R
                  " U5        UR                  (       a6  [        R                  " UR                  UR                  UR                  5      $ UR                  (       a6  [        R                  " UR                  UR                  UR                  5      $ UR                  (       a6  [        R                  " UR                  UR                  UR                  5      $ [        R                  " UR                  UR                  5      $ )zThis 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.

Returns:
  Some value that we want to have printed later.
)instance_configr   r   	operationr   #CheckExclusiveLROFlagsUnderInstancebackupr   instancedatabaser   instance_partitionr
   r	   )selfargss     r   Run
Cancel.RunU   s     '..t/C/C/3~~? ?
 
--d3{{%%dmmT[[&*nn6 6 }} ''t}}(,8 8*11
--00$..  %%dmmT^^DDr!    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r,   __static_attributes__r.   r!   r   r   r   6   s$     *-& &.Er!   r   c                   j   ^  \ rS rSrSrS\S   \R                  " S5      -   0r\	U 4S j5       r
SrU =r$ )BetaAndAlphaCancelv   r   r   z        c                 4   > [         [        [        ]  U 5        g)a`  Args is called by calliope to gather arguments for this command.

Please add arguments in alphabetical order except for no- or a clear-
pair for that argument which can follow the argument itself.
Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.
N)superr9   r   )r   	__class__s    r   r   BetaAndAlphaCancel.Args   s     

06v>r!   r.   )r/   r0   r1   r2   r3   r4   textwrapdedentr5   r6   r   r7   __classcell__)r=   s   @r   r9   r9   v   sD     * -
+hoo ? / -
 	? 	?r!   r9   )r3   
__future__r   r   r   r?   googlecloudsdk.api_lib.spannerr   r   r   r	   r
   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r@   r4   DefaultUniverseOnlyReleaseTracksReleaseTrackGACommandr   ALPHABETAr9   r.   r!   r   <module>rM      s    - &  '  < > E > H ( 4  ! . D%%(();ET\\ ;E * ;E| D%%++T->->-C-CD? ? E ?r!   