aws_sdk_lookoutmetrics/operation/get_feedback/
_get_feedback_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetFeedbackInput {
6 pub anomaly_detector_arn: ::std::option::Option<::std::string::String>,
8 pub anomaly_group_time_series_feedback: ::std::option::Option<crate::types::AnomalyGroupTimeSeries>,
10 pub max_results: ::std::option::Option<i32>,
12 pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl GetFeedbackInput {
16 pub fn anomaly_detector_arn(&self) -> ::std::option::Option<&str> {
18 self.anomaly_detector_arn.as_deref()
19 }
20 pub fn anomaly_group_time_series_feedback(&self) -> ::std::option::Option<&crate::types::AnomalyGroupTimeSeries> {
22 self.anomaly_group_time_series_feedback.as_ref()
23 }
24 pub fn max_results(&self) -> ::std::option::Option<i32> {
26 self.max_results
27 }
28 pub fn next_token(&self) -> ::std::option::Option<&str> {
30 self.next_token.as_deref()
31 }
32}
33impl GetFeedbackInput {
34 pub fn builder() -> crate::operation::get_feedback::builders::GetFeedbackInputBuilder {
36 crate::operation::get_feedback::builders::GetFeedbackInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetFeedbackInputBuilder {
44 pub(crate) anomaly_detector_arn: ::std::option::Option<::std::string::String>,
45 pub(crate) anomaly_group_time_series_feedback: ::std::option::Option<crate::types::AnomalyGroupTimeSeries>,
46 pub(crate) max_results: ::std::option::Option<i32>,
47 pub(crate) next_token: ::std::option::Option<::std::string::String>,
48}
49impl GetFeedbackInputBuilder {
50 pub fn anomaly_detector_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.anomaly_detector_arn = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_anomaly_detector_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.anomaly_detector_arn = input;
59 self
60 }
61 pub fn get_anomaly_detector_arn(&self) -> &::std::option::Option<::std::string::String> {
63 &self.anomaly_detector_arn
64 }
65 pub fn anomaly_group_time_series_feedback(mut self, input: crate::types::AnomalyGroupTimeSeries) -> Self {
68 self.anomaly_group_time_series_feedback = ::std::option::Option::Some(input);
69 self
70 }
71 pub fn set_anomaly_group_time_series_feedback(mut self, input: ::std::option::Option<crate::types::AnomalyGroupTimeSeries>) -> Self {
73 self.anomaly_group_time_series_feedback = input;
74 self
75 }
76 pub fn get_anomaly_group_time_series_feedback(&self) -> &::std::option::Option<crate::types::AnomalyGroupTimeSeries> {
78 &self.anomaly_group_time_series_feedback
79 }
80 pub fn max_results(mut self, input: i32) -> Self {
82 self.max_results = ::std::option::Option::Some(input);
83 self
84 }
85 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
87 self.max_results = input;
88 self
89 }
90 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
92 &self.max_results
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 fn build(self) -> ::std::result::Result<crate::operation::get_feedback::GetFeedbackInput, ::aws_smithy_types::error::operation::BuildError> {
110 ::std::result::Result::Ok(crate::operation::get_feedback::GetFeedbackInput {
111 anomaly_detector_arn: self.anomaly_detector_arn,
112 anomaly_group_time_series_feedback: self.anomaly_group_time_series_feedback,
113 max_results: self.max_results,
114 next_token: self.next_token,
115 })
116 }
117}