
    1                        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                  5       " S S	\R                  5      5       5       r\R                  \R                  " \R                  R                   5       " S
 S\R                  5      5       5       r\R                  \R                  " \R                  R$                  5       " S S\R                  5      5       5       rg)z%Command for spanner instances update.    N)instance_operations)	instances)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    Update a Cloud Spanner instance.EXAMPLES	          To update the display name of a Cloud Spanner instance, run:

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

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

          $ {command} my-instance-id --nodes=1
        c                    [         R                  " 5       R                  U 5        [         R                  " SS9R                  U 5        [        R
                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [         R                  " SU SSSSSSS9  [         R                  " SS5      R                  U 5        [         R                  " SSSS	.S
9R                  U 5        g`  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.
FrequiredT)require_all_autoscaling_argsparseradd_asymmetric_option_flagasymmetric_options_group$add_asymmetric_total_cpu_target_flag(add_asymmetric_disable_autoscaling_flagsautoscaling_cpu_target_groupadd_disable_downscaling_flagNNot specified.bNo default backup schedule is created automatically when a new database is created in an instance.  A default backup schedule is created automatically when a new database is created in an instance. You can edit or delete the default backup schedule once it's created. The default backup schedule creates a full backup every 24 hours. These full backups are retained for 7 days.(DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIEDNONE	AUTOMATICchoicesr   InstanceAddToParserDescriptionr   
ASYNC_FLAGr   AddExpireBehaviorArgAddInstanceTypeArgAddCapacityArgsForInstanceEditionDefaultBackupScheduleTyper   s    'lib/surface/spanner/instances/update.pyArgsUpdate.Args,        
NN  (	u%11&9OO'&&v.$$V,	$$%*#'!%-115%)%)	 
MM$))&1	##8H79
 k&    c                    [         R                  " U5      n[         R                  " U5      n[        R                  " UR
                  40 SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _S	UR                  _S
UR                  _SUR                   _SUR"                  _SUR$                  _SU_SU_SUR&                  _SUR(                  _6nUR*                  (       a  U$ [,        R.                  " US5        gThis 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asymmetric_autoscaling_optionsdisable_downscaling$clear_asymmetric_autoscaling_optionsinstance_typeexpire_behavioreditiondefault_backup_schedule_typeUpdating instanceNr   GetInstanceTypeGetExpireBehaviorr   Patchinstancer7   r8   r9   r:   r;   r<   r=   r>   r?   r@   asymmetric_autoscaling_optionrB   #clear_asymmetric_autoscaling_optionrF   rG   async_r   AwaitselfargsrD   rE   ops        r/   Run
Update.RunW   V    "11$7M#55d;O	
$$
 jj
 ..	

 #88
 #88
 *.)N)N
 *.)N)N
 .2-V-V
 &*%F%F
 $(#B#B
 (,'I'I
 !44
 .2-U-U
 $
  (!
" #
$ &*%F%F%
B( {{ib"56r3    N__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr0   rV   __static_attributes__rY   r3   r/   r	   r	      =     ) (// # 
- ( (T#7r3   r	   c                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	
BetaUpdate}   r   r   r   c                    [         R                  " 5       R                  U 5        [         R                  " SS9R                  U 5        [        R
                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [         R                  " SU SSSSSSS9  [         R                  " SS5      R                  U 5        [         R                  " SSSS	.S
9R                  U 5        gr   r$   r.   s    r/   r0   BetaUpdate.Args   r2   r3   c                    [         R                  " U5      n[         R                  " U5      n[        R                  " UR
                  40 SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _S	UR                  _S
UR                  _SUR                   _SUR"                  _SUR$                  _SU_SU_SUR&                  _SUR(                  _6nUR*                  (       a  U$ [,        R.                  " US5        gr5   rI   rR   s        r/   rV   BetaUpdate.Run   rX   r3   rY   NrZ   rY   r3   r/   rg   rg   }   re   r3   rg   c                   n    \ rS rSrSrS\R                  " S5      0r\R                  r\	S 5       r
S rSrg)	AlphaUpdate   z4Update a Cloud Spanner instance with ALPHA features.r   r   c                 @   [         R                  " 5       R                  U 5        [         R                  " SS9R                  U 5        [        R
                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [         R                  " SU SSSSSSS9  [         R                  " 5       R                  U 5        [         R                  " SS5      R                  U 5        [         R                  " SSSS	.S
9R                  U 5        g)r   Fr   T)r   r   r   r   r   r   r   r   Nr   r   r   r   r"   )r   r%   r&   r'   r   r(   r   r)   r*   r+   SsdCacher,   r-   r.   s    r/   r0   AlphaUpdate.Args   s     
NN  (	u%11&9OO'&&v.$$V,	$$%*#'!%%)-115%)	 
NN  (	MM$))&1	##8H79
 k&r3   c                    [         R                  " U5      n[         R                  " U5      n[        R                  " UR
                  40 SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _SUR                  _S	UR                  _S
UR                  _SUR                   _SUR"                  _SUR$                  _SU_SU_SUR&                  _SUR(                  _SUR*                  _6nUR,                  (       a  U$ [.        R0                  " US5        g)r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   ssd_cache_idrF   rG   rH   N)r   rJ   rK   r   rL   rM   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rN   rB   rO   	ssd_cacherF   rG   rP   r   rQ   rR   s        r/   rV   AlphaUpdate.Run  sd    "11$7M#55d;O	
$$
 jj
 ..	

 #88
 #88
 *.)N)N
 *.)N)N
 .2-V-V
 &*%F%F
 $(#B#B
 (,'I'I
 !44
 .2-U-U
 $
  (!
" ^^#
$ %
& &*%F%F'
B* {{ib"56r3   rY   N)r[   r\   r]   r^   r_   r`   ra   rb   r	   rc   r0   rV   rd   rY   r3   r/   rn   rn      sF     = (// # 
- NN'* *X$7r3   rn   )r_   r`   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r   UniverseCompatibleReleaseTracksReleaseTrackGACommandr	   BETArg   ALPHArn   rY   r3   r/   <module>r      s    ,  > 4 ( 4 < D%%(()]7T\\ ]7 * ]7@ D%%**+]7 ]7 , ]7@ D%%++,b7$,, b7 - b7r3   