
    =                         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\
R                  5      rg)z,Command for spanner instance configs update.    )absolute_import)division)unicode_literalsN)instance_config_operations)instance_configs)base)flags)labels_utilc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	Update   z.Update a Cloud Spanner instance configuration.EXAMPLESaH          To update display name of a custom Cloud Spanner instance configuration 'custom-instance-config', run:

          $ {command} custom-instance-config --display-name=nam3-RO-us-central1

        To modify the instance config 'custom-instance-config' by adding label 'k0', with value 'value1' and label 'k1' with value 'value2' and removing labels with key 'k3', run:

         $ {command} custom-instance-config --update-labels=k0=value1,k1=value2 --remove-labels=k3

        To clear all labels of a custom Cloud Spanner instance configuration 'custom-instance-config', run:

          $ {command} custom-instance-config --clear-labels

        To remove an existing label of a custom Cloud Spanner instance configuration 'custom-instance-config', run:

          $ {command} custom-instance-config --remove-labels=KEY1,KEY2
        c                    U R                  SS[        R                  SS9  U R                  SSS9  U R                  SS	S9  [        R                  R                  U 5        [        R                  " U 5        U R                  S
SSSS9  g)zArgs is called by calliope to gather arguments for this command.

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.
configINSTANCE_CONFIGz{Cloud Spanner instance config. The 'custom-' prefix is required to avoid name conflicts with Google-managed configurations.)metavar	completerhelpz--display-namez=The name of this instance configuration as it appears in UIs.)r   z--etagz(Used for optimistic concurrency control.z--validate-only
store_trueFzLUse this flag to validate that the request will succeed before executing it.)actiondefaultr   N)add_argumentr	   InstanceConfigCompleterr   
ASYNC_FLAGAddToParserr
   AddUpdateLabelsFlags)parsers    .lib/surface/spanner/instance_configs/update.pyArgsUpdate.Args5   s     !//F	  G L  N A  C 	OO'$$V,
[	      c                     [         R                  " U5      nUR                  (       d  UR                  (       a  U$ [        R
                  " US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:
  Instance config update response.
zUpdating instance-config)r   Patchasync_validate_onlyr   Await)selfargsops      r   Run
Update.RunU   s>     
			%B {{d((i%++B0JKKr!    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r*   __static_attributes__r,   r!   r   r   r      s:    6
//  -*  >Lr!   r   )r1   
__future__r   r   r   r2   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr	   $googlecloudsdk.command_lib.util.argsr
   UpdateCommandr   r,   r!   r   <module>r=      s;    3 &  '  E ; ( 4 <ILT ILr!   