Skip to main content

aws_sdk_mediaconvert/operation/create_queue/
_create_queue_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateQueueInput {
6    /// 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.
7    pub concurrent_jobs: ::std::option::Option<i32>,
8    /// Optional. A description of the queue that you are creating.
9    pub description: ::std::option::Option<::std::string::String>,
10    /// Specify the maximum number of Elemental Inference feeds MediaConvert can process concurrently.
11    pub maximum_concurrent_feeds: ::std::option::Option<i32>,
12    /// The name of the queue that you are creating.
13    pub name: ::std::option::Option<::std::string::String>,
14    /// 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.
15    pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
16    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
17    pub reservation_plan_settings: ::std::option::Option<crate::types::ReservationPlanSettings>,
18    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
19    pub status: ::std::option::Option<crate::types::QueueStatus>,
20    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22}
23impl CreateQueueInput {
24    /// 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.
25    pub fn concurrent_jobs(&self) -> ::std::option::Option<i32> {
26        self.concurrent_jobs
27    }
28    /// Optional. A description of the queue that you are creating.
29    pub fn description(&self) -> ::std::option::Option<&str> {
30        self.description.as_deref()
31    }
32    /// Specify the maximum number of Elemental Inference feeds MediaConvert can process concurrently.
33    pub fn maximum_concurrent_feeds(&self) -> ::std::option::Option<i32> {
34        self.maximum_concurrent_feeds
35    }
36    /// The name of the queue that you are creating.
37    pub fn name(&self) -> ::std::option::Option<&str> {
38        self.name.as_deref()
39    }
40    /// 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.
41    pub fn pricing_plan(&self) -> ::std::option::Option<&crate::types::PricingPlan> {
42        self.pricing_plan.as_ref()
43    }
44    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
45    pub fn reservation_plan_settings(&self) -> ::std::option::Option<&crate::types::ReservationPlanSettings> {
46        self.reservation_plan_settings.as_ref()
47    }
48    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
49    pub fn status(&self) -> ::std::option::Option<&crate::types::QueueStatus> {
50        self.status.as_ref()
51    }
52    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
53    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
54        self.tags.as_ref()
55    }
56}
57impl CreateQueueInput {
58    /// Creates a new builder-style object to manufacture [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
59    pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
60        crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
61    }
62}
63
64/// A builder for [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct CreateQueueInputBuilder {
68    pub(crate) concurrent_jobs: ::std::option::Option<i32>,
69    pub(crate) description: ::std::option::Option<::std::string::String>,
70    pub(crate) maximum_concurrent_feeds: ::std::option::Option<i32>,
71    pub(crate) name: ::std::option::Option<::std::string::String>,
72    pub(crate) pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
73    pub(crate) reservation_plan_settings: ::std::option::Option<crate::types::ReservationPlanSettings>,
74    pub(crate) status: ::std::option::Option<crate::types::QueueStatus>,
75    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
76}
77impl CreateQueueInputBuilder {
78    /// 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.
79    pub fn concurrent_jobs(mut self, input: i32) -> Self {
80        self.concurrent_jobs = ::std::option::Option::Some(input);
81        self
82    }
83    /// 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.
84    pub fn set_concurrent_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
85        self.concurrent_jobs = input;
86        self
87    }
88    /// 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.
89    pub fn get_concurrent_jobs(&self) -> &::std::option::Option<i32> {
90        &self.concurrent_jobs
91    }
92    /// Optional. A description of the queue that you are creating.
93    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.description = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// Optional. A description of the queue that you are creating.
98    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.description = input;
100        self
101    }
102    /// Optional. A description of the queue that you are creating.
103    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
104        &self.description
105    }
106    /// Specify the maximum number of Elemental Inference feeds MediaConvert can process concurrently.
107    pub fn maximum_concurrent_feeds(mut self, input: i32) -> Self {
108        self.maximum_concurrent_feeds = ::std::option::Option::Some(input);
109        self
110    }
111    /// Specify the maximum number of Elemental Inference feeds MediaConvert can process concurrently.
112    pub fn set_maximum_concurrent_feeds(mut self, input: ::std::option::Option<i32>) -> Self {
113        self.maximum_concurrent_feeds = input;
114        self
115    }
116    /// Specify the maximum number of Elemental Inference feeds MediaConvert can process concurrently.
117    pub fn get_maximum_concurrent_feeds(&self) -> &::std::option::Option<i32> {
118        &self.maximum_concurrent_feeds
119    }
120    /// The name of the queue that you are creating.
121    /// This field is required.
122    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.name = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// The name of the queue that you are creating.
127    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.name = input;
129        self
130    }
131    /// The name of the queue that you are creating.
132    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
133        &self.name
134    }
135    /// 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.
136    pub fn pricing_plan(mut self, input: crate::types::PricingPlan) -> Self {
137        self.pricing_plan = ::std::option::Option::Some(input);
138        self
139    }
140    /// 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.
141    pub fn set_pricing_plan(mut self, input: ::std::option::Option<crate::types::PricingPlan>) -> Self {
142        self.pricing_plan = input;
143        self
144    }
145    /// 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.
146    pub fn get_pricing_plan(&self) -> &::std::option::Option<crate::types::PricingPlan> {
147        &self.pricing_plan
148    }
149    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
150    pub fn reservation_plan_settings(mut self, input: crate::types::ReservationPlanSettings) -> Self {
151        self.reservation_plan_settings = ::std::option::Option::Some(input);
152        self
153    }
154    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
155    pub fn set_reservation_plan_settings(mut self, input: ::std::option::Option<crate::types::ReservationPlanSettings>) -> Self {
156        self.reservation_plan_settings = input;
157        self
158    }
159    /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
160    pub fn get_reservation_plan_settings(&self) -> &::std::option::Option<crate::types::ReservationPlanSettings> {
161        &self.reservation_plan_settings
162    }
163    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
164    pub fn status(mut self, input: crate::types::QueueStatus) -> Self {
165        self.status = ::std::option::Option::Some(input);
166        self
167    }
168    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
169    pub fn set_status(mut self, input: ::std::option::Option<crate::types::QueueStatus>) -> Self {
170        self.status = input;
171        self
172    }
173    /// Initial state of the queue. If you create a paused queue, then jobs in that queue won't begin.
174    pub fn get_status(&self) -> &::std::option::Option<crate::types::QueueStatus> {
175        &self.status
176    }
177    /// Adds a key-value pair to `tags`.
178    ///
179    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
180    ///
181    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
182    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
183        let mut hash_map = self.tags.unwrap_or_default();
184        hash_map.insert(k.into(), v.into());
185        self.tags = ::std::option::Option::Some(hash_map);
186        self
187    }
188    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
189    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
190        self.tags = input;
191        self
192    }
193    /// The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key.
194    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
195        &self.tags
196    }
197    /// Consumes the builder and constructs a [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
198    pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
199        ::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
200            concurrent_jobs: self.concurrent_jobs,
201            description: self.description,
202            maximum_concurrent_feeds: self.maximum_concurrent_feeds,
203            name: self.name,
204            pricing_plan: self.pricing_plan,
205            reservation_plan_settings: self.reservation_plan_settings,
206            status: self.status,
207            tags: self.tags,
208        })
209    }
210}