/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudWatch { namespace Model { /** *

Designates the CloudWatch metric and statistic that provides the time series * the anomaly detector uses as input.

See Also:

AWS * API Reference

*/ class SingleMetricAnomalyDetector { public: AWS_CLOUDWATCH_API SingleMetricAnomalyDetector(); AWS_CLOUDWATCH_API SingleMetricAnomalyDetector(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API SingleMetricAnomalyDetector& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline const Aws::String& GetNamespace() const{ return m_namespace; } /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} /** *

The namespace of the metric to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithNamespace(const char* value) { SetNamespace(value); return *this;} /** *

The name of the metric to create the anomaly detection model for.

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

The name of the metric to create the anomaly detection model for.

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

The name of the metric to create the anomaly detection model for.

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

The name of the metric to create the anomaly detection model for.

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

The name of the metric to create the anomaly detection model for.

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

The name of the metric to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

The name of the metric to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

The name of the metric to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *

The metric dimensions to create the anomaly detection model for.

*/ inline const Aws::Vector& GetDimensions() const{ return m_dimensions; } /** *

The metric dimensions to create the anomaly detection model for.

*/ inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; } /** *

The metric dimensions to create the anomaly detection model for.

*/ inline void SetDimensions(const Aws::Vector& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; } /** *

The metric dimensions to create the anomaly detection model for.

*/ inline void SetDimensions(Aws::Vector&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); } /** *

The metric dimensions to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithDimensions(const Aws::Vector& value) { SetDimensions(value); return *this;} /** *

The metric dimensions to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& WithDimensions(Aws::Vector&& value) { SetDimensions(std::move(value)); return *this;} /** *

The metric dimensions to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& AddDimensions(const Dimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; } /** *

The metric dimensions to create the anomaly detection model for.

*/ inline SingleMetricAnomalyDetector& AddDimensions(Dimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; } /** *

The statistic to use for the metric and anomaly detection model.

*/ inline const Aws::String& GetStat() const{ return m_stat; } /** *

The statistic to use for the metric and anomaly detection model.

*/ inline bool StatHasBeenSet() const { return m_statHasBeenSet; } /** *

The statistic to use for the metric and anomaly detection model.

*/ inline void SetStat(const Aws::String& value) { m_statHasBeenSet = true; m_stat = value; } /** *

The statistic to use for the metric and anomaly detection model.

*/ inline void SetStat(Aws::String&& value) { m_statHasBeenSet = true; m_stat = std::move(value); } /** *

The statistic to use for the metric and anomaly detection model.

*/ inline void SetStat(const char* value) { m_statHasBeenSet = true; m_stat.assign(value); } /** *

The statistic to use for the metric and anomaly detection model.

*/ inline SingleMetricAnomalyDetector& WithStat(const Aws::String& value) { SetStat(value); return *this;} /** *

The statistic to use for the metric and anomaly detection model.

*/ inline SingleMetricAnomalyDetector& WithStat(Aws::String&& value) { SetStat(std::move(value)); return *this;} /** *

The statistic to use for the metric and anomaly detection model.

*/ inline SingleMetricAnomalyDetector& WithStat(const char* value) { SetStat(value); return *this;} private: Aws::String m_namespace; bool m_namespaceHasBeenSet = false; Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::Vector m_dimensions; bool m_dimensionsHasBeenSet = false; Aws::String m_stat; bool m_statHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws