
    a
                        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  SSK	J
r
  \R                  " \R                  R                  \R                  R                  \R                  R                  5       " S S	\R                   5      5       rg)
z!bigtable clusters update command.    N)clusters)util)base)	arguments)logc                   \    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
S rSrg	)
UpdateCluster   z,Update a Bigtable cluster's number of nodes.EXAMPLESz          To update a cluster to `10` nodes, run:

            $ {command} my-cluster-id --instance=my-instance-id --num-nodes=10

          c                     [         R                  " U S5        [         R                  " U 5      R                  5       R	                  5         g)z Register flags for this command.z	to updateN)r   AddClusterResourceArgArgAdderAddAsyncAddScalingArgsForClusterUpdate)parsers    'lib/surface/bigtable/clusters/update.pyArgsUpdateCluster.Args*   s4     ##FK8((*IIK    c                 $    U 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:
  None
)_Run)selfargss     r   RunUpdateCluster.Run0   s     99T?r   c           
      
   UR                   R                  R                  5       n[        R                  " UUR
                  UR                  UR                  UR                  UR                  UR                  S9nUR                  (       dJ  [        R                  " U5      n[        R                  " USR                  UR!                  5       5      5      $ ["        R$                  " UR!                  5       SUR                  S9  g)z8Implements Run() with different possible features flags.)nodesautoscaling_minautoscaling_maxautoscaling_cpu_targetautoscaling_storage_targetdisable_autoscalingzUpdating bigtable cluster {0}cluster)kindis_asyncN)CONCEPTSr#   Parser   PartialUpdate	num_nodesautoscaling_min_nodesautoscaling_max_nodesr    r!   r"   async_r   GetOperationRefAwaitClusterformatNamer   UpdatedResource)r   r   cluster_ref	operationoperation_refs        r   r   UpdateCluster._Run<   s    --''--/K&&nn2222#::#'#B#B 446I ;;**95m

)
0
01A1A1C
DF F T[[Br    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r   r   __static_attributes__r6   r   r   r	   r	      sD     5 
//  - M M

r   r	   )r;   r<   googlecloudsdk.api_lib.bigtabler   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   googlecloudsdk.corer   ReleaseTracksReleaseTrackGABETAALPHAUpdateCommandr	   r6   r   r   <module>rK      su    (  4 0 ( 9 # D%%(($*;*;*@*@%%++-2D&& 2-2r   