aws_sdk_quicksight/operation/search_flows/
_search_flows_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 SearchFlowsOutput {
6    /// <p>The list of flows found against the search.</p>
7    pub flow_summary_list: ::std::vec::Vec<crate::types::FlowSummary>,
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 Amazon Web Services request ID for this operation.</p>
11    pub request_id: ::std::option::Option<::std::string::String>,
12    /// <p>The HTTP status of the request.</p>
13    pub status: i32,
14    _request_id: Option<String>,
15}
16impl SearchFlowsOutput {
17    /// <p>The list of flows found against the search.</p>
18    pub fn flow_summary_list(&self) -> &[crate::types::FlowSummary] {
19        use std::ops::Deref;
20        self.flow_summary_list.deref()
21    }
22    /// <p>The token for the next set of results, or null if there are no more results.</p>
23    pub fn next_token(&self) -> ::std::option::Option<&str> {
24        self.next_token.as_deref()
25    }
26    /// <p>The Amazon Web Services request ID for this operation.</p>
27    pub fn request_id(&self) -> ::std::option::Option<&str> {
28        self.request_id.as_deref()
29    }
30    /// <p>The HTTP status of the request.</p>
31    pub fn status(&self) -> i32 {
32        self.status
33    }
34}
35impl ::aws_types::request_id::RequestId for SearchFlowsOutput {
36    fn request_id(&self) -> Option<&str> {
37        self._request_id.as_deref()
38    }
39}
40impl SearchFlowsOutput {
41    /// Creates a new builder-style object to manufacture [`SearchFlowsOutput`](crate::operation::search_flows::SearchFlowsOutput).
42    pub fn builder() -> crate::operation::search_flows::builders::SearchFlowsOutputBuilder {
43        crate::operation::search_flows::builders::SearchFlowsOutputBuilder::default()
44    }
45}
46
47/// A builder for [`SearchFlowsOutput`](crate::operation::search_flows::SearchFlowsOutput).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct SearchFlowsOutputBuilder {
51    pub(crate) flow_summary_list: ::std::option::Option<::std::vec::Vec<crate::types::FlowSummary>>,
52    pub(crate) next_token: ::std::option::Option<::std::string::String>,
53    pub(crate) request_id: ::std::option::Option<::std::string::String>,
54    pub(crate) status: ::std::option::Option<i32>,
55    _request_id: Option<String>,
56}
57impl SearchFlowsOutputBuilder {
58    /// Appends an item to `flow_summary_list`.
59    ///
60    /// To override the contents of this collection use [`set_flow_summary_list`](Self::set_flow_summary_list).
61    ///
62    /// <p>The list of flows found against the search.</p>
63    pub fn flow_summary_list(mut self, input: crate::types::FlowSummary) -> Self {
64        let mut v = self.flow_summary_list.unwrap_or_default();
65        v.push(input);
66        self.flow_summary_list = ::std::option::Option::Some(v);
67        self
68    }
69    /// <p>The list of flows found against the search.</p>
70    pub fn set_flow_summary_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlowSummary>>) -> Self {
71        self.flow_summary_list = input;
72        self
73    }
74    /// <p>The list of flows found against the search.</p>
75    pub fn get_flow_summary_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowSummary>> {
76        &self.flow_summary_list
77    }
78    /// <p>The token for the next set of results, or null if there are no more results.</p>
79    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.next_token = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The token for the next set of results, or null if there are no more results.</p>
84    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.next_token = input;
86        self
87    }
88    /// <p>The token for the next set of results, or null if there are no more results.</p>
89    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
90        &self.next_token
91    }
92    /// <p>The Amazon Web Services request ID for this operation.</p>
93    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.request_id = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The Amazon Web Services request ID for this operation.</p>
98    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.request_id = input;
100        self
101    }
102    /// <p>The Amazon Web Services request ID for this operation.</p>
103    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
104        &self.request_id
105    }
106    /// <p>The HTTP status of the request.</p>
107    pub fn status(mut self, input: i32) -> Self {
108        self.status = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>The HTTP status of the request.</p>
112    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
113        self.status = input;
114        self
115    }
116    /// <p>The HTTP status of the request.</p>
117    pub fn get_status(&self) -> &::std::option::Option<i32> {
118        &self.status
119    }
120    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
121        self._request_id = Some(request_id.into());
122        self
123    }
124
125    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
126        self._request_id = request_id;
127        self
128    }
129    /// Consumes the builder and constructs a [`SearchFlowsOutput`](crate::operation::search_flows::SearchFlowsOutput).
130    /// This method will fail if any of the following fields are not set:
131    /// - [`flow_summary_list`](crate::operation::search_flows::builders::SearchFlowsOutputBuilder::flow_summary_list)
132    pub fn build(self) -> ::std::result::Result<crate::operation::search_flows::SearchFlowsOutput, ::aws_smithy_types::error::operation::BuildError> {
133        ::std::result::Result::Ok(crate::operation::search_flows::SearchFlowsOutput {
134            flow_summary_list: self.flow_summary_list.ok_or_else(|| {
135                ::aws_smithy_types::error::operation::BuildError::missing_field(
136                    "flow_summary_list",
137                    "flow_summary_list was not specified but it is required when building SearchFlowsOutput",
138                )
139            })?,
140            next_token: self.next_token,
141            request_id: self.request_id,
142            status: self.status.unwrap_or_default(),
143            _request_id: self._request_id,
144        })
145    }
146}