Ë
    €Ïõ  ã                   ó†   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
  G d	„ d
e
j                  «      Zy)zcreate command.é    )Úabsolute_import)Údivision)Úunicode_literals)Úscm)Úservices_util)Úarg_parsers)Úbasec                   ó&   — e Zd ZdZed„ «       Zd„ Zy)ÚCreatea¨  Create a quota override for a consumer.

  This command creates a quota override for a consumer. The supported
  consumers are projects, folders, and organizations.

  ## EXAMPLES

  To create a quota override for a project with project number, run:

    $ {command} --service=example.googleapis.com --consumer=projects/12321
    --metric=example.googleapis.com/default_requests
    --unit=1/min/{project} --value=360

  To create a quota override for a project with project ID, run:

    $ {command} --service=example.googleapis.com --consumer=projects/hello
    --metric=example.googleapis.com/default_requests
    --unit=1/min/{project} --value=360

  To create a quota override for an organization, run:

    $ {command} --service=example.googleapis.com --consumer=organizations/555
    --metric=example.googleapis.com/default_requests
    --unit=1/min/{project} --value=360

  To force the creation of a quota override with dimensions, run:

    $ {command} --service=example.googleapis.com --consumer=projects/12321
    metric=example.googleapis.com/default_requests
    --unit=1/min/{project} --dimensions=regions=us-central1
    --dimensions=zones=us-central1-c --value=360 --force
  c                 ól  — | j                  ddd¬«       | j                  ddd¬«       | j                  ddd¬«       | j                  d	dd
¬«       | j                  dt        j                  «       dt        j                  d¬«       | j                  dt        dd¬«       | j                  dddd¬«       y)zíArgs 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	--serviceTz+The service to create a quota override for.)ÚrequiredÚhelpz
--consumerz,The consumer to create a quota override for.z--metricz*The metric to create a quota override for.z--unitz4The unit of a metric to create a quota override for.z--dimensionsz	KEY=VALUEz<The dimensions of the override, e.g. for specific locations.)ÚtypeÚmetavarÚactionr   z--valuezThe value of the override.)r   r   r   z--forceÚ
store_trueFz`Force override creation even if the change results in a substantial decrease in available quota.)r   Údefaultr   N)Úadd_argumentr   ÚArgDictÚUpdateActionÚint)Úparsers    ú%lib/surface/endpoints/quota/create.pyÚArgszCreate.Args=   sð   € ð ×ÑØØØ:ð ô <ð ×ÑØØØ;ð ô =ð ×ÑØØØ9ð ô ;ð ×ÑØØØCð ô Eð ×ÑØÜ× Ñ Ó"ØÜ×'Ñ'ØKð ô Mð ×ÑØœ dÐ1Mð ô Oà
×ÑØØØð3ð	 õ 4ó    c           	      óf  — t        j                  |j                  |j                  |j                  |j
                  |j                  |j                  |j                  «      }|j                  ryt        j                  |j                  t         j                  «      }t        j                  |«       y)z¤Run 'endpoints quota create'.

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

    Returns:
      Nothing.
    N)r   ÚUpdateQuotaOverrideCallÚserviceÚconsumerÚmetricÚunitÚ
dimensionsÚvalueÚforceÚdoner   ÚWaitOperationÚnameÚGetOperationÚPrintOperation)ÚselfÚargsÚops      r   ÚRunz
Create.Rund   sv   € ô 
×	$Ñ	$ T§\¡\°4·=±=À$Ç+Á+Ø%)§Y¡Y°·±ÀÇÁØ%)§Z¡Zó
1€Bð 
‡w‚wØÜ	×	$Ñ	$ R§W¡W¬c×.>Ñ.>Ó	?€BÜ× Ñ  Õ$r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústaticmethodr   r-   © r   r   r   r      s"   „ ñðB ñ$4ó ð$4óL%r   r   N)r1   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.servicesr   r   Úgooglecloudsdk.callioper   r	   ÚSilentCommandr   r3   r   r   Ú<module>r8      s3   ðñ å &Ý Ý 'å /Ý 9Ý /Ý (ôY%ˆT×Ñõ Y%r   