
    0                     z    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
  G d d	ej                        Zy
)zFUpdate or add a quota project in application default credentials json.    )absolute_import)division)unicode_literals)base)	auth_util)
completersc                   &    e Zd ZdZed        Zd Zy)SetQuotaProjecta~  Update or add a quota project in application default credentials (ADC).

  A quota project is a Google Cloud Project that will be used for billing
  and quota limits.

  Before running this command, an ADC must already be generated using
  $ gcloud auth application-default login.
  The quota project defined in the ADC will be used by the Google client
  libraries.
  The existing application default credentials must have the
  `serviceusage.services.use` permission on the given project.

  ## EXAMPLES

  To update the quota project in application default credentials to
  `my-quota-project`, run:

    $ {command} my-quota-project
  c                 p    t        j                  ddt        j                  d      j	                  |        y )Nquota_project_idQUOTA_PROJECT_IDzrQuota project ID to add to application default credentials. If a quota project already exists, it will be updated.)metavar	completerhelp)r   Argumentr   ProjectCompleterAddToParser)parsers    9lib/surface/auth/application_default/set_quota_project.pyArgszSetQuotaProject.Args/   s4    MM"-->	?
 @K{@    c                 @    t        j                  |j                        S )N)r   AddQuotaProjectToADCr   )selfargss     r   RunzSetQuotaProject.Run9   s    ))$*?*?@@r   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r
   r
      s!    (  Ar   r
   N)r    
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.authr   +googlecloudsdk.command_lib.resource_managerr   SilentCommandr
   r"   r   r   <module>r(      s1    M &  ' ( 5 B Ad((  Ar   