Ë
    €Ï…  ã                   ó†   — 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update command.é    )Úabsolute_import)Údivision)Úunicode_literals)Úscm)Úservices_util)Úarg_parsers)Úbasec                   ó&   — e Zd ZdZed„ «       Zd„ Zy)ÚUpdateaB  Update a quota override for a consumer.

  This command updates a quota override for a consumer. The supported consumers
  are projects, folders, and organizations. The override ID can be
  found from list command output.

  ## EXAMPLES

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

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

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

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

  To update 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} --override-id=hello123 --value=360

  To force the update of a quota override, run:

    $ {command} --service=example.googleapis.com --consumer=projects/12321
      --metric=example.googleapis.com/default_requests
      --unit=1/min/{project}  --override-id=hello123
      --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 update a quota override for.)ÚrequiredÚhelpz
--consumerz$The consumer to update override for.z--metricz*The metric to update a quota override for.z--unitz4The unit of a metric to update 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 update 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/update.pyÚArgszUpdate.Args?   sð   € ð ×ÑØØØ:ð ô <ð ×ÑØØØ3ð ô 5ð ×ÑØØØ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 update'.

    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
Update.Runf   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"   „ ñ!ðF ñ$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Ý /Ý (ô[%ˆT×Ñõ [%r   