
    2                     >   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"                  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.    )absolute_import)division)unicode_literalsN)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instancer:   r;   r<   r=   r>   r?   r@   rA   rB   rC   asymmetric_autoscaling_optionrE   #clear_asymmetric_autoscaling_optionrI   rJ   async_r   AwaitselfargsrG   rH   ops        r2   Run
Update.RunZ   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6r6    N__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr3   rY   __static_attributes__r\   r6   r2   r   r      =     ) (// # 
- ( (T#7r6   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'   r1   s    r2   r3   BetaUpdate.Args   r5   r6   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r8   rL   rU   s        r2   rY   BetaUpdate.Run   r[   r6   r\   Nr]   r\   r6   r2   rj   rj      rh   r6   rj   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/   r0   r1   s    r2   r3   AlphaUpdate.Args   s     
NN  (	u%11&9OO'&&v.$$V,	$$%*#'!%%)-115%)	 
NN  (	MM$))&1	##8H79
 k&r6   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)r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   ssd_cache_idrI   rJ   rK   N)r
   rM   rN   r   rO   rP   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rQ   rE   rR   	ssd_cacherI   rJ   rS   r   rT   rU   s        r2   rY   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6r6   r\   N)r^   r_   r`   ra   rb   rc   rd   re   r   rf   r3   rY   rg   r\   r6   r2   rq   rq      sF     = (// # 
- NN'* *X$7r6   rq   )rb   
__future__r   r   r   rc   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr	   r
   UniverseCompatibleReleaseTracksReleaseTrackGACommandr   BETArj   ALPHArq   r\   r6   r2   <module>r      s    , &  '  > 4 ( 4 < D%%(()]7T\\ ]7 * ]7@ D%%**+]7 ]7 , ]7@ D%%++,b7$,, b7 - b7r6   