aws_sdk_lookoutmetrics/operation/get_feedback/
_get_feedback_input.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 GetFeedbackInput {
6    /// <p>The Amazon Resource Name (ARN) of the anomaly detector.</p>
7    pub anomaly_detector_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The anomalous metric and group ID.</p>
9    pub anomaly_group_time_series_feedback: ::std::option::Option<crate::types::AnomalyGroupTimeSeries>,
10    /// <p>The maximum number of results to return.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl GetFeedbackInput {
16    /// <p>The Amazon Resource Name (ARN) of the anomaly detector.</p>
17    pub fn anomaly_detector_arn(&self) -> ::std::option::Option<&str> {
18        self.anomaly_detector_arn.as_deref()
19    }
20    /// <p>The anomalous metric and group ID.</p>
21    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    /// <p>The maximum number of results to return.</p>
25    pub fn max_results(&self) -> ::std::option::Option<i32> {
26        self.max_results
27    }
28    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
29    pub fn next_token(&self) -> ::std::option::Option<&str> {
30        self.next_token.as_deref()
31    }
32}
33impl GetFeedbackInput {
34    /// Creates a new builder-style object to manufacture [`GetFeedbackInput`](crate::operation::get_feedback::GetFeedbackInput).
35    pub fn builder() -> crate::operation::get_feedback::builders::GetFeedbackInputBuilder {
36        crate::operation::get_feedback::builders::GetFeedbackInputBuilder::default()
37    }
38}
39
40/// A builder for [`GetFeedbackInput`](crate::operation::get_feedback::GetFeedbackInput).
41#[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    /// <p>The Amazon Resource Name (ARN) of the anomaly detector.</p>
51    /// This field is required.
52    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    /// <p>The Amazon Resource Name (ARN) of the anomaly detector.</p>
57    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    /// <p>The Amazon Resource Name (ARN) of the anomaly detector.</p>
62    pub fn get_anomaly_detector_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.anomaly_detector_arn
64    }
65    /// <p>The anomalous metric and group ID.</p>
66    /// This field is required.
67    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    /// <p>The anomalous metric and group ID.</p>
72    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    /// <p>The anomalous metric and group ID.</p>
77    pub fn get_anomaly_group_time_series_feedback(&self) -> &::std::option::Option<crate::types::AnomalyGroupTimeSeries> {
78        &self.anomaly_group_time_series_feedback
79    }
80    /// <p>The maximum number of results to return.</p>
81    pub fn max_results(mut self, input: i32) -> Self {
82        self.max_results = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>The maximum number of results to return.</p>
86    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
87        self.max_results = input;
88        self
89    }
90    /// <p>The maximum number of results to return.</p>
91    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
92        &self.max_results
93    }
94    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
95    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    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
100    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.next_token = input;
102        self
103    }
104    /// <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p>
105    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
106        &self.next_token
107    }
108    /// Consumes the builder and constructs a [`GetFeedbackInput`](crate::operation::get_feedback::GetFeedbackInput).
109    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}