
    (	                         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iZ G d dej                        Zy)zList workflow template command.    )absolute_import)division)unicode_literals)	constants)dataproc)util)base)flagsEXAMPLESzt      To list all workflow-templates from region 'us-central1' run:

        $ {command} --region=us-central1
      c                   *    e Zd ZdZeZed        Zd Zy)ListzList workflow templates.c                     t         j                  j                  |        t         j                  j	                  | t
        j                         t        j                  |        | j                  j                  d       y )Nz
          table(
            id:label=ID,
            jobs.len():label=JOBS,
            updateTime:label=UPDATE_TIME,
            version:label=VERSION
          )
    )r	   URI_FLAGRemoveFromParserPAGE_SIZE_FLAG
SetDefaultr   DEFAULT_PAGE_SIZEr
   AddRegionFlagdisplay_info	AddFormat)parsers    /lib/surface/dataproc/workflow_templates/list.pyArgsz	List.Args+   sY     	MM""6*""69+F+FG	
!! # 	    c           	      R   t        j                  | j                               }|j                  }t	        j
                  |      }|j                  |j                               }t	        j                  d|j                  j                  ||j                  d|j                  d      S )N)parentz4The following workflow templates are unreachable: %s	templatespageSize)limitfield
batch_sizebatch_size_attribute)dpDataprocReleaseTrackmessagesr   ParseRegion3DataprocProjectsRegionsWorkflowTemplatesListRequestRelativeName YieldFromListWithUnreachableListclient"projects_regions_workflowTemplatesr   	page_size)selfargsr   r&   
region_refrequests         r   RunzList.Run:   s    {{4,,./H  H!!(+JJJ&&( K *G 00>::jj>>') )r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r2    r   r   r   r   &   s!     -	 	)r   r   N)r6   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   r#   r   googlecloudsdk.callioper	   #googlecloudsdk.command_lib.dataprocr
   r7   ListCommandr   r:   r   r   <module>r@      sG    & &  ' 6 : 0 ( 5 	
$)4 $)r   