
    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
)z/Shared base classes for runtimeconfig commands.    )absolute_import)division)unicode_literals)util)base)flagsc                   &    e Zd ZdZed        Zd Zy)VariableRetrieverCommandz:A base command that retrieves a single variable object.
  c                 T    t        j                  |        | j                  dd       y)zArgs 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.
    namezThe variable name.)helpN)r   AddRequiredConfigFlagadd_argument)parsers    >lib/googlecloudsdk/command_lib/runtime_config/base_commands.pyArgszVariableRetrieverCommand.Args   s&     
'
%9:    c                     t        j                         }t        j                         }t        j                  |j                  |      }|j                  |j                  |j                                     S )a-  Run a command that retrieves a variable.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
          with.

    Returns:
      The requested variable.

    Raises:
      HttpException: An http error response was received while executing api
          request.
    )r   )r   VariableClientMessagesParseVariableNamer   Get/RuntimeconfigProjectsConfigsVariablesGetRequestRelativeName)selfargsvariable_clientmessagesvar_resources        r   RunzVariableRetrieverCommand.Run+   sf     ))+O}}H))$))T:L@@**, 	A 	
 r   N)__name__
__module____qualname____doc__staticmethodr   r     r   r   r
   r
      s      	; 	;r   r
   N)r$   
__future__r   r   r   %googlecloudsdk.api_lib.runtime_configr   googlecloudsdk.callioper   )googlecloudsdk.command_lib.runtime_configr   DescribeCommandr
   r&   r   r   <module>r,      s.     6 &  ' 6 ( ;'t33 'r   