
                         n   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SKJr  SSKJr  S\R&                  " S5      0r\R*                  \R,                  " \R.                  R0                  5       " S S\R2                  5      5       5       r\R*                  \R,                  " \R.                  R6                  5       " S S\5      5       5       r\R*                  \R,                  " \R.                  R:                  5       " S S\5      5       5       rg)z(Command for spanner operations describe.    )absolute_import)division)unicode_literalsN)backup_operations)database_operations)instance_config_operations)instance_operations)instance_partition_operations)ssd_cache_operations)base)
exceptions)flagsEXAMPLESaa          To describe a Cloud Spanner instance operation, run:

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

        To describe a Cloud Spanner database operation, run:

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

        To describe a Cloud Spanner backup operation, run:

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

        To describe an instance partition operation, 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)Describe8   #Describe 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AddCommonDescribeArgs)parsermutex_groups     *lib/surface/spanner/operations/describe.pyArgsDescribe.Args?   sp     """=K//R  
 ))D  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      $ )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.

Returns:
  Some value that we want to have printed later.
)instance_configr   Get	operationr   #CheckExclusiveLROFlagsUnderInstancebackupr   instancedatabaser   instance_partitionr
   r	   )selfargss     r    RunDescribe.RunW   s     '++D,@,@,0NN< <
 
--d3{{""4==$++t~~NN}} $$T]]DMM%)^^5 5*..
--00$..  ""4==$..AAr#    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr!   r0   __static_attributes__r2   r#   r    r   r   8   s$     ,-( (.B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$ )BetaDescribew   r   r   z        c                 4   > [         [        [        ]  U 5        g)`  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)superr=   r!   r   	__class__s    r    r!   BetaDescribe.Args   s     
,*62r#   r2   )r3   r4   r5   r6   r7   r8   textwrapdedentr9   r:   r!   r;   __classcell__rC   s   @r    r=   r=   w   sD     , -
+hoo ? / -
 	3 	3r#   r=   c                   B   ^  \ rS rSrSr\U 4S j5       rU 4S jrSrU =r	$ )AlphaDescribe   r   c                    > [         [        [        ]  U 5        [        R                  " SSSSS9R                  U 5        g)r@   FTz6The ID of the SSD Cache the operation is executing on.)
positionalr   hiddentextN)rA   rJ   r!   r   SsdCacheAddToParserrB   s    r    r!   AlphaDescribe.Args   s8     
-,V4	NNE	
 k&r#   c                    > UR                   (       a^  UR                  (       a  [        R                  " SS5      e[        R
                  " UR                  UR                   UR                  5      $ [        TU ]%  U5      $ )r%   z--instance or --ssd-cachez8The `--instance` flag cannot be used with `--ssd-cache`.)
	ssd_cacher+   c_exceptionsInvalidArgumentExceptionr   r'   r(   r&   rA   r0   )r.   r/   rC   s     r    r0   AlphaDescribe.Run   sg     ~~	33'F
 	
 "%%
..$..$*>*>  7;tr#   r2   )
r3   r4   r5   r6   r7   r:   r!   r0   r;   rG   rH   s   @r    rJ   rJ      s$     , $ r#   rJ   )r7   
__future__r   r   r   rE   googlecloudsdk.api_lib.spannerr   r   r   r	   r
   r   googlecloudsdk.callioper   r   rU   "googlecloudsdk.command_lib.spannerr   rF   r8   DefaultUniverseOnlyReleaseTracksReleaseTrackGADescribeCommandr   BETAr=   ALPHArJ   r2   r#   r    <module>rc      s   / &  '  < > E > H ? ( > 4  ! . D%%(():Bt## :B * :Bz D%%**+38 3 , 3* D%%++,*L * - *r#   