aws_sdk_quicksight/operation/search_topics/
_search_topics_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 SearchTopicsOutput {
6    /// <p>A list of topic summaries that is returned by the search topic request.</p>
7    pub topic_summary_list: ::std::option::Option<::std::vec::Vec<crate::types::TopicSummary>>,
8    /// <p>The token for the next set of results, or null if there are no more results.</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 SearchTopicsOutput {
17    /// <p>A list of topic summaries that is returned by the search topic request.</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 `.topic_summary_list.is_none()`.
20    pub fn topic_summary_list(&self) -> &[crate::types::TopicSummary] {
21        self.topic_summary_list.as_deref().unwrap_or_default()
22    }
23    /// <p>The token for the next set of results, or null if there are no more results.</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 SearchTopicsOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl SearchTopicsOutput {
42    /// Creates a new builder-style object to manufacture [`SearchTopicsOutput`](crate::operation::search_topics::SearchTopicsOutput).
43    pub fn builder() -> crate::operation::search_topics::builders::SearchTopicsOutputBuilder {
44        crate::operation::search_topics::builders::SearchTopicsOutputBuilder::default()
45    }
46}
47
48/// A builder for [`SearchTopicsOutput`](crate::operation::search_topics::SearchTopicsOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct SearchTopicsOutputBuilder {
52    pub(crate) topic_summary_list: ::std::option::Option<::std::vec::Vec<crate::types::TopicSummary>>,
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 SearchTopicsOutputBuilder {
59    /// Appends an item to `topic_summary_list`.
60    ///
61    /// To override the contents of this collection use [`set_topic_summary_list`](Self::set_topic_summary_list).
62    ///
63    /// <p>A list of topic summaries that is returned by the search topic request.</p>
64    pub fn topic_summary_list(mut self, input: crate::types::TopicSummary) -> Self {
65        let mut v = self.topic_summary_list.unwrap_or_default();
66        v.push(input);
67        self.topic_summary_list = ::std::option::Option::Some(v);
68        self
69    }
70    /// <p>A list of topic summaries that is returned by the search topic request.</p>
71    pub fn set_topic_summary_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TopicSummary>>) -> Self {
72        self.topic_summary_list = input;
73        self
74    }
75    /// <p>A list of topic summaries that is returned by the search topic request.</p>
76    pub fn get_topic_summary_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TopicSummary>> {
77        &self.topic_summary_list
78    }
79    /// <p>The token for the next set of results, or null if there are no more results.</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>The token for the next set of results, or null if there are no more results.</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>The token for the next set of results, or null if there are no more results.</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 [`SearchTopicsOutput`](crate::operation::search_topics::SearchTopicsOutput).
131    pub fn build(self) -> crate::operation::search_topics::SearchTopicsOutput {
132        crate::operation::search_topics::SearchTopicsOutput {
133            topic_summary_list: self.topic_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}