
                             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 dd	lmZ dd
lmZ  ej                   ej"                  j$                         G d dej&                               Zy)zList session templates command.    )absolute_import)division)unicode_literals)
list_pager)	constants)dataproc)util)base)flagsc                   &    e Zd ZdZed        Zd Zy)ListzList session templates.

  ## EXAMPLES

  The following command lists all session templates in Dataproc's
  'us-central1' region:

    $ {command} --location=us-central1
  c                     t        j                  |        t        j                  j	                  | t
        j                         | j                  j                  d       | j                  j                  d        y )NzI
          table(
            name.basename():label=NAME
          )
    c                     | j                   S )N)name)resources    .lib/surface/dataproc/session_templates/list.py<lambda>zList.Args.<locals>.<lambda>4   s    HMM    )
r   AddLocationFlagr
   PAGE_SIZE_FLAG
SetDefaultr   DEFAULT_PAGE_SIZEdisplay_info	AddFormat
AddUriFunc)parsers    r   Argsz	List.Args*   s\    	&!""69+F+FG
!! # 	 ""#ABr   c                 2   t        j                         }|j                  }t        j                  |      }|j                  |j                               }t        j                  |j                  j                  ||j                  d|j                  d      S )N)parentsessionTemplatespageSize)limitfield
batch_sizebatch_size_attribute)dpDataprocmessagesr	    ParseProjectsLocationsForSession4DataprocProjectsLocationsSessionTemplatesListRequestRelativeNamer   YieldFromListclient#projects_locations_sessionTemplatesr"   	page_size)selfargsr   r(   locationrequests         r   RunzList.Run6   s    {{}H  H44X>HKK$$& L (G ##;;jj >>') )r   N)__name__
__module____qualname____doc__staticmethodr   r4    r   r   r   r      s"     	C 	C)r   r   N)r8   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.dataprocr   r   r&   r	   googlecloudsdk.callioper
   #googlecloudsdk.command_lib.dataprocr   ReleaseTracksReleaseTrackBETAListCommandr   r:   r   r   <module>rD      s_    & &  ' ' 5 : 0 ( 5 D%%**+&)4 &) ,&)r   