
                         l   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
  \R                  \R                  " \R                  R                  \R                  R                  5       " S S\R                   5      5       5       r\R                  " \R                  R$                  5       " S	 S
\5      5       rg)z"bigtable instances update command.    N)util)base)	arguments)logc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	UpdateInstance   %Modify an existing Bigtable instance.EXAMPLESz          To update the display name for an instance, run:

            $ {command} my-instance-id --display-name="Updated Instance Name"

          c                 x    [         R                  " U 5      R                  5         [         R                  " U SSS9  g)z Register flags for this command.z	to updateT)
positionalN)r   ArgAdderAddInstanceDisplayNameAddInstanceResourceArg)parsers    (lib/surface/bigtable/instances/update.pyArgsUpdateInstance.Args(   s-     v557$$V[TJ    c                    [         R                  " 5       n[         R                  " UR                  5      n[         R                  " 5       nUR                  UR                  5       S9n/ nUR                  b"  UR                  Ul        UR                  S5        [        US5      (       aL  UR                  (       a;  UR
                  R                  UR                  5      Ul        UR                  S5        U(       d   [        R                  R                  S5        gUR!                  UUR                  5       SR#                  U5      S9nUR$                  R'                  U5      n[        R(                  " UR*                  SS	9  U$ )
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.
)nameNdisplay_nameeditionzNo updates specified.,)instancer   
updateMaskr   )kind)bigtable_utilGetAdminClientGetInstanceRefr   GetAdminMessagesInstanceRelativeNamer   displayNameappendhasattrr   EditionValueValuesEnumr   statusPrint:BigtableadminProjectsInstancesPartialUpdateInstanceRequestjoinprojects_instancesPartialUpdateInstanceUpdatedResourcer   )selfargsclirefmsgsr   update_maskreqs           r   RunUpdateInstance.Run.   s1    
&
&
(C

&
&t}}
5C))+D}}#"2"2"4}5HK$!..h(tYDLL==dllKh#	jj./

I
I88K( J C
 %%;;C@HJ7Or    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r6   __static_attributes__r8   r   r   r   r      s>     . (// # - K K
#r   r   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )UpdateInstanceAlphaT   r
   c                 |   > [         [        [        ]  U 5        [        R                  " U 5      R                  5         g )N)superrD   r   r   r   AddInstanceEdition)r   	__class__s    r   r   UpdateInstanceAlpha.ArgsX   s+    	
28@v113r   r8   )	r9   r:   r;   r<   r=   rA   r   rB   __classcell__)rI   s   @r   rD   rD   T   s    -4 4r   rD   )r=   r>   googlecloudsdk.api_lib.bigtabler   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   googlecloudsdk.corer   UniverseCompatibleReleaseTracksReleaseTrackGABETAUpdateCommandr   ALPHArD   r8   r   r   <module>rW      s    )  A ( 9 # D%%(($*;*;*@*@A5T'' 5 B 5p D%%++,4. 4 -4r   