
    3                         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\
R                  5      rg)z#The configs variables list command.    )absolute_import)division)unicode_literals)
list_pager)util)base)flags)logc                   @    \ rS rSrSrSrSS0r\S 5       rS r	S r
S	rg
)List   z}List variable resources within a configuration.

This command lists the variable resources within a specified configuration.
d   EXAMPLESat            To list all variables within the configuration named "my-config", run:

            $ {command} --config-name=my-config

          The --filter parameter can be used to filter results based on content.
          For example, to list all variables under the path 'status/', run:

            $ {command} --config-name=my-config --filter='name=status/*'
          c                     [         R                  " U 5        U R                  SSSS9  U R                  R	                  S5        g)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.
z--values
store_truezQList the variables for which you have Get IAM permission along with their values.)actionhelpz'table(name, updateTime, value:optional)N)r	   AddRequiredConfigFlagadd_argumentdisplay_info	AddFormat)parsers    4lib/surface/runtime_config/configs/variables/list.pyArgs	List.Args3   sG     
'
8  :
 !!"KL    c           	   #     #    [         R                  " 5       n[         R                  " 5       n[         R                  " [         R                  " U5      5      nUR
                  U l        UR                  UR                  5       U R                  S9nUR                  =(       d    U R                  n[        R                  " X%SSUR                  US9nU H%  n[         R                  " XR                  5      v   M'     g7f)a  Run 'runtime-configs variables list'.

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

Yields:
  The list of variables.

Raises:
  HttpException: An http error response was received while executing api
      request.
)parentreturnValues	variablespageSize)fieldbatch_size_attributelimit
batch_sizeN)r   VariableClientMessagesParseConfigName
ConfigNamevalues_display_values0RuntimeconfigProjectsConfigsVariablesListRequestRelativeName	page_sizeDEFAULT_PAGE_SIZEr   YieldFromListr$   FormatVariable)	selfargsvariable_clientmessagesconfig_resourcerequestr.   resultsresults	            r   RunList.RunE   s      ))+O}}H**4??4+@AO;;DGG++-)) H +G 8$"8"8I&&'tzzG (<(<== s   C;C=c                 v    U(       a2  U R                   (       a   [        R                  R                  S5        g g g )NzWith --values flag specified, only those variables for which you have Get IAM permission will be returned along with their values.
To see all the variables for which you have List IAM permission, please run the command without the --values flag.
)r+   r
   statusPrint)r2   resources_were_displayeds     r   EpilogList.Epilogi   s,    D$8$8	jj   %9r   )r+   N)__name__
__module____qualname____firstlineno____doc__r/   detailed_helpstaticmethodr   r:   r@   __static_attributes__ r   r   r   r      sA    
   	- M M"">Hr   r   N)rF   
__future__r   r   r   apitools.base.pyr   %googlecloudsdk.api_lib.runtime_configr   googlecloudsdk.callioper   )googlecloudsdk.command_lib.runtime_configr	   googlecloudsdk.corer
   ListCommandr   rJ   r   r   <module>rR      s6     * &  ' ' 6 ( ; #P4 Pr   