aws_sdk_devopsguru/operation/search_insights/
_search_insights_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchInsightsOutput {
6 pub proactive_insights: ::std::option::Option<::std::vec::Vec<crate::types::ProactiveInsightSummary>>,
8 pub reactive_insights: ::std::option::Option<::std::vec::Vec<crate::types::ReactiveInsightSummary>>,
10 pub next_token: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl SearchInsightsOutput {
15 pub fn proactive_insights(&self) -> &[crate::types::ProactiveInsightSummary] {
19 self.proactive_insights.as_deref().unwrap_or_default()
20 }
21 pub fn reactive_insights(&self) -> &[crate::types::ReactiveInsightSummary] {
25 self.reactive_insights.as_deref().unwrap_or_default()
26 }
27 pub fn next_token(&self) -> ::std::option::Option<&str> {
29 self.next_token.as_deref()
30 }
31}
32impl ::aws_types::request_id::RequestId for SearchInsightsOutput {
33 fn request_id(&self) -> Option<&str> {
34 self._request_id.as_deref()
35 }
36}
37impl SearchInsightsOutput {
38 pub fn builder() -> crate::operation::search_insights::builders::SearchInsightsOutputBuilder {
40 crate::operation::search_insights::builders::SearchInsightsOutputBuilder::default()
41 }
42}
43
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct SearchInsightsOutputBuilder {
48 pub(crate) proactive_insights: ::std::option::Option<::std::vec::Vec<crate::types::ProactiveInsightSummary>>,
49 pub(crate) reactive_insights: ::std::option::Option<::std::vec::Vec<crate::types::ReactiveInsightSummary>>,
50 pub(crate) next_token: ::std::option::Option<::std::string::String>,
51 _request_id: Option<String>,
52}
53impl SearchInsightsOutputBuilder {
54 pub fn proactive_insights(mut self, input: crate::types::ProactiveInsightSummary) -> Self {
60 let mut v = self.proactive_insights.unwrap_or_default();
61 v.push(input);
62 self.proactive_insights = ::std::option::Option::Some(v);
63 self
64 }
65 pub fn set_proactive_insights(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProactiveInsightSummary>>) -> Self {
67 self.proactive_insights = input;
68 self
69 }
70 pub fn get_proactive_insights(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProactiveInsightSummary>> {
72 &self.proactive_insights
73 }
74 pub fn reactive_insights(mut self, input: crate::types::ReactiveInsightSummary) -> Self {
80 let mut v = self.reactive_insights.unwrap_or_default();
81 v.push(input);
82 self.reactive_insights = ::std::option::Option::Some(v);
83 self
84 }
85 pub fn set_reactive_insights(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReactiveInsightSummary>>) -> Self {
87 self.reactive_insights = input;
88 self
89 }
90 pub fn get_reactive_insights(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReactiveInsightSummary>> {
92 &self.reactive_insights
93 }
94 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.next_token = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.next_token = input;
102 self
103 }
104 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
106 &self.next_token
107 }
108 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
109 self._request_id = Some(request_id.into());
110 self
111 }
112
113 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
114 self._request_id = request_id;
115 self
116 }
117 pub fn build(self) -> crate::operation::search_insights::SearchInsightsOutput {
119 crate::operation::search_insights::SearchInsightsOutput {
120 proactive_insights: self.proactive_insights,
121 reactive_insights: self.reactive_insights,
122 next_token: self.next_token,
123 _request_id: self._request_id,
124 }
125 }
126}