aws-sdk-mediaconvert 1.70.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 CreateQueueInput {
    /// Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, specify the number of jobs you can process concurrently in your reservation plan instead.
    pub concurrent_jobs: ::std::option::Option<i32>,
    /// Optional. A description of the queue that you are creating.
    pub description: ::std::option::Option<::std::string::String>,
    /// The name of the queue that you are creating.
    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. When you use the API to create a queue, the default is on-demand.
    pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub reservation_plan_settings: ::std::option::Option<crate::types::ReservationPlanSettings>,
    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
    pub status: ::std::option::Option<crate::types::QueueStatus>,
    /// 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 CreateQueueInput {
    /// Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, specify the number of jobs you can process concurrently in your reservation plan instead.
    pub fn concurrent_jobs(&self) -> ::std::option::Option<i32> {
        self.concurrent_jobs
    }
    /// Optional. A description of the queue that you are creating.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The name of the queue that you are creating.
    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. When you use the API to create a queue, the default is on-demand.
    pub fn pricing_plan(&self) -> ::std::option::Option<&crate::types::PricingPlan> {
        self.pricing_plan.as_ref()
    }
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub fn reservation_plan_settings(&self) -> ::std::option::Option<&crate::types::ReservationPlanSettings> {
        self.reservation_plan_settings.as_ref()
    }
    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
    pub fn status(&self) -> ::std::option::Option<&crate::types::QueueStatus> {
        self.status.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 CreateQueueInput {
    /// Creates a new builder-style object to manufacture [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
    pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
        crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
    }
}

/// A builder for [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateQueueInputBuilder {
    pub(crate) concurrent_jobs: ::std::option::Option<i32>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
    pub(crate) reservation_plan_settings: ::std::option::Option<crate::types::ReservationPlanSettings>,
    pub(crate) status: ::std::option::Option<crate::types::QueueStatus>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateQueueInputBuilder {
    /// Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, specify the number of jobs you can process concurrently in your reservation plan instead.
    pub fn concurrent_jobs(mut self, input: i32) -> Self {
        self.concurrent_jobs = ::std::option::Option::Some(input);
        self
    }
    /// Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, specify the number of jobs you can process concurrently in your reservation plan instead.
    pub fn set_concurrent_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
        self.concurrent_jobs = input;
        self
    }
    /// Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, specify the number of jobs you can process concurrently in your reservation plan instead.
    pub fn get_concurrent_jobs(&self) -> &::std::option::Option<i32> {
        &self.concurrent_jobs
    }
    /// Optional. A description of the queue that 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 queue that 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 queue that you are creating.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The name of the queue that 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 queue that 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 queue that you are creating.
    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. When you use the API to create a queue, the default is on-demand.
    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. When you use the API to create a queue, the default is on-demand.
    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. When you use the API to create a queue, the default is on-demand.
    pub fn get_pricing_plan(&self) -> &::std::option::Option<crate::types::PricingPlan> {
        &self.pricing_plan
    }
    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
    pub fn reservation_plan_settings(mut self, input: crate::types::ReservationPlanSettings) -> Self {
        self.reservation_plan_settings = ::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_settings(mut self, input: ::std::option::Option<crate::types::ReservationPlanSettings>) -> Self {
        self.reservation_plan_settings = 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_settings(&self) -> &::std::option::Option<crate::types::ReservationPlanSettings> {
        &self.reservation_plan_settings
    }
    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
    pub fn status(mut self, input: crate::types::QueueStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::QueueStatus>) -> Self {
        self.status = input;
        self
    }
    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
    pub fn get_status(&self) -> &::std::option::Option<crate::types::QueueStatus> {
        &self.status
    }
    /// 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 [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
            concurrent_jobs: self.concurrent_jobs,
            description: self.description,
            name: self.name,
            pricing_plan: self.pricing_plan,
            reservation_plan_settings: self.reservation_plan_settings,
            status: self.status,
            tags: self.tags,
        })
    }
}