
                         (   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	d
ZdZd Z ej                  ej                  j                   ej                  j"                        ej$                   G d dej&                                      Zy)z8Command to list all pipelines in a project and location.    )absolute_import)division)unicode_literals)	pipelines)base)flagsz{description}z        To list all pipelines in location ``us-central1'', run:

          $ {command} --location=us-central1

        To list all pipelines in all locations, run:

          $ {command} --location=-

        or

          $ {command}
        )DESCRIPTIONEXAMPLESap  table(
    name.scope("pipelines"):label=NAME,
    name.scope("locations").segment(0):label=LOCATION,
    loggingConfig.logSeverity:label=LOGGING_CONFIG,
    inputPayloadFormat():label=INPUT_PAYLOAD_FORMAT,
    retryPolicy.maxAttempts:label=MAX_RETRY_ATTEMPTS,
    retryPolicy.minRetryDelay:label=MIN_RETRY_DELAY,
    retryPolicy.maxRetryDelay:label=MAX_RETRY_DELAY
)
c                     | j                  d      }|y|j                  d      y|j                  d      y|j                  d      yy	)
z9Generate an input payload format string for the pipeline.inputPayloadFormatNonejsonJsonavroAvroprotobufProtobufzUnknown Format)get)pipelineinput_payload_formats     &lib/surface/eventarc/pipelines/list.py_InputPayloadFormatr   7   sZ    !&:;!f%1f%1j)5	    c                   *    e Zd ZdZeZed        Zd Zy)ListzList Eventarc pipelines.c                 2   t        j                  | ddd       t        j                  |        | j                  j	                  t
               | j                  j                  t        j                         | j                  j                  dt        i       y )NzRLocation for which to list pipelines. This should be one of the supported regions.FT)requiredallow_aggregationr   )r   AddLocationResourceArgAddProjectResourceArgdisplay_info	AddFormat_FORMAT
AddUriFuncr   GetPipelineURIAddTransformsr   )parsers    r   Argsz	List.ArgsL   s{    	  	 
'
!!'*
""9#;#;<
%%1' r   c                     t        j                         }|j                  j                  j	                         }|j                  ||j                  |j                        S )N)r   PipelineClientV1CONCEPTSlocationParser   limit	page_size)selfargsclientlocation_refs       r   RunzList.Run\   sC    '')F==))//1L;;|TZZ@@r   N)	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr(   r4    r   r   r   r   E   s$     ! - Ar   r   N)r8   
__future__r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   r9   r#   r   ReleaseTracksReleaseTrackBETAGADefaultUniverseOnlyListCommandr   r<   r   r   <module>rG      s    ? &  ' 5 ( 5 #"
 D%%**D,=,=,@,@AA4 A  BAr   