aws-sdk-mediaconvert 1.102.0

AWS SDK for AWS Elemental MediaConvert
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// You can use queues to manage the resources that are available to your AWS account for running multiple transcoding jobs at the same time. If you don't specify a queue, the service sends all jobs through the default queue. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Queue {
    /// An identifier for this resource that is unique within all of AWS.
    pub arn: ::std::option::Option<::std::string::String>,
    /// The maximum number of jobs your queue can process concurrently.
    pub concurrent_jobs: ::std::option::Option<i32>,
    /// The timestamp in epoch seconds for when you created the queue.
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// An optional description that you create for each queue.
    pub description: ::std::option::Option<::std::string::String>,
    /// The timestamp in epoch seconds for when you most recently updated the queue.
    pub last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// A name that you create for each queue. Each name must be unique within your account.
    pub name: ::std::option::Option<::std::string::String>,
    /// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
    pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
    /// The estimated number of jobs with a PROGRESSING status.
    pub progressing_jobs_count: ::std::option::Option<i32>,
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub reservation_plan: ::std::option::Option<crate::types::ReservationPlan>,
    /// A list of any service overrides applied by MediaConvert to the settings that you have configured. If you see any overrides, we recommend that you contact AWS Support.
    pub service_overrides: ::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>>,
    /// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
    pub status: ::std::option::Option<crate::types::QueueStatus>,
    /// The estimated number of jobs with a SUBMITTED status.
    pub submitted_jobs_count: ::std::option::Option<i32>,
    /// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
    pub r#type: ::std::option::Option<crate::types::Type>,
}
impl Queue {
    /// An identifier for this resource that is unique within all of AWS.
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// The maximum number of jobs your queue can process concurrently.
    pub fn concurrent_jobs(&self) -> ::std::option::Option<i32> {
        self.concurrent_jobs
    }
    /// The timestamp in epoch seconds for when you created the queue.
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// An optional description that you create for each queue.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The timestamp in epoch seconds for when you most recently updated the queue.
    pub fn last_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated.as_ref()
    }
    /// A name that you create for each queue. Each name must be unique within your account.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
    pub fn pricing_plan(&self) -> ::std::option::Option<&crate::types::PricingPlan> {
        self.pricing_plan.as_ref()
    }
    /// The estimated number of jobs with a PROGRESSING status.
    pub fn progressing_jobs_count(&self) -> ::std::option::Option<i32> {
        self.progressing_jobs_count
    }
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub fn reservation_plan(&self) -> ::std::option::Option<&crate::types::ReservationPlan> {
        self.reservation_plan.as_ref()
    }
    /// A list of any service overrides applied by MediaConvert to the settings that you have configured. If you see any overrides, we recommend that you contact AWS Support.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.service_overrides.is_none()`.
    pub fn service_overrides(&self) -> &[crate::types::ServiceOverride] {
        self.service_overrides.as_deref().unwrap_or_default()
    }
    /// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
    pub fn status(&self) -> ::std::option::Option<&crate::types::QueueStatus> {
        self.status.as_ref()
    }
    /// The estimated number of jobs with a SUBMITTED status.
    pub fn submitted_jobs_count(&self) -> ::std::option::Option<i32> {
        self.submitted_jobs_count
    }
    /// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
        self.r#type.as_ref()
    }
}
impl Queue {
    /// Creates a new builder-style object to manufacture [`Queue`](crate::types::Queue).
    pub fn builder() -> crate::types::builders::QueueBuilder {
        crate::types::builders::QueueBuilder::default()
    }
}

/// A builder for [`Queue`](crate::types::Queue).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct QueueBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) concurrent_jobs: ::std::option::Option<i32>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
    pub(crate) progressing_jobs_count: ::std::option::Option<i32>,
    pub(crate) reservation_plan: ::std::option::Option<crate::types::ReservationPlan>,
    pub(crate) service_overrides: ::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>>,
    pub(crate) status: ::std::option::Option<crate::types::QueueStatus>,
    pub(crate) submitted_jobs_count: ::std::option::Option<i32>,
    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
}
impl QueueBuilder {
    /// An identifier for this resource that is unique within all of AWS.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// An identifier for this resource that is unique within all of AWS.
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// An identifier for this resource that is unique within all of AWS.
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// The maximum number of jobs your queue can process concurrently.
    pub fn concurrent_jobs(mut self, input: i32) -> Self {
        self.concurrent_jobs = ::std::option::Option::Some(input);
        self
    }
    /// The maximum number of jobs your queue can process concurrently.
    pub fn set_concurrent_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
        self.concurrent_jobs = input;
        self
    }
    /// The maximum number of jobs your queue can process concurrently.
    pub fn get_concurrent_jobs(&self) -> &::std::option::Option<i32> {
        &self.concurrent_jobs
    }
    /// The timestamp in epoch seconds for when you created the queue.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// The timestamp in epoch seconds for when you created the queue.
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// The timestamp in epoch seconds for when you created the queue.
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// An optional description that you create for each queue.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// An optional description that you create for each queue.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// An optional description that you create for each queue.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The timestamp in epoch seconds for when you most recently updated the queue.
    pub fn last_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated = ::std::option::Option::Some(input);
        self
    }
    /// The timestamp in epoch seconds for when you most recently updated the queue.
    pub fn set_last_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated = input;
        self
    }
    /// The timestamp in epoch seconds for when you most recently updated the queue.
    pub fn get_last_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated
    }
    /// A name that you create for each queue. Each name must be unique within your account.
    /// 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
    }
    /// A name that you create for each queue. Each name must be unique within your account.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// A name that you create for each queue. Each name must be unique within your account.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
    pub fn pricing_plan(mut self, input: crate::types::PricingPlan) -> Self {
        self.pricing_plan = ::std::option::Option::Some(input);
        self
    }
    /// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
    pub fn set_pricing_plan(mut self, input: ::std::option::Option<crate::types::PricingPlan>) -> Self {
        self.pricing_plan = input;
        self
    }
    /// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
    pub fn get_pricing_plan(&self) -> &::std::option::Option<crate::types::PricingPlan> {
        &self.pricing_plan
    }
    /// The estimated number of jobs with a PROGRESSING status.
    pub fn progressing_jobs_count(mut self, input: i32) -> Self {
        self.progressing_jobs_count = ::std::option::Option::Some(input);
        self
    }
    /// The estimated number of jobs with a PROGRESSING status.
    pub fn set_progressing_jobs_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.progressing_jobs_count = input;
        self
    }
    /// The estimated number of jobs with a PROGRESSING status.
    pub fn get_progressing_jobs_count(&self) -> &::std::option::Option<i32> {
        &self.progressing_jobs_count
    }
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub fn reservation_plan(mut self, input: crate::types::ReservationPlan) -> Self {
        self.reservation_plan = ::std::option::Option::Some(input);
        self
    }
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub fn set_reservation_plan(mut self, input: ::std::option::Option<crate::types::ReservationPlan>) -> Self {
        self.reservation_plan = input;
        self
    }
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub fn get_reservation_plan(&self) -> &::std::option::Option<crate::types::ReservationPlan> {
        &self.reservation_plan
    }
    /// Appends an item to `service_overrides`.
    ///
    /// To override the contents of this collection use [`set_service_overrides`](Self::set_service_overrides).
    ///
    /// A list of any service overrides applied by MediaConvert to the settings that you have configured. If you see any overrides, we recommend that you contact AWS Support.
    pub fn service_overrides(mut self, input: crate::types::ServiceOverride) -> Self {
        let mut v = self.service_overrides.unwrap_or_default();
        v.push(input);
        self.service_overrides = ::std::option::Option::Some(v);
        self
    }
    /// A list of any service overrides applied by MediaConvert to the settings that you have configured. If you see any overrides, we recommend that you contact AWS Support.
    pub fn set_service_overrides(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>>) -> Self {
        self.service_overrides = input;
        self
    }
    /// A list of any service overrides applied by MediaConvert to the settings that you have configured. If you see any overrides, we recommend that you contact AWS Support.
    pub fn get_service_overrides(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>> {
        &self.service_overrides
    }
    /// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
    pub fn status(mut self, input: crate::types::QueueStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::QueueStatus>) -> Self {
        self.status = input;
        self
    }
    /// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
    pub fn get_status(&self) -> &::std::option::Option<crate::types::QueueStatus> {
        &self.status
    }
    /// The estimated number of jobs with a SUBMITTED status.
    pub fn submitted_jobs_count(mut self, input: i32) -> Self {
        self.submitted_jobs_count = ::std::option::Option::Some(input);
        self
    }
    /// The estimated number of jobs with a SUBMITTED status.
    pub fn set_submitted_jobs_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.submitted_jobs_count = input;
        self
    }
    /// The estimated number of jobs with a SUBMITTED status.
    pub fn get_submitted_jobs_count(&self) -> &::std::option::Option<i32> {
        &self.submitted_jobs_count
    }
    /// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
    pub fn r#type(mut self, input: crate::types::Type) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
        self.r#type = input;
        self
    }
    /// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
        &self.r#type
    }
    /// Consumes the builder and constructs a [`Queue`](crate::types::Queue).
    pub fn build(self) -> crate::types::Queue {
        crate::types::Queue {
            arn: self.arn,
            concurrent_jobs: self.concurrent_jobs,
            created_at: self.created_at,
            description: self.description,
            last_updated: self.last_updated,
            name: self.name,
            pricing_plan: self.pricing_plan,
            progressing_jobs_count: self.progressing_jobs_count,
            reservation_plan: self.reservation_plan,
            service_overrides: self.service_overrides,
            status: self.status,
            submitted_jobs_count: self.submitted_jobs_count,
            r#type: self.r#type,
        }
    }
}