
                             d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z	 ddl
mZ  G d	 d
e	j                        Zy)z"Command for spanner sessions list.    )absolute_import)division)unicode_literalsN)database_sessions)base)resource_argsc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)ListzDList the Cloud Spanner sessions contained within the given database.EXAMPLESz        To list the sessions for a given Cloud Spanner database, run:

          $ {command} --instance=my-instance-id --database=my-database-id
        c                 \    t        j                  | dd       | j                  ddd       y)zSee base class.zin which to list sessionsF)
positionalz--server-filterzAn expression for filtering the results of the request on the server. Filter rules are case insensitive. The fields eligible for filtering are: * labels.key where key is the name of a label.)requiredhelpN)r   AddDatabaseResourceArgadd_argument)parsers    .lib/surface/spanner/databases/sessions/list.pyArgsz	List.Args(   s:     ((+? 	>	  ?    c                     t        j                  |j                  j                  j	                         |j
                        S )zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    )r   r
   CONCEPTSdatabaseParseserver_filter)selfargss     r   RunzList.Run6   s5     !!$--"8"8">">"@"&"4"46 6r   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r    r   r   r
   r
      s=    L 
(//  - ? ?6r   r
   )r!   
__future__r   r   r   r"   googlecloudsdk.api_lib.spannerr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   ListCommandr
   r&   r   r   <module>r,      s1    ) &  '  < ( <%64 %6r   