
    	                     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The configs list command.    )absolute_import)division)unicode_literals)
list_pager)util)basec                   2    e Zd ZdZdZddiZed        Zd Zy)ListzList runtime-config resources within the current project.

  This command lists runtime-config resources for the current project.
  d   EXAMPLESa^  
          To list all runtime-config resources for the current project, run:

            $ {command}

          The --filter parameter can be used to filter results based on content.
          For example, to list all runtime-config resources with names that
          begin with 'foo', run:

            $ {command} --filter='name=foo*'
          c                 :    | j                   j                  d       y )Nztable(name, description))display_info	AddFormat)parsers    *lib/surface/runtime_config/configs/list.pyArgsz	List.Args2   s    
!!"<=    c              #     K   t        j                         }t        j                         }t        j                         }|j	                  t        j
                  |            }|j                  xs | j                  }t        j                  ||dd|j                  |      }|D ]  }t        j                  |        yw)a-  Run 'runtime-configs list'.

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

    Yields:
      The list of runtime-config resources.

    Raises:
      HttpException: An http error response was received while executing api
          request.
    )parentconfigspageSize)fieldbatch_size_attributelimit
batch_sizeN)r   ConfigClientMessagesProject'RuntimeconfigProjectsConfigsListRequestProjectPath	page_sizeDEFAULT_PAGE_SIZEr   YieldFromListr   FormatConfig)	selfargsconfig_clientmessagesprojectrequestr!   resultsresults	            r   RunzList.Run6   s      %%'M}}HllnG>>( ? G 8$"8"8I&&wi'tzzG f%% s   C CN)	__name__
__module____qualname____doc__r"   detailed_helpstaticmethodr   r-    r   r   r
   r
      s9    
   
- > >&r   r
   N)r1   
__future__r   r   r   apitools.base.pyr   %googlecloudsdk.api_lib.runtime_configr   googlecloudsdk.callioper   ListCommandr
   r4   r   r   <module>r:      s.       &  ' ' 6 (9&4 9&r   