aws_sdk_mediaconvert/types/_queue.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// 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.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Queue {
7 /// An identifier for this resource that is unique within all of AWS.
8 pub arn: ::std::option::Option<::std::string::String>,
9 /// The maximum number of jobs your queue can process concurrently.
10 pub concurrent_jobs: ::std::option::Option<i32>,
11 /// The timestamp in epoch seconds for when you created the queue.
12 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
13 /// An optional description that you create for each queue.
14 pub description: ::std::option::Option<::std::string::String>,
15 /// The timestamp in epoch seconds for when you most recently updated the queue.
16 pub last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
17 /// A name that you create for each queue. Each name must be unique within your account.
18 pub name: ::std::option::Option<::std::string::String>,
19 /// 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.
20 pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
21 /// The estimated number of jobs with a PROGRESSING status.
22 pub progressing_jobs_count: ::std::option::Option<i32>,
23 /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
24 pub reservation_plan: ::std::option::Option<crate::types::ReservationPlan>,
25 /// 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.
26 pub service_overrides: ::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>>,
27 /// 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.
28 pub status: ::std::option::Option<crate::types::QueueStatus>,
29 /// The estimated number of jobs with a SUBMITTED status.
30 pub submitted_jobs_count: ::std::option::Option<i32>,
31 /// 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.
32 pub r#type: ::std::option::Option<crate::types::Type>,
33}
34impl Queue {
35 /// An identifier for this resource that is unique within all of AWS.
36 pub fn arn(&self) -> ::std::option::Option<&str> {
37 self.arn.as_deref()
38 }
39 /// The maximum number of jobs your queue can process concurrently.
40 pub fn concurrent_jobs(&self) -> ::std::option::Option<i32> {
41 self.concurrent_jobs
42 }
43 /// The timestamp in epoch seconds for when you created the queue.
44 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
45 self.created_at.as_ref()
46 }
47 /// An optional description that you create for each queue.
48 pub fn description(&self) -> ::std::option::Option<&str> {
49 self.description.as_deref()
50 }
51 /// The timestamp in epoch seconds for when you most recently updated the queue.
52 pub fn last_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
53 self.last_updated.as_ref()
54 }
55 /// A name that you create for each queue. Each name must be unique within your account.
56 pub fn name(&self) -> ::std::option::Option<&str> {
57 self.name.as_deref()
58 }
59 /// 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.
60 pub fn pricing_plan(&self) -> ::std::option::Option<&crate::types::PricingPlan> {
61 self.pricing_plan.as_ref()
62 }
63 /// The estimated number of jobs with a PROGRESSING status.
64 pub fn progressing_jobs_count(&self) -> ::std::option::Option<i32> {
65 self.progressing_jobs_count
66 }
67 /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
68 pub fn reservation_plan(&self) -> ::std::option::Option<&crate::types::ReservationPlan> {
69 self.reservation_plan.as_ref()
70 }
71 /// 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.
72 ///
73 /// 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()`.
74 pub fn service_overrides(&self) -> &[crate::types::ServiceOverride] {
75 self.service_overrides.as_deref().unwrap_or_default()
76 }
77 /// 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.
78 pub fn status(&self) -> ::std::option::Option<&crate::types::QueueStatus> {
79 self.status.as_ref()
80 }
81 /// The estimated number of jobs with a SUBMITTED status.
82 pub fn submitted_jobs_count(&self) -> ::std::option::Option<i32> {
83 self.submitted_jobs_count
84 }
85 /// 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.
86 pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
87 self.r#type.as_ref()
88 }
89}
90impl Queue {
91 /// Creates a new builder-style object to manufacture [`Queue`](crate::types::Queue).
92 pub fn builder() -> crate::types::builders::QueueBuilder {
93 crate::types::builders::QueueBuilder::default()
94 }
95}
96
97/// A builder for [`Queue`](crate::types::Queue).
98#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
99#[non_exhaustive]
100pub struct QueueBuilder {
101 pub(crate) arn: ::std::option::Option<::std::string::String>,
102 pub(crate) concurrent_jobs: ::std::option::Option<i32>,
103 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
104 pub(crate) description: ::std::option::Option<::std::string::String>,
105 pub(crate) last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
106 pub(crate) name: ::std::option::Option<::std::string::String>,
107 pub(crate) pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
108 pub(crate) progressing_jobs_count: ::std::option::Option<i32>,
109 pub(crate) reservation_plan: ::std::option::Option<crate::types::ReservationPlan>,
110 pub(crate) service_overrides: ::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>>,
111 pub(crate) status: ::std::option::Option<crate::types::QueueStatus>,
112 pub(crate) submitted_jobs_count: ::std::option::Option<i32>,
113 pub(crate) r#type: ::std::option::Option<crate::types::Type>,
114}
115impl QueueBuilder {
116 /// An identifier for this resource that is unique within all of AWS.
117 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.arn = ::std::option::Option::Some(input.into());
119 self
120 }
121 /// An identifier for this resource that is unique within all of AWS.
122 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.arn = input;
124 self
125 }
126 /// An identifier for this resource that is unique within all of AWS.
127 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
128 &self.arn
129 }
130 /// The maximum number of jobs your queue can process concurrently.
131 pub fn concurrent_jobs(mut self, input: i32) -> Self {
132 self.concurrent_jobs = ::std::option::Option::Some(input);
133 self
134 }
135 /// The maximum number of jobs your queue can process concurrently.
136 pub fn set_concurrent_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
137 self.concurrent_jobs = input;
138 self
139 }
140 /// The maximum number of jobs your queue can process concurrently.
141 pub fn get_concurrent_jobs(&self) -> &::std::option::Option<i32> {
142 &self.concurrent_jobs
143 }
144 /// The timestamp in epoch seconds for when you created the queue.
145 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
146 self.created_at = ::std::option::Option::Some(input);
147 self
148 }
149 /// The timestamp in epoch seconds for when you created the queue.
150 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
151 self.created_at = input;
152 self
153 }
154 /// The timestamp in epoch seconds for when you created the queue.
155 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
156 &self.created_at
157 }
158 /// An optional description that you create for each queue.
159 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.description = ::std::option::Option::Some(input.into());
161 self
162 }
163 /// An optional description that you create for each queue.
164 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.description = input;
166 self
167 }
168 /// An optional description that you create for each queue.
169 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
170 &self.description
171 }
172 /// The timestamp in epoch seconds for when you most recently updated the queue.
173 pub fn last_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
174 self.last_updated = ::std::option::Option::Some(input);
175 self
176 }
177 /// The timestamp in epoch seconds for when you most recently updated the queue.
178 pub fn set_last_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
179 self.last_updated = input;
180 self
181 }
182 /// The timestamp in epoch seconds for when you most recently updated the queue.
183 pub fn get_last_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
184 &self.last_updated
185 }
186 /// A name that you create for each queue. Each name must be unique within your account.
187 /// This field is required.
188 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.name = ::std::option::Option::Some(input.into());
190 self
191 }
192 /// A name that you create for each queue. Each name must be unique within your account.
193 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.name = input;
195 self
196 }
197 /// A name that you create for each queue. Each name must be unique within your account.
198 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
199 &self.name
200 }
201 /// 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.
202 pub fn pricing_plan(mut self, input: crate::types::PricingPlan) -> Self {
203 self.pricing_plan = ::std::option::Option::Some(input);
204 self
205 }
206 /// 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.
207 pub fn set_pricing_plan(mut self, input: ::std::option::Option<crate::types::PricingPlan>) -> Self {
208 self.pricing_plan = input;
209 self
210 }
211 /// 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.
212 pub fn get_pricing_plan(&self) -> &::std::option::Option<crate::types::PricingPlan> {
213 &self.pricing_plan
214 }
215 /// The estimated number of jobs with a PROGRESSING status.
216 pub fn progressing_jobs_count(mut self, input: i32) -> Self {
217 self.progressing_jobs_count = ::std::option::Option::Some(input);
218 self
219 }
220 /// The estimated number of jobs with a PROGRESSING status.
221 pub fn set_progressing_jobs_count(mut self, input: ::std::option::Option<i32>) -> Self {
222 self.progressing_jobs_count = input;
223 self
224 }
225 /// The estimated number of jobs with a PROGRESSING status.
226 pub fn get_progressing_jobs_count(&self) -> &::std::option::Option<i32> {
227 &self.progressing_jobs_count
228 }
229 /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
230 pub fn reservation_plan(mut self, input: crate::types::ReservationPlan) -> Self {
231 self.reservation_plan = ::std::option::Option::Some(input);
232 self
233 }
234 /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
235 pub fn set_reservation_plan(mut self, input: ::std::option::Option<crate::types::ReservationPlan>) -> Self {
236 self.reservation_plan = input;
237 self
238 }
239 /// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
240 pub fn get_reservation_plan(&self) -> &::std::option::Option<crate::types::ReservationPlan> {
241 &self.reservation_plan
242 }
243 /// Appends an item to `service_overrides`.
244 ///
245 /// To override the contents of this collection use [`set_service_overrides`](Self::set_service_overrides).
246 ///
247 /// 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.
248 pub fn service_overrides(mut self, input: crate::types::ServiceOverride) -> Self {
249 let mut v = self.service_overrides.unwrap_or_default();
250 v.push(input);
251 self.service_overrides = ::std::option::Option::Some(v);
252 self
253 }
254 /// 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.
255 pub fn set_service_overrides(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>>) -> Self {
256 self.service_overrides = input;
257 self
258 }
259 /// 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.
260 pub fn get_service_overrides(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceOverride>> {
261 &self.service_overrides
262 }
263 /// 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.
264 pub fn status(mut self, input: crate::types::QueueStatus) -> Self {
265 self.status = ::std::option::Option::Some(input);
266 self
267 }
268 /// 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.
269 pub fn set_status(mut self, input: ::std::option::Option<crate::types::QueueStatus>) -> Self {
270 self.status = input;
271 self
272 }
273 /// 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.
274 pub fn get_status(&self) -> &::std::option::Option<crate::types::QueueStatus> {
275 &self.status
276 }
277 /// The estimated number of jobs with a SUBMITTED status.
278 pub fn submitted_jobs_count(mut self, input: i32) -> Self {
279 self.submitted_jobs_count = ::std::option::Option::Some(input);
280 self
281 }
282 /// The estimated number of jobs with a SUBMITTED status.
283 pub fn set_submitted_jobs_count(mut self, input: ::std::option::Option<i32>) -> Self {
284 self.submitted_jobs_count = input;
285 self
286 }
287 /// The estimated number of jobs with a SUBMITTED status.
288 pub fn get_submitted_jobs_count(&self) -> &::std::option::Option<i32> {
289 &self.submitted_jobs_count
290 }
291 /// 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.
292 pub fn r#type(mut self, input: crate::types::Type) -> Self {
293 self.r#type = ::std::option::Option::Some(input);
294 self
295 }
296 /// 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.
297 pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
298 self.r#type = input;
299 self
300 }
301 /// 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.
302 pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
303 &self.r#type
304 }
305 /// Consumes the builder and constructs a [`Queue`](crate::types::Queue).
306 pub fn build(self) -> crate::types::Queue {
307 crate::types::Queue {
308 arn: self.arn,
309 concurrent_jobs: self.concurrent_jobs,
310 created_at: self.created_at,
311 description: self.description,
312 last_updated: self.last_updated,
313 name: self.name,
314 pricing_plan: self.pricing_plan,
315 progressing_jobs_count: self.progressing_jobs_count,
316 reservation_plan: self.reservation_plan,
317 service_overrides: self.service_overrides,
318 status: self.status,
319 submitted_jobs_count: self.submitted_jobs_count,
320 r#type: self.r#type,
321 }
322 }
323}