Ë
    €Ï—  ã                   ó†   — 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)Úservices_util)Úserviceusage)Úarg_parsers)Úbasec                   ó&   — e Zd ZdZed„ «       Zd„ Zy)ÚUpdateaù  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} --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} --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} --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}
        --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/services/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ÚconsumerÚserviceÚmetricÚunitÚ
dimensionsÚvalueÚforceÚdoner   ÚWaitOperationÚnameÚGetOperationÚPrintOperation)ÚselfÚargsÚops      r   ÚRunz
Update.Runf   sw   € ô 
×	-Ñ	-¨d¯m©m¸T¿\¹\Ø.2¯k©k¸4¿9¹9Ø.2¯o©o¸t¿z¹zØ.2¯j©jó
:€Bð 
‡w‚wØÜ	×	$Ñ	$ R§W¡W¬l×.GÑ.GÓ	H€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Ý 8Ý /Ý (ô\%ˆT×Ñõ \%r   