aws-sdk-mediaconvert 1.43.0

AWS SDK for AWS Elemental MediaConvert
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateJobTemplateInput {
    /// Accelerated transcoding can significantly speed up jobs with long, visually complex content. Outputs that use this feature incur pro-tier pricing. For information about feature limitations, see the AWS Elemental MediaConvert User Guide.
    pub acceleration_settings: ::std::option::Option<crate::types::AccelerationSettings>,
    /// Optional. A category for the job template you are creating
    pub category: ::std::option::Option<::std::string::String>,
    /// Optional. A description of the job template you are creating.
    pub description: ::std::option::Option<::std::string::String>,
    /// Optional. Use queue hopping to avoid overly long waits in the backlog of the queue that you submit your job to. Specify an alternate queue and the maximum time that your job will wait in the initial queue before hopping. For more information about this feature, see the AWS Elemental MediaConvert User Guide.
    pub hop_destinations: ::std::option::Option<::std::vec::Vec<crate::types::HopDestination>>,
    /// The name of the job template you are creating.
    pub name: ::std::option::Option<::std::string::String>,
    /// Specify the relative priority for this job. In any given queue, the service begins processing the job with the highest value first. When more than one job has the same priority, the service begins processing the job that you submitted first. If you don't specify a priority, the service uses the default value 0.
    pub priority: ::std::option::Option<i32>,
    /// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
    pub queue: ::std::option::Option<::std::string::String>,
    /// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
    pub settings: ::std::option::Option<crate::types::JobTemplateSettings>,
    /// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
    pub status_update_interval: ::std::option::Option<crate::types::StatusUpdateInterval>,
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateJobTemplateInput {
    /// Accelerated transcoding can significantly speed up jobs with long, visually complex content. Outputs that use this feature incur pro-tier pricing. For information about feature limitations, see the AWS Elemental MediaConvert User Guide.
    pub fn acceleration_settings(&self) -> ::std::option::Option<&crate::types::AccelerationSettings> {
        self.acceleration_settings.as_ref()
    }
    /// Optional. A category for the job template you are creating
    pub fn category(&self) -> ::std::option::Option<&str> {
        self.category.as_deref()
    }
    /// Optional. A description of the job template you are creating.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// Optional. Use queue hopping to avoid overly long waits in the backlog of the queue that you submit your job to. Specify an alternate queue and the maximum time that your job will wait in the initial queue before hopping. For more information about this feature, see the AWS Elemental MediaConvert User Guide.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.hop_destinations.is_none()`.
    pub fn hop_destinations(&self) -> &[crate::types::HopDestination] {
        self.hop_destinations.as_deref().unwrap_or_default()
    }
    /// The name of the job template you are creating.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Specify the relative priority for this job. In any given queue, the service begins processing the job with the highest value first. When more than one job has the same priority, the service begins processing the job that you submitted first. If you don't specify a priority, the service uses the default value 0.
    pub fn priority(&self) -> ::std::option::Option<i32> {
        self.priority
    }
    /// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
    pub fn queue(&self) -> ::std::option::Option<&str> {
        self.queue.as_deref()
    }
    /// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
    pub fn settings(&self) -> ::std::option::Option<&crate::types::JobTemplateSettings> {
        self.settings.as_ref()
    }
    /// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
    pub fn status_update_interval(&self) -> ::std::option::Option<&crate::types::StatusUpdateInterval> {
        self.status_update_interval.as_ref()
    }
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateJobTemplateInput {
    /// Creates a new builder-style object to manufacture [`CreateJobTemplateInput`](crate::operation::create_job_template::CreateJobTemplateInput).
    pub fn builder() -> crate::operation::create_job_template::builders::CreateJobTemplateInputBuilder {
        crate::operation::create_job_template::builders::CreateJobTemplateInputBuilder::default()
    }
}

/// A builder for [`CreateJobTemplateInput`](crate::operation::create_job_template::CreateJobTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateJobTemplateInputBuilder {
    pub(crate) acceleration_settings: ::std::option::Option<crate::types::AccelerationSettings>,
    pub(crate) category: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) hop_destinations: ::std::option::Option<::std::vec::Vec<crate::types::HopDestination>>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) priority: ::std::option::Option<i32>,
    pub(crate) queue: ::std::option::Option<::std::string::String>,
    pub(crate) settings: ::std::option::Option<crate::types::JobTemplateSettings>,
    pub(crate) status_update_interval: ::std::option::Option<crate::types::StatusUpdateInterval>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateJobTemplateInputBuilder {
    /// Accelerated transcoding can significantly speed up jobs with long, visually complex content. Outputs that use this feature incur pro-tier pricing. For information about feature limitations, see the AWS Elemental MediaConvert User Guide.
    pub fn acceleration_settings(mut self, input: crate::types::AccelerationSettings) -> Self {
        self.acceleration_settings = ::std::option::Option::Some(input);
        self
    }
    /// Accelerated transcoding can significantly speed up jobs with long, visually complex content. Outputs that use this feature incur pro-tier pricing. For information about feature limitations, see the AWS Elemental MediaConvert User Guide.
    pub fn set_acceleration_settings(mut self, input: ::std::option::Option<crate::types::AccelerationSettings>) -> Self {
        self.acceleration_settings = input;
        self
    }
    /// Accelerated transcoding can significantly speed up jobs with long, visually complex content. Outputs that use this feature incur pro-tier pricing. For information about feature limitations, see the AWS Elemental MediaConvert User Guide.
    pub fn get_acceleration_settings(&self) -> &::std::option::Option<crate::types::AccelerationSettings> {
        &self.acceleration_settings
    }
    /// Optional. A category for the job template you are creating
    pub fn category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.category = ::std::option::Option::Some(input.into());
        self
    }
    /// Optional. A category for the job template you are creating
    pub fn set_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.category = input;
        self
    }
    /// Optional. A category for the job template you are creating
    pub fn get_category(&self) -> &::std::option::Option<::std::string::String> {
        &self.category
    }
    /// Optional. A description of the job template you are creating.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// Optional. A description of the job template you are creating.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// Optional. A description of the job template you are creating.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `hop_destinations`.
    ///
    /// To override the contents of this collection use [`set_hop_destinations`](Self::set_hop_destinations).
    ///
    /// Optional. Use queue hopping to avoid overly long waits in the backlog of the queue that you submit your job to. Specify an alternate queue and the maximum time that your job will wait in the initial queue before hopping. For more information about this feature, see the AWS Elemental MediaConvert User Guide.
    pub fn hop_destinations(mut self, input: crate::types::HopDestination) -> Self {
        let mut v = self.hop_destinations.unwrap_or_default();
        v.push(input);
        self.hop_destinations = ::std::option::Option::Some(v);
        self
    }
    /// Optional. Use queue hopping to avoid overly long waits in the backlog of the queue that you submit your job to. Specify an alternate queue and the maximum time that your job will wait in the initial queue before hopping. For more information about this feature, see the AWS Elemental MediaConvert User Guide.
    pub fn set_hop_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HopDestination>>) -> Self {
        self.hop_destinations = input;
        self
    }
    /// Optional. Use queue hopping to avoid overly long waits in the backlog of the queue that you submit your job to. Specify an alternate queue and the maximum time that your job will wait in the initial queue before hopping. For more information about this feature, see the AWS Elemental MediaConvert User Guide.
    pub fn get_hop_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HopDestination>> {
        &self.hop_destinations
    }
    /// The name of the job template you are creating.
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the job template you are creating.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of the job template you are creating.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Specify the relative priority for this job. In any given queue, the service begins processing the job with the highest value first. When more than one job has the same priority, the service begins processing the job that you submitted first. If you don't specify a priority, the service uses the default value 0.
    pub fn priority(mut self, input: i32) -> Self {
        self.priority = ::std::option::Option::Some(input);
        self
    }
    /// Specify the relative priority for this job. In any given queue, the service begins processing the job with the highest value first. When more than one job has the same priority, the service begins processing the job that you submitted first. If you don't specify a priority, the service uses the default value 0.
    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
        self.priority = input;
        self
    }
    /// Specify the relative priority for this job. In any given queue, the service begins processing the job with the highest value first. When more than one job has the same priority, the service begins processing the job that you submitted first. If you don't specify a priority, the service uses the default value 0.
    pub fn get_priority(&self) -> &::std::option::Option<i32> {
        &self.priority
    }
    /// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
    pub fn queue(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.queue = ::std::option::Option::Some(input.into());
        self
    }
    /// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
    pub fn set_queue(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.queue = input;
        self
    }
    /// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
    pub fn get_queue(&self) -> &::std::option::Option<::std::string::String> {
        &self.queue
    }
    /// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
    /// This field is required.
    pub fn settings(mut self, input: crate::types::JobTemplateSettings) -> Self {
        self.settings = ::std::option::Option::Some(input);
        self
    }
    /// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
    pub fn set_settings(mut self, input: ::std::option::Option<crate::types::JobTemplateSettings>) -> Self {
        self.settings = input;
        self
    }
    /// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
    pub fn get_settings(&self) -> &::std::option::Option<crate::types::JobTemplateSettings> {
        &self.settings
    }
    /// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
    pub fn status_update_interval(mut self, input: crate::types::StatusUpdateInterval) -> Self {
        self.status_update_interval = ::std::option::Option::Some(input);
        self
    }
    /// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
    pub fn set_status_update_interval(mut self, input: ::std::option::Option<crate::types::StatusUpdateInterval>) -> Self {
        self.status_update_interval = input;
        self
    }
    /// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
    pub fn get_status_update_interval(&self) -> &::std::option::Option<crate::types::StatusUpdateInterval> {
        &self.status_update_interval
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateJobTemplateInput`](crate::operation::create_job_template::CreateJobTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_job_template::CreateJobTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_job_template::CreateJobTemplateInput {
            acceleration_settings: self.acceleration_settings,
            category: self.category,
            description: self.description,
            hop_destinations: self.hop_destinations,
            name: self.name,
            priority: self.priority,
            queue: self.queue,
            settings: self.settings,
            status_update_interval: self.status_update_interval,
            tags: self.tags,
        })
    }
}