
    R	                         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
  ej                  ej                  j                  ej                  j                         G d d	ej                               Zy
)z9Implementation of gcloud dataflow jobs describe command.
    )absolute_import)division)unicode_literals)apis)base)	job_utilsc                   &    e Zd ZdZed        Zd Zy)Describea  Outputs the Job object resulting from the Get API.

  By default this will display the Summary view which includes:
    - Project ID
    - Regional Endpoint
    - Job ID
    - Job Name
    - Job Type (Batch vs. Streaming)
    - Job Create Time
    - Job Status (Running, Done, Cancelled, Failed)
    - Job Status Time

  Notable values that are only in the full view:
    - Environment (staging Jars, information about workers, etc.)
    - Steps from the workflow graph
  c                 
   t        j                  |        | j                  ddt        j                  j
                  j                  j                  t        j                  j
                  j                  j                  d       y)zrRegister flags for this command.

    Args:
      parser: argparse.ArgumentParser to register arguments with.
    z--fullstore_constz2Retrieve the full Job rather than the summary view)actionconstdefaulthelpN)	r   ArgsForJobRefadd_argumentr   JobsGET_REQUESTViewValueValuesEnumJOB_VIEW_ALLJOB_VIEW_SUMMARY)parsers    %lib/surface/dataflow/jobs/describe.pyArgszDescribe.Args/   sa     F#
ii##77DD		%%99JJA  C    c                     t        j                  |      }t        j                  j	                  |j
                  |j                  |j                  |j                        S )zRuns the command.

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

    Returns:
      A Job message.
    )
project_id	region_idview)	r   ExtractJobRefr   r   GetjobId	projectIdlocationfull)selfargsjob_refs      r   RunzDescribe.Run?   sN     %%d+G99==$$""YY	   r   N)__name__
__module____qualname____doc__staticmethodr   r)    r   r   r
   r
      s"    " C Cr   r
   N)r-   
__future__r   r   r   googlecloudsdk.api_lib.dataflowr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataflowr   ReleaseTracksReleaseTrackBETAGADescribeCommandr
   r/   r   r   <module>r9      sg     '  ' 0 ( 9 D%%**D,=,=,@,@A0t## 0 B0r   