
    ^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       " S
 S\R                  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9  [        R                  R                  U 5        U R                  R                  [         R                  5        [         R                   " U 5        g)h  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_flagsN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(   s    
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_SU_SUR$                  _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.
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instance_typeexpire_behavioreditiondefault_backup_schedule_typetagsCreating instanceN )r   GetInstanceTypeGetExpireBehaviorr   r	   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   asymmetric_autoscaling_optionrM   rN   rO   async_r   AwaitselfargsrK   rL   ops        r8   Run
Create.Run`   sY    "11$7M#55d;O			 

{{
 $$
 jj	

 ..
 #88
 #88
 *.)N)N
 *.)N)N
 .2-V-V
 &*%F%F
 $(#B#B
 (,'I'I
 $
 (
  !
" &*%F%F#
$ YY%
B( {{ib"56r;   rQ   N__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr9   r[   __static_attributes__rQ   r;   r8   r	   r	      s>     ) 
//  - 5 5n#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   r   r   r   r   r   r   r   r   r   T)r"   r#   r$   r%   r&   r'   add_disable_downscaling_flagNr(   r7   s    r8   r9   BetaCreate.Args   s    
NN  (	LLNv&	##F+	MM*.8L	
 k&	##8H79
 k&&&v.$$V,	$$%)#'%)-115%) 	OO'
''(?(?@	MM&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=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   disable_downscalingrK   rL   rM   rN   rO   rP   NrQ   )r   rR   rS   r   r	   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rT   ro   rM   rN   rO   rU   r   rV   rW   s        r8   r[   BetaCreate.Run   si    "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;   rQ   Nr]   rQ   r;   r8   ri   ri      s<    ( 
//  - 6 6p$7r;   ri   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'   rl   N)r   r)   r*   r+   r,   SsdCacher-   r.   r   r/   r0   AddDefaultStorageTypeArgr1   r   r2   r3   r4   r5   r6   r7   s    r8   r9   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=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   ro   rK   rL   default_storage_type	ssd_cacherM   rN   rO   rP   NrQ   )r   rR   rS   GetDefaultStorageTypeArgr   r	   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rT   ro   r{   rM   rN   rO   rU   r   rV   )rX   rY   rK   rL   rz   rZ   s         r8   r[   AlphaCreate.Run-  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;   rQ   N)
r^   r_   r`   ra   rb   r	   rf   r9   r[   rg   rQ   r;   r8   rr   rr      s(     =NN'1 1f'7r;   rr   )rb   rc   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r   DefaultUniverseOnlyReleaseTracksReleaseTrackGACreateCommandr	   BETAri   ALPHArr   rQ   r;   r8   <module>r      s    ,  > 4 ( 4 < D%%(()g7T g7 * g7T D%%**+i7## i7 ,i7X D%%++,_7& _7 - _7r;   