
                         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r	S r
S	 r\R                  " \R                  R                  5      \R                   " S
 S\R                   5      5       5       r\R                  " \R                  R$                  5       " S S\5      5       rg)z9Implementation of list command for batch operations jobs.    )absolute_import)division)unicode_literals)storage_batch_operations_api)baseglobalc                 @    0 n/ SQnU H  nX0;   d  M
  X   X'   Us  $    g)zTransform for the TRANSFORMATION field in the table output.

TRANSFORMATION is generated from the oneof field transformation.

Args:
  job: job dictionary for transform

Returns:
  A dictionary of the transformation type and its values.
)putObjectHolddeleteObjectputMetadatarewriteObjectN )jobtransformationtransform_types	transforms       1lib/surface/storage/batch_operations/jobs/list.py_TransformTransformationr      s2     ./ #i"%.n #    c                 &    U R                  SS5      $ )z4Transform for the DRY_RUN field in the table output.dry_runF)get)r   s    r   _TransformDryRunr   3   s    	E	""r   c                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
List8   List batch-operations jobs.(
      List batch operation jobs.
      a<  
      To list all batch jobs:

          $ {command}

      To list all batch jobs with a page size of `10`:

          $ {command} --page-size=10

      To list a limit of `20` batch jobs:

          $ {command} --limit=20

      To list all batch jobs in `JSON` format:

          $ {command} --format=json
      DESCRIPTIONEXAMPLESc                     [         R                  R                  U 5        U R                  R	                  S5        U R                  R                  S[        05        g )Nae  
      table(
        name.basename():wrap=20:label=BATCH_JOB_ID,
        bucketList.buckets:wrap=20:label=SOURCE,
        transformation():wrap=20:label=TRANSFORMATION,
        createTime:wrap=20:label=CREATE_TIME,
        counters:wrap=20:label=COUNTERS,
        errorSummaries:wrap=20:label=ERROR_SUMMARIES,
        state:wrap=20:label=STATE
      )
    r   )r   URI_FLAGRemoveFromParserdisplay_info	AddFormatAddTransformsr   parsers    r   Args	List.ArgsT   sN    MM""6*
!! 
# 
	 %%2' r   c                 ~    [         R                  " 5       R                  [        UR                  UR
                  5      $ )N)r   StorageBatchOperationsApilist_batch_jobs_SBO_CLH_LOCATION_GLOBALlimit	page_size)selfargss     r   RunList.Runf   s-    'AACSS $**dnn r   r   N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr*   r4   __static_attributes__r   r   r   r   r   8   s1     $

	-.  "r   r   c                   2    \ rS rSrSrSSS.r\S 5       rSrg)		ListAlphal   r   r   a  
      To list all batch jobs:

          $ {command}

      To list all batch jobs that are `not` dry run:

          $ {command} --filter="dry_run=false"

      To list all batch jobs with a page size of `10`:

          $ {command} --page-size=10

      To list a limit of `20` batch jobs:

          $ {command} --limit=20

      To list all batch jobs in `JSON` format:

          $ {command} --format=json
      r   c                     [         R                  R                  U 5        U R                  R	                  S5        U R                  R                  [        [        S.5        g )Na  
      table(
        name.basename():wrap=20:label=BATCH_JOB_ID,
        dryrun():wrap=20:label=DRY_RUN,
        bucketList.buckets:wrap=20:label=SOURCE,
        transformation():wrap=20:label=TRANSFORMATION,
        createTime:wrap=20:label=CREATE_TIME,
        counters:wrap=20:label=COUNTERS,
        errorSummaries:wrap=20:label=ERROR_SUMMARIES,
        state:wrap=20:label=STATE
      )
    )r   dryrun)r   r#   r$   r%   r&   r'   r   r   r(   s    r   r*   ListAlpha.Args   sN    MM""6*
!! # 	 %%2"' r   r   N)	r6   r7   r8   r9   r:   r;   r<   r*   r=   r   r   r   r?   r?   l   s*    #

	-6  r   r?   N)r:   
__future__r   r   r   googlecloudsdk.api_lib.storager   googlecloudsdk.callioper   r/   r   r   ReleaseTracksReleaseTrackGADefaultUniverseOnlyListCommandr   ALPHAr?   r   r   r   <module>rM      s    @ &  ' G (# 0#
 D%%(()/4 /  */d D%%++,0 0 -0r   