aws_sdk_quicksight/operation/search_folders/
_search_folders_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 SearchFoldersOutput {
6    /// <p>The HTTP status of the request.</p>
7    pub status: i32,
8    /// <p>A structure that contains all of the folders in the Amazon Web Services account. This structure provides basic information about the folders.</p>
9    pub folder_summary_list: ::std::option::Option<::std::vec::Vec<crate::types::FolderSummary>>,
10    /// <p>The token for the next set of results, or null if there are no more results.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Web Services request ID for this operation.</p>
13    pub request_id: ::std::option::Option<::std::string::String>,
14    _request_id: Option<String>,
15}
16impl SearchFoldersOutput {
17    /// <p>The HTTP status of the request.</p>
18    pub fn status(&self) -> i32 {
19        self.status
20    }
21    /// <p>A structure that contains all of the folders in the Amazon Web Services account. This structure provides basic information about the folders.</p>
22    ///
23    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.folder_summary_list.is_none()`.
24    pub fn folder_summary_list(&self) -> &[crate::types::FolderSummary] {
25        self.folder_summary_list.as_deref().unwrap_or_default()
26    }
27    /// <p>The token for the next set of results, or null if there are no more results.</p>
28    pub fn next_token(&self) -> ::std::option::Option<&str> {
29        self.next_token.as_deref()
30    }
31    /// <p>The Amazon Web Services request ID for this operation.</p>
32    pub fn request_id(&self) -> ::std::option::Option<&str> {
33        self.request_id.as_deref()
34    }
35}
36impl ::aws_types::request_id::RequestId for SearchFoldersOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl SearchFoldersOutput {
42    /// Creates a new builder-style object to manufacture [`SearchFoldersOutput`](crate::operation::search_folders::SearchFoldersOutput).
43    pub fn builder() -> crate::operation::search_folders::builders::SearchFoldersOutputBuilder {
44        crate::operation::search_folders::builders::SearchFoldersOutputBuilder::default()
45    }
46}
47
48/// A builder for [`SearchFoldersOutput`](crate::operation::search_folders::SearchFoldersOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct SearchFoldersOutputBuilder {
52    pub(crate) status: ::std::option::Option<i32>,
53    pub(crate) folder_summary_list: ::std::option::Option<::std::vec::Vec<crate::types::FolderSummary>>,
54    pub(crate) next_token: ::std::option::Option<::std::string::String>,
55    pub(crate) request_id: ::std::option::Option<::std::string::String>,
56    _request_id: Option<String>,
57}
58impl SearchFoldersOutputBuilder {
59    /// <p>The HTTP status of the request.</p>
60    pub fn status(mut self, input: i32) -> Self {
61        self.status = ::std::option::Option::Some(input);
62        self
63    }
64    /// <p>The HTTP status of the request.</p>
65    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
66        self.status = input;
67        self
68    }
69    /// <p>The HTTP status of the request.</p>
70    pub fn get_status(&self) -> &::std::option::Option<i32> {
71        &self.status
72    }
73    /// Appends an item to `folder_summary_list`.
74    ///
75    /// To override the contents of this collection use [`set_folder_summary_list`](Self::set_folder_summary_list).
76    ///
77    /// <p>A structure that contains all of the folders in the Amazon Web Services account. This structure provides basic information about the folders.</p>
78    pub fn folder_summary_list(mut self, input: crate::types::FolderSummary) -> Self {
79        let mut v = self.folder_summary_list.unwrap_or_default();
80        v.push(input);
81        self.folder_summary_list = ::std::option::Option::Some(v);
82        self
83    }
84    /// <p>A structure that contains all of the folders in the Amazon Web Services account. This structure provides basic information about the folders.</p>
85    pub fn set_folder_summary_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FolderSummary>>) -> Self {
86        self.folder_summary_list = input;
87        self
88    }
89    /// <p>A structure that contains all of the folders in the Amazon Web Services account. This structure provides basic information about the folders.</p>
90    pub fn get_folder_summary_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FolderSummary>> {
91        &self.folder_summary_list
92    }
93    /// <p>The token for the next set of results, or null if there are no more results.</p>
94    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.next_token = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The token for the next set of results, or null if there are no more results.</p>
99    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.next_token = input;
101        self
102    }
103    /// <p>The token for the next set of results, or null if there are no more results.</p>
104    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
105        &self.next_token
106    }
107    /// <p>The Amazon Web Services request ID for this operation.</p>
108    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.request_id = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The Amazon Web Services request ID for this operation.</p>
113    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.request_id = input;
115        self
116    }
117    /// <p>The Amazon Web Services request ID for this operation.</p>
118    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
119        &self.request_id
120    }
121    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
122        self._request_id = Some(request_id.into());
123        self
124    }
125
126    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
127        self._request_id = request_id;
128        self
129    }
130    /// Consumes the builder and constructs a [`SearchFoldersOutput`](crate::operation::search_folders::SearchFoldersOutput).
131    pub fn build(self) -> crate::operation::search_folders::SearchFoldersOutput {
132        crate::operation::search_folders::SearchFoldersOutput {
133            status: self.status.unwrap_or_default(),
134            folder_summary_list: self.folder_summary_list,
135            next_token: self.next_token,
136            request_id: self.request_id,
137            _request_id: self._request_id,
138        }
139    }
140}