
    !	                         d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddl	m
Z
 ddlmZ dd	lmZ  G d
 de
j                        Zy)z"bigtable instances update command.    )absolute_import)division)unicode_literalsN)util)base)	arguments)logc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)UpdateInstancez%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                 z    t        j                  |       j                          t        j                  | dd       y)z Register flags for this command.z	to updateT)
positionalN)r   ArgAdderAddInstanceDisplayNameAddInstanceResourceArg)parsers    (lib/surface/bigtable/instances/update.pyArgszUpdateInstance.Args*   s-     v557$$V[TJ    c                    t        j                         }t        j                  |j                        }t        j                         }|j
                  j                  |j                  |j                                     }d|_	        |j                  r|j                  |_        |j
                  j                  |      }t        j                  |j                  d       |S )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instance)kind)bigtable_utilGetAdminClientGetInstanceRefr   GetAdminMessagesprojects_instancesGet(BigtableadminProjectsInstancesGetRequestRelativeNamestatedisplay_namedisplayNameUpdater	   UpdatedResourcer   )selfargsclirefmsgsr   s         r   RunzUpdateInstance.Run0   s     
&
&
(C

&
&t}}
5C))+D%%))553;K;K;M5NPHHN!..h%%,,X6HJ7Or   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r,    r   r   r   r      s?    - 
(//  - K K
r   r   )r0   
__future__r   r   r   r1   googlecloudsdk.api_lib.bigtabler   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   googlecloudsdk.corer	   UpdateCommandr   r5   r   r   <module>r<      s4    ) &  '  A ( 9 #)T'' )r   