
    v                        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  \R                  " \R                   R"                  \R                   R$                  5       " S S\R&                  5      5       rg)zList batch job command.    )absolute_import)division)unicode_literals)	constants)dataproc)display_helper)util)base)flagsc                   >    \ rS rSrSr\S 5       rS r\S 5       rSr	g)List   a  List batch jobs in a project.

  List batch jobs in a project. Page-size sets the maximum number of jobs
  returned per page, and Page-token retrieves subsequent results.

## EXAMPLES

List batch jobs in the "us-central1" region:

  $ {command} --region="us-central1"
c                 d   [         R                  R                  U 5        [         R                  R	                  U [
        R                  5        [         R                  R                  U 5        U R                  SSSSSS9  [        R                  " U 5        U R                  R                  S5        g )Nz--filterT
EXPRESSIONFa          Apply a Boolean filter EXPRESSION to each resource item to be listed
        (the '=' equality operator is the only supported operator).
        If the expression evaluates true for an item, the item is listed.
        This flag interacts with other flags, which are applied in the
        following order: *--flatten*, *--sort-by*, *--filter*, *--limit*.
        For more information, run 'gcloud topic filters'.)hiddenmetavarrequire_coverage_in_testshelpz
          table(
            name.basename():label=BATCH_ID,
            batchType.yesno(no="-"):label=JOB_TYPE,
            state:label=STATUS
          )
    )r
   URI_FLAGRemoveFromParserPAGE_SIZE_FLAG
SetDefaultr   DEFAULT_PAGE_SIZEFILTER_FLAGadd_argumentr   AddRegionFlagdisplay_info	AddFormat)parsers    $lib/surface/dataproc/batches/list.pyArgs	List.Args,   s    MM""6*""69+F+FG 	%%f- "'=  > 

!! # 	    c           
      ^   [         R                  " [        R                  R                  5      n[
        R                  UR                  [        R                  " U5      U5      n[        R                  " SUR                  R                  UUR                  SUR                  SS9nS U 5       $ )Nz)The following batches are unreachable: %sbatchespageSize)limitfield
batch_sizebatch_size_attributec              3   N   #    U  H  n[         R                  " U5      v   M     g 7f)N)r   DisplayHelper).0jobs     r    	<genexpr>List.Run.<locals>.<genexpr>\   s     >#N((--s   #%)dpDataprocr
   ReleaseTrackGAr   
GetRequestmessagesr	   ParseProjectsLocations YieldFromListWithUnreachableListclientprojects_locations_batchesr'   	page_size)selfargsr   requestjobss        r    RunList.RunL   s    {{4,,//0Hooh//"99(C"$G 00322jj>>'D ?>>r#   c                     S nUR                   (       a  UR                   nS Ul         U R                  UUR                  UR                  5       S9$ )N)filterr&   parent)rC   +DataprocProjectsLocationsBatchesListRequestr;   RelativeName)r6   resourcer=   backend_filters       r    r5   List.GetRequest^   sO     N{{{{ndk??$$& @ ( (r#    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr!   r@   r5   __static_attributes__rJ   r#   r    r   r      s4    
 	 	>?$ 
( 
(r#   r   N)rO   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   r1   r   r	   googlecloudsdk.callioper
   #googlecloudsdk.command_lib.dataprocr   ReleaseTracksr3   BETAr4   ListCommandr   rJ   r#   r    <module>rY      so      &  ' 5 : : 0 ( 5 D%%**D,=,=,@,@AJ(4 J( BJ(r#   