aws_sdk_deadline/operation/get_queue/
_get_queue_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetQueueOutput {
6 pub queue_id: ::std::string::String,
8 pub display_name: ::std::string::String,
12 pub description: ::std::option::Option<::std::string::String>,
16 pub farm_id: ::std::string::String,
18 pub status: crate::types::QueueStatus,
28 pub default_budget_action: crate::types::DefaultQueueBudgetAction,
30 pub blocked_reason: ::std::option::Option<crate::types::QueueBlockedReason>,
32 pub job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
34 pub role_arn: ::std::option::Option<::std::string::String>,
36 pub required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
38 pub allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
40 pub job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
42 pub created_at: ::aws_smithy_types::DateTime,
44 pub created_by: ::std::string::String,
46 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
48 pub updated_by: ::std::option::Option<::std::string::String>,
50 _request_id: Option<String>,
51}
52impl GetQueueOutput {
53 pub fn queue_id(&self) -> &str {
55 use std::ops::Deref;
56 self.queue_id.deref()
57 }
58 pub fn display_name(&self) -> &str {
62 use std::ops::Deref;
63 self.display_name.deref()
64 }
65 pub fn description(&self) -> ::std::option::Option<&str> {
69 self.description.as_deref()
70 }
71 pub fn farm_id(&self) -> &str {
73 use std::ops::Deref;
74 self.farm_id.deref()
75 }
76 pub fn status(&self) -> &crate::types::QueueStatus {
86 &self.status
87 }
88 pub fn default_budget_action(&self) -> &crate::types::DefaultQueueBudgetAction {
90 &self.default_budget_action
91 }
92 pub fn blocked_reason(&self) -> ::std::option::Option<&crate::types::QueueBlockedReason> {
94 self.blocked_reason.as_ref()
95 }
96 pub fn job_attachment_settings(&self) -> ::std::option::Option<&crate::types::JobAttachmentSettings> {
98 self.job_attachment_settings.as_ref()
99 }
100 pub fn role_arn(&self) -> ::std::option::Option<&str> {
102 self.role_arn.as_deref()
103 }
104 pub fn required_file_system_location_names(&self) -> &[::std::string::String] {
108 self.required_file_system_location_names.as_deref().unwrap_or_default()
109 }
110 pub fn allowed_storage_profile_ids(&self) -> &[::std::string::String] {
114 self.allowed_storage_profile_ids.as_deref().unwrap_or_default()
115 }
116 pub fn job_run_as_user(&self) -> ::std::option::Option<&crate::types::JobRunAsUser> {
118 self.job_run_as_user.as_ref()
119 }
120 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
122 &self.created_at
123 }
124 pub fn created_by(&self) -> &str {
126 use std::ops::Deref;
127 self.created_by.deref()
128 }
129 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
131 self.updated_at.as_ref()
132 }
133 pub fn updated_by(&self) -> ::std::option::Option<&str> {
135 self.updated_by.as_deref()
136 }
137}
138impl ::std::fmt::Debug for GetQueueOutput {
139 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
140 let mut formatter = f.debug_struct("GetQueueOutput");
141 formatter.field("queue_id", &self.queue_id);
142 formatter.field("display_name", &self.display_name);
143 formatter.field("description", &"*** Sensitive Data Redacted ***");
144 formatter.field("farm_id", &self.farm_id);
145 formatter.field("status", &self.status);
146 formatter.field("default_budget_action", &self.default_budget_action);
147 formatter.field("blocked_reason", &self.blocked_reason);
148 formatter.field("job_attachment_settings", &self.job_attachment_settings);
149 formatter.field("role_arn", &self.role_arn);
150 formatter.field("required_file_system_location_names", &self.required_file_system_location_names);
151 formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
152 formatter.field("job_run_as_user", &self.job_run_as_user);
153 formatter.field("created_at", &self.created_at);
154 formatter.field("created_by", &self.created_by);
155 formatter.field("updated_at", &self.updated_at);
156 formatter.field("updated_by", &self.updated_by);
157 formatter.field("_request_id", &self._request_id);
158 formatter.finish()
159 }
160}
161impl ::aws_types::request_id::RequestId for GetQueueOutput {
162 fn request_id(&self) -> Option<&str> {
163 self._request_id.as_deref()
164 }
165}
166impl GetQueueOutput {
167 pub fn builder() -> crate::operation::get_queue::builders::GetQueueOutputBuilder {
169 crate::operation::get_queue::builders::GetQueueOutputBuilder::default()
170 }
171}
172
173#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
175#[non_exhaustive]
176pub struct GetQueueOutputBuilder {
177 pub(crate) queue_id: ::std::option::Option<::std::string::String>,
178 pub(crate) display_name: ::std::option::Option<::std::string::String>,
179 pub(crate) description: ::std::option::Option<::std::string::String>,
180 pub(crate) farm_id: ::std::option::Option<::std::string::String>,
181 pub(crate) status: ::std::option::Option<crate::types::QueueStatus>,
182 pub(crate) default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
183 pub(crate) blocked_reason: ::std::option::Option<crate::types::QueueBlockedReason>,
184 pub(crate) job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
185 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
186 pub(crate) required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
187 pub(crate) allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
188 pub(crate) job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
189 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
190 pub(crate) created_by: ::std::option::Option<::std::string::String>,
191 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
192 pub(crate) updated_by: ::std::option::Option<::std::string::String>,
193 _request_id: Option<String>,
194}
195impl GetQueueOutputBuilder {
196 pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199 self.queue_id = ::std::option::Option::Some(input.into());
200 self
201 }
202 pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204 self.queue_id = input;
205 self
206 }
207 pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
209 &self.queue_id
210 }
211 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.display_name = ::std::option::Option::Some(input.into());
217 self
218 }
219 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.display_name = input;
224 self
225 }
226 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
230 &self.display_name
231 }
232 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
236 self.description = ::std::option::Option::Some(input.into());
237 self
238 }
239 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243 self.description = input;
244 self
245 }
246 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
250 &self.description
251 }
252 pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255 self.farm_id = ::std::option::Option::Some(input.into());
256 self
257 }
258 pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260 self.farm_id = input;
261 self
262 }
263 pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
265 &self.farm_id
266 }
267 pub fn status(mut self, input: crate::types::QueueStatus) -> Self {
278 self.status = ::std::option::Option::Some(input);
279 self
280 }
281 pub fn set_status(mut self, input: ::std::option::Option<crate::types::QueueStatus>) -> Self {
291 self.status = input;
292 self
293 }
294 pub fn get_status(&self) -> &::std::option::Option<crate::types::QueueStatus> {
304 &self.status
305 }
306 pub fn default_budget_action(mut self, input: crate::types::DefaultQueueBudgetAction) -> Self {
309 self.default_budget_action = ::std::option::Option::Some(input);
310 self
311 }
312 pub fn set_default_budget_action(mut self, input: ::std::option::Option<crate::types::DefaultQueueBudgetAction>) -> Self {
314 self.default_budget_action = input;
315 self
316 }
317 pub fn get_default_budget_action(&self) -> &::std::option::Option<crate::types::DefaultQueueBudgetAction> {
319 &self.default_budget_action
320 }
321 pub fn blocked_reason(mut self, input: crate::types::QueueBlockedReason) -> Self {
323 self.blocked_reason = ::std::option::Option::Some(input);
324 self
325 }
326 pub fn set_blocked_reason(mut self, input: ::std::option::Option<crate::types::QueueBlockedReason>) -> Self {
328 self.blocked_reason = input;
329 self
330 }
331 pub fn get_blocked_reason(&self) -> &::std::option::Option<crate::types::QueueBlockedReason> {
333 &self.blocked_reason
334 }
335 pub fn job_attachment_settings(mut self, input: crate::types::JobAttachmentSettings) -> Self {
337 self.job_attachment_settings = ::std::option::Option::Some(input);
338 self
339 }
340 pub fn set_job_attachment_settings(mut self, input: ::std::option::Option<crate::types::JobAttachmentSettings>) -> Self {
342 self.job_attachment_settings = input;
343 self
344 }
345 pub fn get_job_attachment_settings(&self) -> &::std::option::Option<crate::types::JobAttachmentSettings> {
347 &self.job_attachment_settings
348 }
349 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351 self.role_arn = ::std::option::Option::Some(input.into());
352 self
353 }
354 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356 self.role_arn = input;
357 self
358 }
359 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
361 &self.role_arn
362 }
363 pub fn required_file_system_location_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
369 let mut v = self.required_file_system_location_names.unwrap_or_default();
370 v.push(input.into());
371 self.required_file_system_location_names = ::std::option::Option::Some(v);
372 self
373 }
374 pub fn set_required_file_system_location_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
376 self.required_file_system_location_names = input;
377 self
378 }
379 pub fn get_required_file_system_location_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
381 &self.required_file_system_location_names
382 }
383 pub fn allowed_storage_profile_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
389 let mut v = self.allowed_storage_profile_ids.unwrap_or_default();
390 v.push(input.into());
391 self.allowed_storage_profile_ids = ::std::option::Option::Some(v);
392 self
393 }
394 pub fn set_allowed_storage_profile_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
396 self.allowed_storage_profile_ids = input;
397 self
398 }
399 pub fn get_allowed_storage_profile_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
401 &self.allowed_storage_profile_ids
402 }
403 pub fn job_run_as_user(mut self, input: crate::types::JobRunAsUser) -> Self {
405 self.job_run_as_user = ::std::option::Option::Some(input);
406 self
407 }
408 pub fn set_job_run_as_user(mut self, input: ::std::option::Option<crate::types::JobRunAsUser>) -> Self {
410 self.job_run_as_user = input;
411 self
412 }
413 pub fn get_job_run_as_user(&self) -> &::std::option::Option<crate::types::JobRunAsUser> {
415 &self.job_run_as_user
416 }
417 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
420 self.created_at = ::std::option::Option::Some(input);
421 self
422 }
423 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
425 self.created_at = input;
426 self
427 }
428 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
430 &self.created_at
431 }
432 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
435 self.created_by = ::std::option::Option::Some(input.into());
436 self
437 }
438 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
440 self.created_by = input;
441 self
442 }
443 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
445 &self.created_by
446 }
447 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
449 self.updated_at = ::std::option::Option::Some(input);
450 self
451 }
452 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
454 self.updated_at = input;
455 self
456 }
457 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
459 &self.updated_at
460 }
461 pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
463 self.updated_by = ::std::option::Option::Some(input.into());
464 self
465 }
466 pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
468 self.updated_by = input;
469 self
470 }
471 pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
473 &self.updated_by
474 }
475 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
476 self._request_id = Some(request_id.into());
477 self
478 }
479
480 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
481 self._request_id = request_id;
482 self
483 }
484 pub fn build(self) -> ::std::result::Result<crate::operation::get_queue::GetQueueOutput, ::aws_smithy_types::error::operation::BuildError> {
494 ::std::result::Result::Ok(crate::operation::get_queue::GetQueueOutput {
495 queue_id: self.queue_id.ok_or_else(|| {
496 ::aws_smithy_types::error::operation::BuildError::missing_field(
497 "queue_id",
498 "queue_id was not specified but it is required when building GetQueueOutput",
499 )
500 })?,
501 display_name: self.display_name.ok_or_else(|| {
502 ::aws_smithy_types::error::operation::BuildError::missing_field(
503 "display_name",
504 "display_name was not specified but it is required when building GetQueueOutput",
505 )
506 })?,
507 description: self.description,
508 farm_id: self.farm_id.ok_or_else(|| {
509 ::aws_smithy_types::error::operation::BuildError::missing_field(
510 "farm_id",
511 "farm_id was not specified but it is required when building GetQueueOutput",
512 )
513 })?,
514 status: self.status.ok_or_else(|| {
515 ::aws_smithy_types::error::operation::BuildError::missing_field(
516 "status",
517 "status was not specified but it is required when building GetQueueOutput",
518 )
519 })?,
520 default_budget_action: self.default_budget_action.ok_or_else(|| {
521 ::aws_smithy_types::error::operation::BuildError::missing_field(
522 "default_budget_action",
523 "default_budget_action was not specified but it is required when building GetQueueOutput",
524 )
525 })?,
526 blocked_reason: self.blocked_reason,
527 job_attachment_settings: self.job_attachment_settings,
528 role_arn: self.role_arn,
529 required_file_system_location_names: self.required_file_system_location_names,
530 allowed_storage_profile_ids: self.allowed_storage_profile_ids,
531 job_run_as_user: self.job_run_as_user,
532 created_at: self.created_at.ok_or_else(|| {
533 ::aws_smithy_types::error::operation::BuildError::missing_field(
534 "created_at",
535 "created_at was not specified but it is required when building GetQueueOutput",
536 )
537 })?,
538 created_by: self.created_by.ok_or_else(|| {
539 ::aws_smithy_types::error::operation::BuildError::missing_field(
540 "created_by",
541 "created_by was not specified but it is required when building GetQueueOutput",
542 )
543 })?,
544 updated_at: self.updated_at,
545 updated_by: self.updated_by,
546 _request_id: self._request_id,
547 })
548 }
549}
550impl ::std::fmt::Debug for GetQueueOutputBuilder {
551 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
552 let mut formatter = f.debug_struct("GetQueueOutputBuilder");
553 formatter.field("queue_id", &self.queue_id);
554 formatter.field("display_name", &self.display_name);
555 formatter.field("description", &"*** Sensitive Data Redacted ***");
556 formatter.field("farm_id", &self.farm_id);
557 formatter.field("status", &self.status);
558 formatter.field("default_budget_action", &self.default_budget_action);
559 formatter.field("blocked_reason", &self.blocked_reason);
560 formatter.field("job_attachment_settings", &self.job_attachment_settings);
561 formatter.field("role_arn", &self.role_arn);
562 formatter.field("required_file_system_location_names", &self.required_file_system_location_names);
563 formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
564 formatter.field("job_run_as_user", &self.job_run_as_user);
565 formatter.field("created_at", &self.created_at);
566 formatter.field("created_by", &self.created_by);
567 formatter.field("updated_at", &self.updated_at);
568 formatter.field("updated_by", &self.updated_by);
569 formatter.field("_request_id", &self._request_id);
570 formatter.finish()
571 }
572}