
                            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  \
R                  \
R                  " \
R                   R"                  \
R                   R$                  5       " S S\
R&                  5      5       5       r\
R                  \
R                  " \
R                   R*                  5       " S S\5      5       5       rg)z/Command for spanner instance partitions update.    )absolute_import)division)unicode_literalsN)instance_partition_operations)instance_partitions)base)flags)resource_argsc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	Update   zhUpdate a Spanner instance partition. You can't update the default instance partition using this command.EXAMPLESaY          To update the display name of a Spanner instance partition, run:

          $ {command} my-instance-partition-id --instance=my-instance-id --description=my-new-display-name

        To update the node count of a Spanner instance partition, run:

          $ {command} my-instance-partition-id --instance=my-instance-id --nodes=1
        c                     [         R                  " U S5        [        R                  " SSS9R	                  U 5        [
        R                  R	                  U 5        [        R                  " U SSSS9  g)a`  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.
	to updateF&Description of the instance partition.requiredtextTparseradd_autoscaling_argsautoscaling_args_hiddenrequire_all_autoscaling_argsNr
   AddInstancePartitionResourceArgr	   DescriptionAddToParserr   
ASYNC_FLAG#AddCapacityArgsForInstancePartitionr   s    1lib/surface/spanner/instance_partitions/update.pyArgsUpdate.Args1   s^     11&+F	Ek&OO'	--! $%*	    c                    [         R                  " UR                  R                  R	                  5       UR
                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  S9n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:
  Some value that we want to have printed later.

descriptionnodesprocessing_unitsautoscaling_min_nodesautoscaling_max_nodes autoscaling_min_processing_units autoscaling_max_processing_units$autoscaling_high_priority_cpu_targetautoscaling_total_cpu_targetautoscaling_storage_targetUpdating instance partitionr   PatchCONCEPTSinstance_partitionParser'   r(   r)   r*   r+   r,   r-   r.   r/   r0   async_r   Awaitselfargsops      r!   Run
Update.RunG   s     
	"	"((..0$$jj.."88"88)-)N)N)-)N)N-1-V-V%)%F%F#'#B#B
B {{i(..
) r$    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr"   r=   __static_attributes__r?   r$   r!   r   r      s=    
 q (// # 
-  *r$   r   c                   F    \ rS rSrSr\R                  r\S 5       rS rSr	g)AlphaUpdatee   z8Update a Spanner instance partition with ALPHA features.c                     [         R                  " U S5        [        R                  " SSS9R	                  U 5        [
        R                  R	                  U 5        [        R                  " U SSSS9  g)See base class.r   Fr   r   Tr   Nr   r    s    r!   r"   AlphaUpdate.Argsl   s^     11&+F	Ek&OO'	--! $%*	r$   c                    [         R                  " UR                  R                  R	                  5       UR
                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  S9nUR                  (       a  U$ [         R"                  " US5      $ )rN   r&   r1   r2   r9   s      r!   r=   AlphaUpdate.Run{   s    		"	"((..0$$jj.."88"88)-)N)N)-)N)N-1-V-V%)%F%F#'#B#B
B {{i(..
) r$   r?   N)
r@   rA   rB   rC   rD   r   rH   r"   r=   rI   r?   r$   r!   rK   rK   e   s(     ANN' r$   rK   )rD   
__future__r   r   r   rE   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr	   r
   DefaultUniverseOnlyReleaseTracksReleaseTrackGABETACommandr   ALPHArK   r?   r$   r!   <module>r]      s    6 &  '  H > ( 4 < $++00@T\\ @ @F D%%++,'& ' - 'r$   