
    [                     J   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 e
j                   e
j                   e
j"                  j$                  e
j"                  j&                        e
j(                   G d
 de
j*                                             Zy)Get a PipelineRun/TaskRun.    )absolute_import)division)unicode_literals)client_util)pipeline_output_util)base)	run_flags)resource_printerc                   &    e Zd ZdZed        Zd Zy)Describer   c                     t        j                  |       } t        j                  t        j
                  t        j                  d       y)zRegister flags for this command.

    Args:
      parser: An argparse.ArgumentParser-like object. It is mocked out in order
        to capture some information, but behaves like an ArgumentParser.
    T)hiddenN)r
   AddsRunFlagsr   RegisterFormatterr   PRINTER_FORMATTektonPrinter)parsers    #lib/surface/builds/runs/describe.pyArgszDescribe.Args    s7     ##F+F&&++**    c                 j   |j                   j                  j                         }|j                         d   }|j                         d   }|j                  }|j
                  dk(  r-|j                         j                  t        j                         t        j                  ||||j                        S )z9This is what gets called when the user runs this command.locationsId
projectsIdtekton)CONCEPTSregionParseAsDictRUN_IDformatGetDisplayInfo	AddFormatr   r   v2_client_utilGetRuntype)selfargs
region_refr   projectrun_ids         r   RunzDescribe.Run/   s    %%++-J /F!,/G[[F{{h
%%&:&I&IJ  &&$))DDr   N)__name__
__module____qualname____doc__staticmethodr   r,    r   r   r   r      s     # Er   r   N)r0   
__future__r   r   r   $googlecloudsdk.api_lib.cloudbuild.v2r   r$   r   googlecloudsdk.callioper	   %googlecloudsdk.command_lib.cloudbuildr
   googlecloudsdk.core.resourcer   HiddenReleaseTracksReleaseTrackALPHABETAUniverseCompatibleDescribeCommandr   r2   r   r   <module>r?      s    ! &  ' N E ( ; 9 D%%++T->->-C-CDEt## E  E Er   