
                            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"                  \
R                   R$                  5       " S S\
R&                  5      5       5       r\
R                  \
R                  " \
R                   R*                  5       " S S\5      5       5       rg)z/Command for spanner instances partition create.    )absolute_import)division)unicode_literalsN)instance_partition_operations)instance_partitions)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   z$Create a Spanner instance partition.EXAMPLESz        To create a Spanner instance partition, run:

          $ {command} my-instance-partition-id --instance=my-instance-id --config=regional-us-east1 --description=my-instance-display-name --nodes=3
        c                 |   [         R                  " U S5        [        R                  " SS9R	                  U 5        [        R
                  " SS9R	                  U 5        [        R                  " U SSSS9  [        R                  R	                  U 5        U R                  R                  [        R                  5        g)a`  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.
	to createInstance configuration defines the geographic placement and replication used by the instance partition. Available configurations can be found by running "gcloud spanner instance-configs list"text&Description of the instance partition.Tparseradd_autoscaling_argsautoscaling_args_hiddenrequire_all_autoscaling_argsNr
   AddInstancePartitionResourceArgr	   ConfigAddToParserDescription#AddCapacityArgsForInstancePartitionr   
ASYNC_FLAGdisplay_infoAddCacheUpdaterInstancePartitionCompleterr   s    1lib/surface/spanner/instance_partitions/create.pyArgsCreate.Args-   s     11&+F	LL& k&	5k&	--! $%)	 	OO'
''(H(HI    c                    UR                   R                  R                  5       nUR                  5       n[        R
                  " UUR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                   S9nUR"                  (       a  U$ [$        R&                  " US5        g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:
  Some value that we want to have printed later.
)	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_targetzCreating instance partitionNCONCEPTSinstance_partitionParseParentr   r   configdescriptionr+   r,   r-   r.   r/   r0   r1   r2   r3   async_r   Awaitselfargsinstance_partition_refinstance_refops        r%   Run
Create.RunL        "]]==CCE)002L		#	#jj.."88"88)-)N)N)-)N)N-1-V-V%)%F%F#'#B#B
B {{i!'',IJr(    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr&   rC   __static_attributes__rF   r(   r%   r   r      s?    
 - (// # - J J<Kr(   r   c                   F    \ rS rSrSr\R                  r\S 5       rS rSr	g)AlphaCreatel   z8Create a Spanner instance partition with ALPHA features.c                 |   [         R                  " U S5        [        R                  " SS9R	                  U 5        [        R
                  " SS9R	                  U 5        [        R                  " U SSSS9  [        R                  R	                  U 5        U R                  R                  [        R                  5        g)zSee base class.r   r   r   r   Tr   Nr   r$   s    r%   r&   AlphaCreate.Argsr   s     11&+F	LL& k&	5k&	--! $%)	 	OO'
''(H(HIr(   c                    UR                   R                  R                  5       nUR                  5       n[        R
                  " UUR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                   S9nUR"                  (       a  U$ [$        R&                  " US5        gr*   r4   r=   s        r%   rC   AlphaCreate.Run   rE   r(   rF   N)
rG   rH   rI   rJ   rK   r   rO   r&   rC   rP   rF   r(   r%   rR   rR   l   s+     ANN'J J.Kr(   rR   )rK   
__future__r   r   r   rL   googlecloudsdk.api_lib.spannerr   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr	   r
   DefaultUniverseOnlyReleaseTracksReleaseTrackGABETACreateCommandr   ALPHArR   rF   r(   r%   <module>rc      s    6 &  '  H > ( 4 < $++00GKT GK GKT D%%++,9K& 9K - 9Kr(   