aws_sdk_quicksight/operation/search_analyses/
_search_analyses_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 SearchAnalysesOutput {
6    /// <p>Metadata describing the analyses that you searched for.</p>
7    pub analysis_summary_list: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisSummary>>,
8    /// <p>A pagination token that can be used in a subsequent request.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The HTTP status of the request.</p>
11    pub status: i32,
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 SearchAnalysesOutput {
17    /// <p>Metadata describing the analyses that you searched for.</p>
18    ///
19    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.analysis_summary_list.is_none()`.
20    pub fn analysis_summary_list(&self) -> &[crate::types::AnalysisSummary] {
21        self.analysis_summary_list.as_deref().unwrap_or_default()
22    }
23    /// <p>A pagination token that can be used in a subsequent request.</p>
24    pub fn next_token(&self) -> ::std::option::Option<&str> {
25        self.next_token.as_deref()
26    }
27    /// <p>The HTTP status of the request.</p>
28    pub fn status(&self) -> i32 {
29        self.status
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 SearchAnalysesOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl SearchAnalysesOutput {
42    /// Creates a new builder-style object to manufacture [`SearchAnalysesOutput`](crate::operation::search_analyses::SearchAnalysesOutput).
43    pub fn builder() -> crate::operation::search_analyses::builders::SearchAnalysesOutputBuilder {
44        crate::operation::search_analyses::builders::SearchAnalysesOutputBuilder::default()
45    }
46}
47
48/// A builder for [`SearchAnalysesOutput`](crate::operation::search_analyses::SearchAnalysesOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct SearchAnalysesOutputBuilder {
52    pub(crate) analysis_summary_list: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisSummary>>,
53    pub(crate) next_token: ::std::option::Option<::std::string::String>,
54    pub(crate) status: ::std::option::Option<i32>,
55    pub(crate) request_id: ::std::option::Option<::std::string::String>,
56    _request_id: Option<String>,
57}
58impl SearchAnalysesOutputBuilder {
59    /// Appends an item to `analysis_summary_list`.
60    ///
61    /// To override the contents of this collection use [`set_analysis_summary_list`](Self::set_analysis_summary_list).
62    ///
63    /// <p>Metadata describing the analyses that you searched for.</p>
64    pub fn analysis_summary_list(mut self, input: crate::types::AnalysisSummary) -> Self {
65        let mut v = self.analysis_summary_list.unwrap_or_default();
66        v.push(input);
67        self.analysis_summary_list = ::std::option::Option::Some(v);
68        self
69    }
70    /// <p>Metadata describing the analyses that you searched for.</p>
71    pub fn set_analysis_summary_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AnalysisSummary>>) -> Self {
72        self.analysis_summary_list = input;
73        self
74    }
75    /// <p>Metadata describing the analyses that you searched for.</p>
76    pub fn get_analysis_summary_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AnalysisSummary>> {
77        &self.analysis_summary_list
78    }
79    /// <p>A pagination token that can be used in a subsequent request.</p>
80    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.next_token = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A pagination token that can be used in a subsequent request.</p>
85    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.next_token = input;
87        self
88    }
89    /// <p>A pagination token that can be used in a subsequent request.</p>
90    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91        &self.next_token
92    }
93    /// <p>The HTTP status of the request.</p>
94    pub fn status(mut self, input: i32) -> Self {
95        self.status = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The HTTP status of the request.</p>
99    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
100        self.status = input;
101        self
102    }
103    /// <p>The HTTP status of the request.</p>
104    pub fn get_status(&self) -> &::std::option::Option<i32> {
105        &self.status
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 [`SearchAnalysesOutput`](crate::operation::search_analyses::SearchAnalysesOutput).
131    pub fn build(self) -> crate::operation::search_analyses::SearchAnalysesOutput {
132        crate::operation::search_analyses::SearchAnalysesOutput {
133            analysis_summary_list: self.analysis_summary_list,
134            next_token: self.next_token,
135            status: self.status.unwrap_or_default(),
136            request_id: self.request_id,
137            _request_id: self._request_id,
138        }
139    }
140}