
                             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  G d
 dej                        Zy)zList triggers command.    )absolute_import)division)unicode_literals)cloudbuild_util)base)flags)
properties)	resourcesc                   0    e Zd ZdZdddZed        Zd Zy)Listz(List Cloud Build triggers for a project.zC
        To list build triggers, run:

          $ {command}
      )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y )N)build_flagsAddRegionFlag)parsers    #lib/surface/builds/triggers/list.pyArgsz	List.Args)   s    f%    c                    t        j                         }t        j                  j                  j
                  j                  d      }t        j                  j                  j                  j                         }|j                  xs |xs t         j                  }t        j                  j                  d||      j                         }|j                  j                  |j                   j#                  |            j$                  S )zLists the build triggers in a project.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    T)requiredzcloudbuild.projects.locations)
collection
projectsIdlocationsId)parent)r   GetClientInstancer	   VALUEScoreprojectGetbuildsregionDEFAULT_REGIONr
   REGISTRYCreateRelativeNameprojects_locations_triggersr   MESSAGES_MODULE.CloudbuildProjectsLocationsTriggersListRequesttriggers)selfargsclientr   
regionproplocationr   s          r   RunzList.Run-   s     ..0F$$,,00$0?G""))00446J{{JjJO,J,JH&&2 '  +ln 
 --22MM 	N 	$H%r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r0    r   r   r   r      s/    0 5
- & &%r   r   N)r4   
__future__r   r   r   !googlecloudsdk.api_lib.cloudbuildr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.buildsr   r   googlecloudsdk.corer	   r
   ListCommandr   r7   r   r   <module>r>      s4     &  ' = ( B * ))%4 )%r   