aws_sdk_lookoutmetrics/operation/detect_metric_set_config/
_detect_metric_set_config_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DetectMetricSetConfigInput {
6 pub anomaly_detector_arn: ::std::option::Option<::std::string::String>,
8 pub auto_detection_metric_source: ::std::option::Option<crate::types::AutoDetectionMetricSource>,
10}
11impl DetectMetricSetConfigInput {
12 pub fn anomaly_detector_arn(&self) -> ::std::option::Option<&str> {
14 self.anomaly_detector_arn.as_deref()
15 }
16 pub fn auto_detection_metric_source(&self) -> ::std::option::Option<&crate::types::AutoDetectionMetricSource> {
18 self.auto_detection_metric_source.as_ref()
19 }
20}
21impl DetectMetricSetConfigInput {
22 pub fn builder() -> crate::operation::detect_metric_set_config::builders::DetectMetricSetConfigInputBuilder {
24 crate::operation::detect_metric_set_config::builders::DetectMetricSetConfigInputBuilder::default()
25 }
26}
27
28#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DetectMetricSetConfigInputBuilder {
32 pub(crate) anomaly_detector_arn: ::std::option::Option<::std::string::String>,
33 pub(crate) auto_detection_metric_source: ::std::option::Option<crate::types::AutoDetectionMetricSource>,
34}
35impl DetectMetricSetConfigInputBuilder {
36 pub fn anomaly_detector_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.anomaly_detector_arn = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_anomaly_detector_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.anomaly_detector_arn = input;
45 self
46 }
47 pub fn get_anomaly_detector_arn(&self) -> &::std::option::Option<::std::string::String> {
49 &self.anomaly_detector_arn
50 }
51 pub fn auto_detection_metric_source(mut self, input: crate::types::AutoDetectionMetricSource) -> Self {
54 self.auto_detection_metric_source = ::std::option::Option::Some(input);
55 self
56 }
57 pub fn set_auto_detection_metric_source(mut self, input: ::std::option::Option<crate::types::AutoDetectionMetricSource>) -> Self {
59 self.auto_detection_metric_source = input;
60 self
61 }
62 pub fn get_auto_detection_metric_source(&self) -> &::std::option::Option<crate::types::AutoDetectionMetricSource> {
64 &self.auto_detection_metric_source
65 }
66 pub fn build(
68 self,
69 ) -> ::std::result::Result<crate::operation::detect_metric_set_config::DetectMetricSetConfigInput, ::aws_smithy_types::error::operation::BuildError>
70 {
71 ::std::result::Result::Ok(crate::operation::detect_metric_set_config::DetectMetricSetConfigInput {
72 anomaly_detector_arn: self.anomaly_detector_arn,
73 auto_detection_metric_source: self.auto_detection_metric_source,
74 })
75 }
76}