aws_sdk_quicksight/operation/search_flows/
_search_flows_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchFlowsOutput {
6 pub flow_summary_list: ::std::vec::Vec<crate::types::FlowSummary>,
8 pub next_token: ::std::option::Option<::std::string::String>,
10 pub request_id: ::std::option::Option<::std::string::String>,
12 pub status: i32,
14 _request_id: Option<String>,
15}
16impl SearchFlowsOutput {
17 pub fn flow_summary_list(&self) -> &[crate::types::FlowSummary] {
19 use std::ops::Deref;
20 self.flow_summary_list.deref()
21 }
22 pub fn next_token(&self) -> ::std::option::Option<&str> {
24 self.next_token.as_deref()
25 }
26 pub fn request_id(&self) -> ::std::option::Option<&str> {
28 self.request_id.as_deref()
29 }
30 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 pub fn builder() -> crate::operation::search_flows::builders::SearchFlowsOutputBuilder {
43 crate::operation::search_flows::builders::SearchFlowsOutputBuilder::default()
44 }
45}
46
47#[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 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 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 pub fn get_flow_summary_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowSummary>> {
76 &self.flow_summary_list
77 }
78 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 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.next_token = input;
86 self
87 }
88 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
90 &self.next_token
91 }
92 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 pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.request_id = input;
100 self
101 }
102 pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.request_id
105 }
106 pub fn status(mut self, input: i32) -> Self {
108 self.status = ::std::option::Option::Some(input);
109 self
110 }
111 pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
113 self.status = input;
114 self
115 }
116 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 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}