
    4                        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                   5      \R                   " S
 S\R                  5      5       5       r\R                  \R                  " \R                  R$                  5       " S S\5      5       5       rg)z%Command for spanner instances create.    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)	Create    Create a Cloud Spanner instance.EXAMPLES        To create a Cloud Spanner instance, run:

          $ {command} my-instance-id --config=regional-us-east1 --description=my-instance-display-name --nodes=3
        c           
         [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R
                  " SSSSS.S9R                  U 5        [         R                  " SSS	S
.S9R                  U 5        [        R                  " U 5        [        R                  " U 5        [         R                  " SU SSSSSS9  [        R                  R                  U 5        U R                  R                  [         R                  5        [         R                   " U 5        gah  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.
Standard editionEnterprise editionEnterprise Plus editionSpanner's legacy pricing model. For more information, see the [Spanner editions overview](https://cloud.google.com/spanner/docs/editions-overview)STANDARD
ENTERPRISEENTERPRISE_PLUSEDITION_UNSPECIFIEDchoices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	AUTOMATICT)require_all_autoscaling_argsparseradd_asymmetric_option_flagautoscaling_cpu_target_group$add_asymmetric_total_cpu_target_flag(add_asymmetric_disable_autoscaling_flagsadd_disable_downscaling_flagNr   InstanceAddToParserConfigDescriptionEditionDefaultBackupScheduleTyper   AddExpireBehaviorArgAddInstanceTypeArgAddCapacityArgsForInstancer   
ASYNC_FLAGdisplay_infoAddCacheUpdaterInstanceCompleterAddTagsr#   s    'lib/surface/spanner/instances/create.pyArgsCreate.Args(       
NN  (	LLNv&	##F+	MM*.8L	
 k&	##8H79
 k&&&v.$$V,	$$%)#'%)-115%) 	OO'
''(?(?@	MM&    c                    [         R                  " U5      n[         R                  " U5      n[        R                  " S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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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.
instanceconfig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instance_typeexpire_behavioreditiondefault_backup_schedule_typetagsCreating instanceN r   GetInstanceTypeGetExpireBehaviorr   r	   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   asymmetric_autoscaling_optionrN   rQ   rR   rS   async_r   AwaitselfargsrO   rP   ops        r9   Run
Create.Runa   i    "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
 $
  (!
" #
$ &*%F%F%
& YY'
B* {{ib"56r=   rU   N__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr:   r`   __static_attributes__rU   r=   r9   r	   r	      >     ) 
//  - 6 6p$7r=   r	   c                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	
BetaCreate   r   r   r   c           
         [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R
                  " SSSSS.S9R                  U 5        [         R                  " SSS	S
.S9R                  U 5        [        R                  " U 5        [        R                  " U 5        [         R                  " SU SSSSSS9  [        R                  R                  U 5        U R                  R                  [         R                  5        [         R                   " U 5        gr   r)   r8   s    r9   r:   BetaCreate.Args   r<   r=   c                    [         R                  " U5      n[         R                  " U5      n[        R                  " S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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r?   rV   r\   s        r9   r`   BetaCreate.Run   rb   r=   rU   Nrc   rU   r=   r9   rp   rp      rn   r=   rp   c                   F    \ rS rSrSr\R                  r\S 5       rS rSr	g)AlphaCreate   z4Create a Cloud Spanner instance with ALPHA features.c                 8   [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R
                  " 5       R                  U 5        [         R                  " SSSSS.S9R                  U 5        [         R                  " SSS	S
.S9R                  U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [         R                  " SU SSSSSSS9  [        R                  R                  U 5        U R                  R!                  [         R"                  5        [         R$                  " U 5        g)zSee base class.r   r   r   r   r   r   r   r   r   r   TF)r"   r#   r$   asymmetric_options_groupr%   r&   r'   r(   N)r   r*   r+   r,   r-   SsdCacher.   r/   r   r0   r1   AddDefaultStorageTypeArgr2   r   r3   r4   r5   r6   r7   r8   s    r9   r:   AlphaCreate.Args   s;    
NN  (	LLNv&	##F+	NN  (	MM*.8L	
 k&	##8H79
 k&&&v.$$V,**62	$$%)#'!&%)-115%)	 	OO'
''(?(?@	MM&r=   c                    [         R                  " U5      n[         R                  " U5      n[         R                  " U5      n[        R
                  " S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R&                  _SU_SU_SU_SUR(                  _SUR*                  _SUR,                  _SUR.                  _6nUR0                  (       a  U$ [2        R4                  " US5        g)r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   default_storage_type	ssd_cacherQ   rR   rS   rT   NrU   )r   rW   rX   GetDefaultStorageTypeArgr   r	   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rY   rN   r   rQ   rR   rS   rZ   r   r[   )r]   r^   rO   rP   r   r_   s         r9   r`   AlphaCreate.Run0  s    "11$7M#55d;O(AA$G			 

{{
 $$
 jj	

 ..
 #88
 #88
 *.)N)N
 *.)N)N
 .2-V-V
 &*%F%F
 $(#B#B
 (,'I'I
 !44
 $
  (!
" 2#
$ ..%
& '
( &*%F%F)
* YY+
B. {{ib"56r=   rU   N)
rd   re   rf   rg   rh   r	   rl   r:   r`   rm   rU   r=   r9   rw   rw      s(     =NN'1 1f'7r=   rw   )rh   ri   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r   UniverseCompatibleReleaseTracksReleaseTrackGACreateCommandr	   BETArp   ALPHArw   rU   r=   r9   <module>r      s    ,  > 4 ( 4 < D%%(()i7T i7 * i7X D%%**+i7## i7  ,i7X D%%++,_7& _7 - _7r=   