
                             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  \R                   " S
 S\R                   5      5       rg)zList builds command.    )
list_pager)cloudbuild_util)filter_rewrite)base)flags)
properties)	resources)resource_projection_specc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g)	List   zList builds.z
            To list all completed builds in the current project:

                $ {command}

            To list all builds in the current project in
            QUEUED or WORKING status.:

                $ {command} --ongoing
            )DESCRIPTIONEXAMPLESc                    [         R                  " U 5        U R                  SSSS9  [        R                  R                  U S5        [        R                  R                  U S5        [        R                  R                  U 5        [        R                  " SSS	[        R                  S
S9R                  U 5        U R                  R                  S5        g)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.
z	--ongoingz6Only list builds that are currently QUEUED or WORKING.
store_true)helpaction2      z--filter
EXPRESSIONFah          Apply a Boolean filter EXPRESSION to each resource item to be listed.
        If the expression evaluates True, then that item is listed. For more
        details and examples of filter expressions, run $ gcloud topic filters.
        This flag interacts with other flags that are applied in this order:
        --flatten, --sort-by, --filter, --limit.)metavarrequire_coverage_in_testscategoryr   at  
        table(
            id,
            createTime.date('%Y-%m-%dT%H:%M:%S%Oz', undefined='-'),
            duration(start=startTime,end=finishTime,precision=0,calendar=false,undefined="  -").slice(2:).join(""):label=DURATION,
            build_source(undefined="-"):label=SOURCE,
            build_images(undefined="-"):label=IMAGES,
            status
        )
    N)r   AddRegionFlagadd_argumentr   
LIMIT_FLAG
SetDefaultPAGE_SIZE_FLAGFILTER_FLAGRemoveFromParserArgumentLIST_COMMAND_FLAGSAddToParserdisplay_info	AddFormat)parsers    lib/surface/builds/list.pyArgs	List.Args.   s     

E   	OOvr*""62. 	%%f-MM"'((4
5 6A[5H
!! 	# 		    c           	      H   UR                   =(       dI    [        R                  R                  R                   R	                  5       =(       d    [
        R                  n[
        R                  " 5       n[
        R                  " 5       n[        R                  R                  R                  R                  5       n[        R                  R                  SUUS9nUR                  5       n[         R"                  " UR$                  UR&                  S9n[(        R*                  " UR,                  5      R/                  UR0                  US9u  Ul        n	[2        R4                  " UR6                  UR9                  UR;                  5       UR<                  U	S9SUR<                  SS9$ )	zThis is what gets called when the user runs this command.

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.
zcloudbuild.projects.locations)
collection
projectsIdlocationsId)symbolsaliases)defaults)parentpageSizefilterbuildsr3   )field
batch_sizebatch_size_attribute)regionr   VALUESr5   Getr   DEFAULT_REGIONGetClientInstanceGetMessagesModulecoreproject	GetOrFailr	   REGISTRYCreateGetDisplayInfor
   ProjectionSpec
transformsr0   r   BackendongoingRewriter4   r   YieldFromListprojects_locations_builds,CloudbuildProjectsLocationsBuildsListRequestRelativeName	page_size)
selfargsbuild_regionclientmessages
project_idparent_resourcer$   r1   server_filters
             r'   RunList.RunX   s`    	 	*##**..0	*))  ..0F002H""''//99;J((//2  0 "O
 &&(L'66''1E1EGH!/!7!7!E!M!Mh "N "(DK ##((=="//1^^  	> 	" >>') )r*    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr(   rW   __static_attributes__rY   r*   r'   r   r      s0     $	- '	 '	R')r*   r   N)r^   apitools.base.pyr   !googlecloudsdk.api_lib.cloudbuildr   r   googlecloudsdk.callioper   !googlecloudsdk.command_lib.buildsr   googlecloudsdk.corer   r	   googlecloudsdk.core.resourcer
   UniverseCompatibleListCommandr   rY   r*   r'   <module>rj      sN     ( = < ( 3 * ) A b)4 b) b)r*   