
    
                        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                  " \
R                   R"                  5      \
R$                   " S
 S\
R&                  5      5       5       rg)zGImplementation of gcloud dataflow jobs resume-unsupported-sdk command.
    )absolute_import)division)unicode_literals)apis)
exceptions)base)	job_utils)logc                   .    \ rS rSrSr\S 5       rS rSrg)Resume   zwResumes job running with the specified job id.

Resumes a pipeline job which is running on an unsupported SDK version.
c                 R    [         R                  " U 5        U R                  SSSS9  g)z Register flags for this command.z--tokenz#The resume token unique to the job.T)helprequiredN)r	   ArgsForJobRefadd_argument)parsers    3lib/surface/dataflow/jobs/resume_unsupported_sdk.pyArgsResume.Args&   s.     F#
3      c           	      @   [         R                  " U5      n [        R                  R	                  UR
                  SUR                  -   UR                  UR                  S9  [        R                  R                  SR                  UR
                  5      5        g! [        R                   am  n[        R                  R                  SR                  UR
                  UR                  R                   UR                  UR                  5      5         SnAgSnAff = f)zThis is what gets called when the user runs this command.

Args:
  args: all the arguments that were provided to this command invocation.
z)unsupported_sdk_temporary_override_token=)
project_id	region_idzResuming job running on unsupported SDK version [{0}]. This job may be cancelled in the future. For more details, see https://cloud.google.com/dataflow/docs/support/sdk-version-support-status.zFailed to resume job [{0}]: {1} Ensure that you have permission to access the job, the `--region` flag, {2}, is correct for the job and the `--token` flag, {3}, corresponds to the job.N)r	   ExtractJobRefr   JobsResumeUnsupportedSDKjobIdtoken	projectIdlocationr
   statusPrintformatr   HttpExceptionpayloadstatus_message)selfargsjob_referrors       r   Run
Resume.Run0   s     %%d+G
ii$$
--
5


B&&$$	 % &
 
jj = >DV"==>*+
 ## 	jjI Fmmmm**jj	 s   BB D0A#DD N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r,   __static_attributes__r.   r   r   r   r      s     
  r   r   N)r3   
__future__r   r   r   googlecloudsdk.api_lib.dataflowr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataflowr	   googlecloudsdk.corer
   ReleaseTracksReleaseTrackALPHADefaultUniverseOnlyCommandr   r.   r   r   <module>rA      sh     '  ' 0 2 ( 9 # D%%++,.T\\ .  -.r   