
    :                         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 dd	lmZ dd
lmZ ddlmZ ddlZ G d dej&                        Zy)zCommand to set properties.    )absolute_import)division)unicode_literals)apis)base)
exceptions)
completers)log)
properties)named_configsNc                   ^    e Zd ZdZdej
                  j                         iZed        Z	d Z
y)Getas  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                     | j                  ddt        j                  d       | j                  j	                  d       y)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ArgszGet.Args7   sA     "00>	  ? !!*-    c                    t         j                  j                         j                  }|dk7  r.t        j
                  j                  dj                  |             t        j                  |j                        \  }}|s0|rd}t        j                  d|      t        j                  dd      	 t        j                  j                  |      j                  |      j!                  d      }|st        j"                  j%                  d       |t        j                  j&                  j                  k(  rKt)        j*                  |      }t)        j,                  ||      }t        j
                  j%                  d	|       |S # t        j.                  $ rq}	t	        j0                  t3        j4                  |	             t        j                  j                  |      j                  |      j!                  d
      }Y d }	~	|S d }	~	ww xY w)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   RunzGet.RunB   s   22??AFFKi	jj>EE
  224==AMGT	@,,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   1CF HA&HHN)__name__
__module____qualname____doc__r   r(   GetHelpStringdetailed_helpstaticmethodr   r>    r   r   r   r       s9    (  !2!2!@!@!BC-. .r   r   )rB   
__future__r   r   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   r   r&   !googlecloudsdk.command_lib.configr	   googlecloudsdk.corer
   r   "googlecloudsdk.core.configurationsr   r2   Commandr   rF   r   r   <module>rN      s=    ! &  ' , ( 7 8 # * < 
@$,, @r   