
    @                         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)Command to list Cloud Dataflow snapshots.    )absolute_import)division)unicode_literals)apis)base)dataflow_util)snapshot_utils)
propertiesc                   0    e Zd ZdZdddZed        Zd Zy)ListzfList all Cloud Dataflow snapshots in a project in the specified region, optionally filtered by job ID.z{description}a            To list all Cloud Dataflow snapshots in the us-central1 region, run:

            $ {command} --region=us-central1

          To list all Cloud Dataflow snapshots for a job, run:

            $ {command} --job-id=JOB_ID --region=JOB_REGION
          )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y)zrRegister flags for this command.

    Args:
      parser: argparse.ArgumentParser to register arguments with.
    N)r	   ArgsForListSnapshot)parsers    &lib/surface/dataflow/snapshots/list.pyArgsz	List.Args.   s     &&v.    c                     t         j                  j                  |j                  t        j
                  j                  j                  j                         t        j                  |            S )zRuns the command.

    Args:
      args: The arguments that were provided to this command invocation.

    Returns:
      A Snapshot message.
    )job_id
project_id	region_id)r   	Snapshotsr   r   r
   VALUEScoreproject	GetOrFailr   	GetRegion)selfargss     r   RunzList.Run7   sS     >>{{$$))11;;=))$/  1 1r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r!    r   r   r   r      s/    n 	- / /1r   r   N)r%   
__future__r   r   r   googlecloudsdk.api_lib.dataflowr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataflowr   r	   googlecloudsdk.corer
   Commandr   r(   r   r   <module>r/      s2    0 &  ' 0 ( = > *'14<< '1r   