#[non_exhaustive]pub struct Job {Show 15 fields
pub name: String,
pub input_uri: String,
pub output_uri: String,
pub state: ProcessingState,
pub create_time: Option<Timestamp>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub ttl_after_completion_days: i32,
pub labels: HashMap<String, String>,
pub error: Option<Status>,
pub mode: ProcessingMode,
pub batch_mode_priority: i32,
pub optimization: OptimizationStrategy,
pub fill_content_gaps: bool,
pub job_config: Option<JobConfig>,
/* private fields */
}
Expand description
Transcoding job resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The resource name of the job.
Format: projects/{project_number}/locations/{location}/jobs/{job}
input_uri: String
Input only. Specify the input_uri
to populate empty uri
fields in each
element of Job.config.inputs
or JobTemplate.config.inputs
when using
template. URI of the media. Input files must be at least 5 seconds in
duration and stored in Cloud Storage (for example,
gs://bucket/inputs/file.mp4
). See Supported input and output
formats.
output_uri: String
Input only. Specify the output_uri
to populate an empty
Job.config.output.uri
or JobTemplate.config.output.uri
when using
template. URI for the output file(s). For example,
gs://my-bucket/outputs/
. See Supported input and output
formats.
state: ProcessingState
Output only. The current state of the job.
create_time: Option<Timestamp>
Output only. The time the job was created.
start_time: Option<Timestamp>
Output only. The time the transcoding started.
end_time: Option<Timestamp>
Output only. The time the transcoding finished.
ttl_after_completion_days: i32
Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30.
labels: HashMap<String, String>
The labels associated with this job. You can use these to organize and group your jobs.
error: Option<Status>
Output only. An error object that describes the reason for the failure.
This property is always present when
ProcessingState is
FAILED
.
mode: ProcessingMode
The processing mode of the job.
The default is PROCESSING_MODE_INTERACTIVE
.
batch_mode_priority: i32
The processing priority of a batch job. This field can only be set for batch mode jobs. The default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job.
optimization: OptimizationStrategy
Optional. The optimization strategy of the job. The default is
AUTODETECT
.
fill_content_gaps: bool
Optional. Insert silence and duplicate frames when timestamp gaps are detected in a given stream.
job_config: Option<JobConfig>
Specify the config for the transcoding job. If you don’t specify the
job_config
, the API selects templateId
; this template ID is set to
preset/web-hd
by default. When you use a template_id
to create a job,
the Job.config
is populated by the JobTemplate.config
.<br>
Implementations§
Source§impl Job
impl Job
pub fn new() -> Self
Sourcepub fn set_input_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_input_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of input_uri.
Sourcepub fn set_output_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_output_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of output_uri.
Sourcepub fn set_state<T: Into<ProcessingState>>(self, v: T) -> Self
pub fn set_state<T: Into<ProcessingState>>(self, v: T) -> Self
Sets the value of state.
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sets the value of end_time.
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of end_time.
Sourcepub fn set_ttl_after_completion_days<T: Into<i32>>(self, v: T) -> Self
pub fn set_ttl_after_completion_days<T: Into<i32>>(self, v: T) -> Self
Sets the value of ttl_after_completion_days.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
Sets or clears the value of error.
Sourcepub fn set_mode<T: Into<ProcessingMode>>(self, v: T) -> Self
pub fn set_mode<T: Into<ProcessingMode>>(self, v: T) -> Self
Sets the value of mode.
Sourcepub fn set_batch_mode_priority<T: Into<i32>>(self, v: T) -> Self
pub fn set_batch_mode_priority<T: Into<i32>>(self, v: T) -> Self
Sets the value of batch_mode_priority.
Sourcepub fn set_optimization<T: Into<OptimizationStrategy>>(self, v: T) -> Self
pub fn set_optimization<T: Into<OptimizationStrategy>>(self, v: T) -> Self
Sets the value of optimization.
Sourcepub fn set_fill_content_gaps<T: Into<bool>>(self, v: T) -> Self
pub fn set_fill_content_gaps<T: Into<bool>>(self, v: T) -> Self
Sets the value of fill_content_gaps.
Sourcepub fn set_job_config<T: Into<Option<JobConfig>>>(self, v: T) -> Self
pub fn set_job_config<T: Into<Option<JobConfig>>>(self, v: T) -> Self
Sets the value of job_config.
Note that all the setters affecting job_config
are mutually
exclusive.
Sourcepub fn template_id(&self) -> Option<&String>
pub fn template_id(&self) -> Option<&String>
The value of job_config
if it holds a TemplateId
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_template_id<T: Into<String>>(self, v: T) -> Self
pub fn set_template_id<T: Into<String>>(self, v: T) -> Self
Sets the value of job_config
to hold a TemplateId
.
Note that all the setters affecting job_config
are
mutually exclusive.
Sourcepub fn config(&self) -> Option<&Box<JobConfig>>
pub fn config(&self) -> Option<&Box<JobConfig>>
The value of job_config
if it holds a Config
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_config<T: Into<Box<JobConfig>>>(self, v: T) -> Self
pub fn set_config<T: Into<Box<JobConfig>>>(self, v: T) -> Self
Sets the value of job_config
to hold a Config
.
Note that all the setters affecting job_config
are
mutually exclusive.