
    V                     J   S 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&                  R(                  5       " S S\
R*                  5      5       5       r\
R"                  \
R$                  " \
R&                  R.                  5       " S S\5      5       5       r\
R"                  \
R$                  " \
R&                  R2                  5       " S S\5      5       5       rg)z(Command for spanner operations describe.    N)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)Describe5   #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.RunT   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   r-   __static_attributes__r/   r    r   r   r   5   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$ )BetaDescribet   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    r/   )r0   r1   r2   r3   r4   r5   textwrapdedentr6   r7   r   r8   __classcell__r@   s   @r   r:   r:   t   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)r>   rG   r   r   SsdCacheAddToParserr?   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#   r>   r-   )r+   r,   r@   s     r   r-   AlphaDescribe.Run   sg     ~~	33'F
 	
 "%%
..$..$*>*>  7;tr    r/   )
r0   r1   r2   r3   r4   r7   r   r-   r8   rD   rE   s   @r   rG   rG      s$     , $ r    rG   )r4   rB   googlecloudsdk.api_lib.spannerr   r   r   r   r   r   googlecloudsdk.callioper	   r
   rR   "googlecloudsdk.command_lib.spannerr   rC   r5   UniverseCompatibleReleaseTracksReleaseTrackGADescribeCommandr   BETAr:   ALPHArG   r/   r    r   <module>r_      s   /  < > E > H ? ( > 4  ! . D%%(():Bt## :B * :Bz D%%**+38 3 , 3* D%%++,*L * - *r    