
                            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                  5      \R                   " S S	\R                   5      5       5       r\R                  " \R                  R$                  5      \R                   " S
 S\R                   5      5       5       rg)zQuotaPreference create command.    N)encoding)quota_preference)base)flags)logc                   @    \ rS rSrSr\S 5       rS rS	S\4S jjr	Sr
g)
CreateAlpha   a  Create a new QuotaPreference that declares the desired value for a quota.

## EXAMPLES

To create a quota preference in region `us-central1` that applies to the
`default_limit` quota under service `example.$$UNIVERSE_DOMAIN$$` for
`projects/12321`, run:

  $ {command}
  --service=example.$$UNIVERSE_DOMAIN$$
  --project=12321
  --quota-id=default_limit
  --preferred-value=100
  --dimensions=region=us-central1
  --preference-id=example_default-limit_us-central1


To create a quota preference under service `example.$$UNIVERSE_DOMAIN$$` for
`organizations/789` with random preference ID, run:

  $ {command}
  --service=example.$$UNIVERSE_DOMAIN$$
  --organization=789
  --quota-id=default_limit
  --preferred-value=200
c                    [         R                  " U S5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R
                  " SS9R                  U 5        [         R                  " SS9R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        gzArgs is called by calliope to gather arguments for this command.

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.
zquota preference to createF)
positionalNr   AddResourceFlagsServiceAddToParserPreferredValueQuotaIdPreferenceId
DimensionsAllowsQuotaDecreaseBelowUsage AllowHighPercentageQuotaDecreaseEmailJustificationparsers    (lib/surface/quotas/preferences/create.pyArgsCreateAlpha.Args8        
6#?@	MMO'	&&v.	MMU#//7 
%(44V<	""6*	'')55f=	**,88@	KKMf%	%%f-    c                 ~    [         R                  " U[        R                  R                  S9U l        U R
                  $ zRun command.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  The created quota preference.
)release_track)r   CreateQuotaPreferencer   ReleaseTrackGAcreated_resourceselfargss     r   RunCreateAlpha.RunN   s6     -BBD--00D    r    resources_were_displayedc           	          U(       aS  [         R                  R                  [        R                  " [
        R                  " U R                  5      SSSS95        g g NT   ),:)	sort_keysindent
separatorsr   statusPrintjsondumpsr   MessageToDictr'   r)   r-   s     r   EpilogCreateAlpha.Epilog^   E    	jj
**$$T%:%:;#	  r    r'   NT)__name__
__module____qualname____firstlineno____doc__staticmethodr   r+   boolr=   __static_attributes__ r    r   r	   r	      s1    6 . .*! 	T 	 	r    r	   c                   8    \ rS rSrSr\S 5       rS rSS jrSr	g)	
CreateBetaj   a  Create a new QuotaPreference that declares the desired value for a quota.

## EXAMPLES

To create a quota preference in region `us-central1` that applies to the
`default_limit` quota under service `example.$$UNIVERSE_DOMAIN$$` for
`projects/12321`, run:

  $ {command}
  --service=example.$$UNIVERSE_DOMAIN$$
  --project=12321
  --quota-id=default_limit
  --preferred-value=100
  --dimensions=region=us-central1
  --preference-id=example_default-limit_us-central1


To create a quota preference under service `example.$$UNIVERSE_DOMAIN$$`` for
`organizations/789` with random preference ID, run:

  $ {command}
  --service=example.$$UNIVERSE_DOMAIN$$
  --organization=789
  --quota-id=default_limit
  --preferred-value=200
c                    [         R                  " U S5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R
                  " SS9R                  U 5        [         R                  " SS9R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        gr   r   r   s    r   r   CreateBeta.Args   r   r    c                 ~    [         R                  " U[        R                  R                  S9U l        U R
                  $ r"   )r   r$   r   r%   BETAr'   r(   s     r   r+   CreateBeta.Run   s6     -BBD--22D    r    c           	          U(       aS  [         R                  R                  [        R                  " [
        R                  " U R                  5      SSSS95        g g r/   r6   r<   s     r   r=   CreateBeta.Epilog   r?   r    r@   NrA   )
rB   rC   rD   rE   rF   rG   r   r+   r=   rI   rJ   r    r   rL   rL   j   s%    6 . .*! 	r    rL   )rF   r9   apitools.base.pyr   googlecloudsdk.api_lib.quotasr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.quotasr   googlecloudsdk.corer   ReleaseTracksr%   ALPHAUniverseCompatibleCreateCommandr	   rQ   rL   rJ   r    r   <module>r^      s    &  % : ( 3 # D%%++,K$$$ K  -K\ D%%**+K## K  ,Kr    