aws_sdk_deadline/operation/list_storage_profiles_for_queue/_list_storage_profiles_for_queue_output.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 ListStorageProfilesForQueueOutput {
6 /// <p>The storage profiles in the queue.</p>
7 pub storage_profiles: ::std::vec::Vec<crate::types::StorageProfileSummary>,
8 /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
9 pub next_token: ::std::option::Option<::std::string::String>,
10 _request_id: Option<String>,
11}
12impl ListStorageProfilesForQueueOutput {
13 /// <p>The storage profiles in the queue.</p>
14 pub fn storage_profiles(&self) -> &[crate::types::StorageProfileSummary] {
15 use std::ops::Deref;
16 self.storage_profiles.deref()
17 }
18 /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
19 pub fn next_token(&self) -> ::std::option::Option<&str> {
20 self.next_token.as_deref()
21 }
22}
23impl ::aws_types::request_id::RequestId for ListStorageProfilesForQueueOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl ListStorageProfilesForQueueOutput {
29 /// Creates a new builder-style object to manufacture [`ListStorageProfilesForQueueOutput`](crate::operation::list_storage_profiles_for_queue::ListStorageProfilesForQueueOutput).
30 pub fn builder() -> crate::operation::list_storage_profiles_for_queue::builders::ListStorageProfilesForQueueOutputBuilder {
31 crate::operation::list_storage_profiles_for_queue::builders::ListStorageProfilesForQueueOutputBuilder::default()
32 }
33}
34
35/// A builder for [`ListStorageProfilesForQueueOutput`](crate::operation::list_storage_profiles_for_queue::ListStorageProfilesForQueueOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ListStorageProfilesForQueueOutputBuilder {
39 pub(crate) storage_profiles: ::std::option::Option<::std::vec::Vec<crate::types::StorageProfileSummary>>,
40 pub(crate) next_token: ::std::option::Option<::std::string::String>,
41 _request_id: Option<String>,
42}
43impl ListStorageProfilesForQueueOutputBuilder {
44 /// Appends an item to `storage_profiles`.
45 ///
46 /// To override the contents of this collection use [`set_storage_profiles`](Self::set_storage_profiles).
47 ///
48 /// <p>The storage profiles in the queue.</p>
49 pub fn storage_profiles(mut self, input: crate::types::StorageProfileSummary) -> Self {
50 let mut v = self.storage_profiles.unwrap_or_default();
51 v.push(input);
52 self.storage_profiles = ::std::option::Option::Some(v);
53 self
54 }
55 /// <p>The storage profiles in the queue.</p>
56 pub fn set_storage_profiles(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StorageProfileSummary>>) -> Self {
57 self.storage_profiles = input;
58 self
59 }
60 /// <p>The storage profiles in the queue.</p>
61 pub fn get_storage_profiles(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StorageProfileSummary>> {
62 &self.storage_profiles
63 }
64 /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
65 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.next_token = ::std::option::Option::Some(input.into());
67 self
68 }
69 /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
70 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.next_token = input;
72 self
73 }
74 /// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
75 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
76 &self.next_token
77 }
78 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
79 self._request_id = Some(request_id.into());
80 self
81 }
82
83 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
84 self._request_id = request_id;
85 self
86 }
87 /// Consumes the builder and constructs a [`ListStorageProfilesForQueueOutput`](crate::operation::list_storage_profiles_for_queue::ListStorageProfilesForQueueOutput).
88 /// This method will fail if any of the following fields are not set:
89 /// - [`storage_profiles`](crate::operation::list_storage_profiles_for_queue::builders::ListStorageProfilesForQueueOutputBuilder::storage_profiles)
90 pub fn build(
91 self,
92 ) -> ::std::result::Result<
93 crate::operation::list_storage_profiles_for_queue::ListStorageProfilesForQueueOutput,
94 ::aws_smithy_types::error::operation::BuildError,
95 > {
96 ::std::result::Result::Ok(crate::operation::list_storage_profiles_for_queue::ListStorageProfilesForQueueOutput {
97 storage_profiles: self.storage_profiles.ok_or_else(|| {
98 ::aws_smithy_types::error::operation::BuildError::missing_field(
99 "storage_profiles",
100 "storage_profiles was not specified but it is required when building ListStorageProfilesForQueueOutput",
101 )
102 })?,
103 next_token: self.next_token,
104 _request_id: self._request_id,
105 })
106 }
107}