/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeGuruProfiler { namespace Model { /** *

Details about an anomaly in a specific metric of application profile. The * anomaly is detected using analysis of the metric data over a period of time. *

See Also:

AWS * API Reference

*/ class Anomaly { public: AWS_CODEGURUPROFILER_API Anomaly(); AWS_CODEGURUPROFILER_API Anomaly(Aws::Utils::Json::JsonView jsonValue); AWS_CODEGURUPROFILER_API Anomaly& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CODEGURUPROFILER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline const Aws::Vector& GetInstances() const{ return m_instances; } /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline bool InstancesHasBeenSet() const { return m_instancesHasBeenSet; } /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline void SetInstances(const Aws::Vector& value) { m_instancesHasBeenSet = true; m_instances = value; } /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline void SetInstances(Aws::Vector&& value) { m_instancesHasBeenSet = true; m_instances = std::move(value); } /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline Anomaly& WithInstances(const Aws::Vector& value) { SetInstances(value); return *this;} /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline Anomaly& WithInstances(Aws::Vector&& value) { SetInstances(std::move(value)); return *this;} /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline Anomaly& AddInstances(const AnomalyInstance& value) { m_instancesHasBeenSet = true; m_instances.push_back(value); return *this; } /** *

A list of the instances of the detected anomalies during the requested * period.

*/ inline Anomaly& AddInstances(AnomalyInstance&& value) { m_instancesHasBeenSet = true; m_instances.push_back(std::move(value)); return *this; } /** *

Details about the metric that the analysis used when it detected the * anomaly. The metric includes the name of the frame that was analyzed with the * type and thread states used to derive the metric value for that frame.

*/ inline const Metric& GetMetric() const{ return m_metric; } /** *

Details about the metric that the analysis used when it detected the * anomaly. The metric includes the name of the frame that was analyzed with the * type and thread states used to derive the metric value for that frame.

*/ inline bool MetricHasBeenSet() const { return m_metricHasBeenSet; } /** *

Details about the metric that the analysis used when it detected the * anomaly. The metric includes the name of the frame that was analyzed with the * type and thread states used to derive the metric value for that frame.

*/ inline void SetMetric(const Metric& value) { m_metricHasBeenSet = true; m_metric = value; } /** *

Details about the metric that the analysis used when it detected the * anomaly. The metric includes the name of the frame that was analyzed with the * type and thread states used to derive the metric value for that frame.

*/ inline void SetMetric(Metric&& value) { m_metricHasBeenSet = true; m_metric = std::move(value); } /** *

Details about the metric that the analysis used when it detected the * anomaly. The metric includes the name of the frame that was analyzed with the * type and thread states used to derive the metric value for that frame.

*/ inline Anomaly& WithMetric(const Metric& value) { SetMetric(value); return *this;} /** *

Details about the metric that the analysis used when it detected the * anomaly. The metric includes the name of the frame that was analyzed with the * type and thread states used to derive the metric value for that frame.

*/ inline Anomaly& WithMetric(Metric&& value) { SetMetric(std::move(value)); return *this;} /** *

The reason for which metric was flagged as anomalous.

*/ inline const Aws::String& GetReason() const{ return m_reason; } /** *

The reason for which metric was flagged as anomalous.

*/ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** *

The reason for which metric was flagged as anomalous.

*/ inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } /** *

The reason for which metric was flagged as anomalous.

*/ inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** *

The reason for which metric was flagged as anomalous.

*/ inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } /** *

The reason for which metric was flagged as anomalous.

*/ inline Anomaly& WithReason(const Aws::String& value) { SetReason(value); return *this;} /** *

The reason for which metric was flagged as anomalous.

*/ inline Anomaly& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} /** *

The reason for which metric was flagged as anomalous.

*/ inline Anomaly& WithReason(const char* value) { SetReason(value); return *this;} private: Aws::Vector m_instances; bool m_instancesHasBeenSet = false; Metric m_metric; bool m_metricHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; }; } // namespace Model } // namespace CodeGuruProfiler } // namespace Aws