
    :                         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r " S S\R&                  5      rg)zCommand to set properties.    )absolute_import)division)unicode_literals)apis)base)
exceptions)
completers)log)
properties)named_configsNc                   f    \ rS rSrSrS\R                  R                  5       0r\	S 5       r
S rSrg)Get    a_  Print the value of a Google Cloud CLI property.

{command} prints the property value from your active client side configuration
only.

## AVAILABLE PROPERTIES

{properties}

## EXAMPLES

To print the project property in the core section, run:

  $ {command} project

To print the zone property in the compute section, run:

  $ {command} compute/zone
r   c                 z    U R                  SS[        R                  SS9  U R                  R	                  S5        g)zAdds args for this command.propertyzSECTION/PROPERTYzoThe property to be fetched. Note that `SECTION/` is optional while referring to properties in the core section.)metavar	completerhelpzvalue(.)N)add_argumentr	   PropertiesCompleterdisplay_info	AddFormat)parsers    lib/surface/config/get.pyArgsGet.Args7   sA     "00>	  ? !!*-    c                 8   [         R                  R                  5       R                  nUS:w  a.  [        R
                  R                  SR                  U5      5        [        R                  " UR                  5      u  p4U(       d7  U(       a  Sn[        R                  " SU5      e[        R                  " SS5      e [        R                  R                  U5      R                  U5      R!                  SS9nU(       d  [        R"                  R%                  S5        U[        R                  R&                  R                  :X  aL  [(        R*                  " U5      n[(        R,                  " XG5      n[        R
                  R%                  S	U5        U$ ! [        R.                   ap  n	[        R0                  " [2        R4                  " U	5      5        [        R                  R                  U5      R                  U5      R!                  S
S9n S n	A	U$ S n	A	ff = f)Ndefaultz$Your active configuration is: [{0}]
zMYou cannot call get on a SECTION/. Did you mean `gcloud config list SECTION`?r   z'Must be in the form: [SECTION/]PROPERTYT)validatez(unset)zDefaults to F)r   ConfigurationStoreActiveConfignamer
   statuswriteformatr   ParsePropertyStringr   c_excInvalidArgumentExceptionVALUESSectionPropertyr   errPrintapi_endpoint_overridesr   ResolveVersionGetEffectiveApiEndpointInvalidValueErrorwarningsix	text_type)
selfargsconfig_namesectionproperr_msgvalueapi_versiondefault_endpointes
             r   RunGet.RunB   s   22??AFFKi	jj>EE
  224==AMG	@,,ZAA**
?A A''099$?CC D e 	i j''>>CCC++D1+!99$L

**

>+;
< L '' 	kk#--"#''099$?CC D eLs   >CF H)A%HH N)__name__
__module____qualname____firstlineno____doc__r   r*   GetHelpStringdetailed_helpstaticmethodr   r@   __static_attributes__rB   r   r   r   r       s9    (  !2!2!@!@!BC-. .r   r   )rG   
__future__r   r   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   r   r(   !googlecloudsdk.command_lib.configr	   googlecloudsdk.corer
   r   "googlecloudsdk.core.configurationsr   r4   Commandr   rB   r   r   <module>rS      s=    ! &  ' , ( 7 8 # * < 
@$,, @r   