
                             S 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  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  SSKJr  SSKJr  SSKJr  \R.                   " S S\R0                  5      5       rg)zCommand to set properties.    )absolute_import)division)unicode_literals)base)
exceptions)
completers)config_validators)flags)log)
properties)
console_io)store)universe_descriptorc                   f    \ rS rSrSrS\R                  R                  5       0r\	S 5       r
S rSrg)Set"   a   Set a Google Cloud CLI property.

{command} sets the specified property in your active configuration only. A
property governs the behavior of a specific aspect of Google Cloud CLI such as
the service account to use or the verbosity level of logs. To
set the property across all configurations, use the `--installation` flag. For
more information regarding creating and using configurations, see
`gcloud topic configurations`.

To view a list of properties currently in use, run `gcloud config list`.

To unset properties, use `gcloud config unset`.

Google Cloud CLI comes with a `default` configuration. To create multiple
configurations, use `gcloud config configurations create`, and
`gcloud config configurations activate` to switch between them.

Note: If you are using Cloud Shell, your gcloud command-line tool preferences
are stored in a temporary `tmp` folder, set for your current tab only, and do
not persist across sessions. For details on how to make these configurations
persist, refer to the Cloud Shell
guide on setting gcloud command-line tool preferences:
https://cloud.google.com/shell/docs/configuring-cloud-shell#gcloud_command-line_tool_preferences.

## AVAILABLE PROPERTIES

{properties}

## EXAMPLES

To set the `project` property in the core section, run:

  $ {command} project PROJECT_ID

To set the `zone` property in the `compute` section, run:

  $ {command} compute/zone ZONE_NAME

To disable prompting for scripting, run:

  $ {command} disable_prompts true

To set a proxy with the appropriate type, and specify the address and port on
which to reach it, run:

  $ {command} proxy/type http
  $ {command} proxy/address 1.234.56.78
  $ {command} proxy/port 8080

For a full list of accepted values, see
https://cloud.google.com/sdk/gcloud/reference/topic/configurations#AVAILABLE-PROPERTIES.
r   c                     U R                  SS[        R                  SS9  U R                  S[        R                  SS9  [        R
                  R                  U 5        g)	zAdds args for this command.propertyzSECTION/PROPERTYad  Property to be set. Note that SECTION/ is optional while referring to properties in the core section, i.e., using either `core/project` or `project` is a valid way of setting a project. Using section names is required for setting other properties like `compute/region`. Consult the Available Properties section below for a comprehensive list of properties.)metavar	completerhelpvaluezValue to be set.)r   r   N)add_argumentr   PropertiesCompleterPropertyValueCompleterr
   INSTALLATION_FLAGAddToParser)parsers    lib/surface/config/set.pyArgsSet.Args[   se     "002	  	3 33  !
 
''/    c                    UR                   (       a  [        R                  R                  O[        R                  R                  n[        R
                  " UR                  5      nU(       d  [        R                  " SS5      eSnUR                   (       a  SnU[        R                  R                  R                  :X  a   [        R                  " UR                  5        SnU[        R                  R                  R                   :X  a@  [        R"                  " UR                  5        [        R$                  " X!R                  5      nU[        R                  R&                  R(                  :X  a  [        R*                  " UR                  SS9nU[        R                  R&                  R,                  :X  a  [        R*                  " UR                  SS9nUR.                  [        R                  R0                  R2                  :X  a!  [        R4                  " UR                  U5      nS nU[        R                  R                  R6                  :X  aA  [8        R:                  " UR                  5      n[        R<                  " UR                  U5      nSnU[        R                  R                  R>                  :X  ay  [        R@                  " UR                  5      n[        RB                  " UR                  5      =(       d    Un[D        RF                  " 5       nURI                  UR                  5      nU(       aa  URJ                  (       dP  [L        RN                  " 5       (       a6  [L        RP                  " SRS                  XCUR                  5      5      (       d  g U(       d   [        RT                  " X1R                  US	9  O[V        RX                  R[                  S
5        [V        RX                  R[                  SRS                  XC5      5        U(       a`  U(       aX  [        RT                  " [        R                  R                  R>                  UUS	9  [V        RX                  R[                  S5        g g g )Nr   z'Must be in the form: [SECTION/]PROPERTY zinstallation FT)zonalz6Are you sure you wish to set {0}property [{1}] to {2}?)scopezDomain is switched to primary.zUpdated {0}property [{1}].z(Updated [core/universe_domain] to match.).installationr   ScopeINSTALLATIONUSER
FromStringr   c_excInvalidArgumentExceptionVALUEScontext_awareuse_client_certificater	   "WarnIfActivateUseClientCertificater   coreproject!WarnIfSettingProjectWhenAdcExists WarnIfSettingProjectWithNoAccesscomputezone"WarnIfSettingNonExistentRegionZoneregionsectionapi_endpoint_overridesname7WarnIfSettingApiEndpointOverrideOutsideOfConfigUniverseaccountc_store$GetCredentialedAccountUniverseDomain+WarnIfSettingAccountOutsideOfConfigUniverseuniverse_domain9WarnIfSettingUniverseDomainOutsideOfConfigAccountUniverse/WarnIfSettingUniverseDomainWithNoDescriptorDatar   UniverseDescriptor&IsDomainUpdatedFromDeprecatedToPrimaryquietr   	CanPromptPromptContinueformatPersistPropertyr   statusPrint)	selfargsr&   prop	scope_msgshowed_warningcred_account_universe_domainis_deprecated_and_switcheduniverse_descriptor_objs	            r   RunSet.Runo   sF   .2.?.?Z**""'' 
   /D**
?A A I!iz  ..EEE::4::FNz  %%---99$**E(II
nz  ((---(KK
**D"nz  ((///(KK
**E#n||z((??DDD(``
**dn $( z  %%---

6
6tzz
B # 
G
Gjj6 
 "'z  %%555(bb
**n 
K
Kjj 	 
 !4 F F H
!
H
Hjj ! djjZ-A-A-C-C&&
B
I
Itzz 
 	 &  zz?	jj78JJ188IJ#  



 
 
0
0
&
 
jjAB )7#r"    N)__name__
__module____qualname____firstlineno____doc__r   r.   GetHelpStringdetailed_helpstaticmethodr    rV   __static_attributes__rX   r"   r   r   r   "   s<    3j  !2!2!@!@!BC-0 0&PCr"   r   N)r]   
__future__r   r   r   googlecloudsdk.callioper   r   r,   !googlecloudsdk.command_lib.configr   r	   r
   googlecloudsdk.corer   r   googlecloudsdk.core.consoler   googlecloudsdk.core.credentialsr   r?   'googlecloudsdk.core.universe_descriptorr   UniverseCompatibleCommandr   rX   r"   r   <module>rk      s\     ! &  ' ( 7 8 ? 3 # * 2 < G \C$,, \C \Cr"   