
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SS	KJ
r
  SS
KJr  SSKJr  SSKJr   " S S\R                  5      rg)zCommand for listing job tasks.    )absolute_import)division)unicode_literals)commands)connection_context)flags)pretty_print)resource_args)serverless_operations)concept_parsers)presentation_specsc                   H    \ rS rSrSrSSS.r\S 5       r\S 5       rS r	S	r
g
)List   zList tasks.z#
          {description}
          zl
          To list all tasks for an execution:

              $ {command} --execution=my-execution
         )DESCRIPTIONEXAMPLESc                 \   [         R                  " S[        R                  " 5       SSSS9n[        R
                  " U/5      R                  U5        [        R                  " U5        UR                  R                  SR                  [        R                  [        R                  S95        g )Nz--executionz"Execution for which to list tasks.TF)requiredprefixesztable({ready_column},index,running_state:label=STATE,name:label=TASK,start_time.date("%Y-%m-%d %H:%M:%S %Z"):label=STARTED,completion_time.date("%Y-%m-%d %H:%M:%S %Z"):label=COMPLETED,retries):({alias}))ready_columnalias)r   ResourcePresentationSpecr
   GetExecutionResourceSpecr   ConceptParserAddToParserr   AddTaskFilterFlagsdisplay_info	AddFormatformatr	   READY_COLUMNr   SATISFIES_PZS_ALIAS)clsparserexecution_presentations      -lib/surface/run/jobs/executions/tasks/list.py
CommonArgsList.CommonArgs/   s    /HH..0, !!#9":;GGO	V$
!!	 $V%22.. $ 
    c                 &    U R                  U5        g N)r&   )r"   r#   s     r%   Args	List.ArgsG   s    NN6r(   c                    UR                   R                  R                  5       n[        R                  " U[
        R                  R                  U R                  5       5      n[        R                  " U5       nU R                  UR                  5        UR                  UR                  5       UR                  5       UR                   =(       d    S5      n[#        US S9sSSS5        $ ! , (       d  f       g= f)zList tasks of a job execution.Nc                     U R                   $ r*   )index)xs    r%   <lambda>List.Run.<locals>.<lambda>U   s    qwwr(   )key)CONCEPTS	executionParser   GetConnectionContextr   ProductRUNReleaseTrackr   ConnectSetCompleteApiEndpointendpoint	ListTasksParentNamefilter_flagssorted)selfargsexecution_refconn_contextclientrets         r%   RunList.RunK   s    MM++113M%::emm!2!2!46L		&	&|	4
!!,"7"78]113]5G5G5I!..6$8cC./	 
5	4	4s   9A(C++
C9 N)__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr&   r+   rI   __static_attributes__rK   r(   r%   r   r      sC    -  .  
0r(   r   N)rP   
__future__r   r   r   googlecloudsdk.command_lib.runr   r   r   r	   r
   r   (googlecloudsdk.command_lib.util.conceptsr   r   r   rK   r(   r%   <module>rW      s;    % &  ' 3 = 0 7 8 @ D G608== 60r(   