
    Z                         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\	R                  5      rg)z&Command for spanner SSD caches update.    )absolute_import)division)unicode_literalsN)
ssd_caches)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 SSD cache.EXAMPLESaY          To update the size of a Cloud Spanner SSD cache to 2048 GiB, run:

          $ {command} my-cache-id --config=my-config-id --size-gib=2048

        To update display name of a Cloud Spanner SSD cache, run:

          $ {command} my-cache-id --config=my-config-id --display-name=new-display-name

        To modify the SSD Cache by adding label 'k0', with value 'value1' and label 'k1' with value 'value2' and removing labels with key 'k3', run:

         $ {command} my-cache-id --config=my-config-id --update-labels=k0=value1,k1=value2 --remove-labels=k3

        To clear all labels of a Cloud Spanner SSD cache, run:

          $ {command} my-cache-id --config=my-config-id --clear-labels

        To remove existing labels of a Cloud Spanner SSD cache, run:

          $ {command} my-cache-id --config=my-config-id --remove-labels=k0,k1
        c                 ,   [         R                  " SSSS9R                  U 5        [         R                  " 5       R                  U 5        U R	                  SSS9nUR                  S[        SS9  UR                  S	S
S9  [        R                  " U5        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.
TF)
positionalrequiredhiddenz=SSD Cache attributes to be updated. At least one is required.)r   helpz
--size-gibz"The size of this SSD Cache in GiB.)typer   z--display-namez0The name of this SSD Cache as it appears in UIs.)r   N)	r   SsdCacheAddToParserConfig	add_groupadd_argumentintr	   AddUpdateLabelsFlags)parserupdate_groups     (lib/surface/spanner/ssd_caches/update.pyArgsUpdate.Args8   s     
NNdT%@LL 
LLNv&##L $ L
 3%I   ?  
 $$\2    c                 .    [         R                  " U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:
  SSD Cache update response.
)r   Patch)selfargss     r   Run
Update.RunU   s     D!!r     N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r%   __static_attributes__r'   r    r   r   r      s:    ) (// # -0 3 38
"r    r   )r,   
__future__r   r   r   r-   googlecloudsdk.api_lib.spannerr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   $googlecloudsdk.command_lib.util.argsr	   Commandr   r'   r    r   <module>r8      s4    - &  '  5 ( 4 <B"T\\ B"r    