
    	                     ~    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r " S	 S
\
R                  5      rg)z:Utilities for displaying workflows for cloud build v2 API.    )absolute_import)division)unicode_literals)pipeline_output_util)yaml)custom_printer_baseworkflowc                   *    \ rS rSrSrS rS rS rSrg)WorkflowPrinter   z'Print a Workflow in YAML with comments.c                    SU;   a#  UR                  S5      nU R                  X5      nOhSU;   a2  SUS   ;   a)  US   R                  S5      nUS	 U R                  X5      nO0SU;   a*  UR                  S5      n[        R                  " U5      US'   UR	                  S0 5      nU(       a  [        R
                  " U5      US'   [        R                  " USS9n[        R                  " UR                  S5      5      $ )	z6Apply formatting to the workflow for describe command.pipelineSpecYamlpipelineSpecgeneratedYamlpipelineRefparamsT
round_trip
)pop_updateWorkflowSpecr   TransformRefgetTransformParamsSpecr   dumpr   Linessplit)selfr	   yaml_strrefr   s        @lib/googlecloudsdk/api_lib/cloudbuild/v2/workflow_output_util.py_WorkflowDisplayLines%WorkflowPrinter._WorkflowDisplayLines   s    X%01h))(=h("x77.)--o>h
>
"))(=h	(	"LL'c 4 A A# Fh}\\(B'F/CCFKhxyyd3H$$X^^D%9::    c                 8    [         R                  " USS9nX1S'   U$ )NTr   r   )r   load)r   r	   r   datas       r!   r   #WorkflowPrinter._updateWorkflowSpec4   s    99X$/D#^Or$   c                 $    U R                  U5      $ )zTransform ApplicationStatus into the output structure of marker classes.

Args:
  record: a dict object

Returns:
  lines formatted for output
)r"   )r   records     r!   	TransformWorkflowPrinter.Transform9   s     %%f--r$    N)	__name__
__module____qualname____firstlineno____doc__r"   r   r+   __static_attributes__r-   r$   r!   r   r      s    /;,
	.r$   r   N)r2   
__future__r   r   r   $googlecloudsdk.api_lib.cloudbuild.v2r   googlecloudsdk.corer   googlecloudsdk.core.resourcer   PRINTER_FORMATCustomPrinterBaser   r-   r$   r!   <module>r:      s5    A &  ' E $ <'.);; '.r$   