
    v                     P    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 Z
d Zy	)
z?A library containing resource args used by Transcoder commands.    )absolute_import)division)unicode_literals)
exceptions)filesc                     ||S | 	 t        j                  |       S y# t         j                  $ r*}t        j                  dj                  | |            d}~ww xY w)zGet job or template data.NzFailed to read {}, {})r   ReadFileContentsErrorcalliope_exceptionsBadFileExceptionformat)	file_pathcontentes      1lib/googlecloudsdk/command_lib/transcoder/util.py
GetContentr      sm     NH##I..
 
	 ;; H001H28&A2FH HHs    A%AAc                     d}| j                   -| j                  !| j                  }| j                  }|d}n|d}|4t	        j
                  dj                  |      dj                  |            y)z(Valid parameters for create job command.Nz	input-uriz
output-uriz--{}z0{} is required when using template to create job)filejson	input_uri
output_urir   RequiredArgumentExceptionr   )argsmissingr   r   s       r   ValidateCreateJobArgumentsr   *   s~     '	YY499,IJg		g

7
7g:AA'JL L     N)__doc__
__future__r   r   r   googlecloudsdk.callioper   r   googlecloudsdk.core.utilr   r   r    r   r   <module>r"      s%     F &  ' E * Lr   