
    {
                         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  G d	 d
e
j                        Zy)z(service-management configs list command.    )absolute_import)division)unicode_literals)
list_pager)services_util)base)arg_parsersc                   &    e Zd ZdZed        Zd Zy)Lista\  Lists the configurations for a given service.

  This command lists all the configurations for a given service by ID.

  To get more detailed information about a specific configuration, run:

    $ {parent_command} describe

  ## EXAMPLES

  To list the configurations for a service named `my-service`, run:

    $ {command} --service=my-service
  c                 b    | j                  ddd       | j                  j                  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.
    z	--serviceTz>The name of service for which to list existing configurations.)requiredhelpzj
          table(
            id:label=CONFIG_ID,
            name:label=SERVICE_NAME
          )
        N)add_argumentdisplay_info	AddFormat)parsers    %lib/surface/endpoints/configs/list.pyArgsz	List.Args-   s<     M  O !! #     c                 &   t        j                         }t        j                         }t        j                  |j
                        }|j                  |      }t        j                  |j                  ||j                  d|j                  d      S )zRun 'service-management configs list'.

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

    Returns:
      The response from the List API call.
    )serviceNamepageSizeserviceConfigs)limitbatch_size_attribute
batch_sizefield)r   GetMessagesModuleGetClientInstancer	   GetServiceNameFromArgservice+ServicemanagementServicesConfigsListRequestr   YieldFromListservices_configsr   	page_size)selfargsmessagesclientr!   requests         r   RunzList.RunA   s     ..0H,,.F//=GBB C G ##jj'>>   r   N)__name__
__module____qualname____doc__staticmethodr   r+    r   r   r   r      s       & r   r   N)r/   
__future__r   r   r   apitools.base.pyr    googlecloudsdk.api_lib.endpointsr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.endpointsr	   ListCommandr   r1   r   r   <module>r8      s1     / &  ' ' : ( << 4 < r   