AWS SDK for C++

AWS SDK for C++ Version 1.11.766

Loading...
Searching...
No Matches
BehaviorCriteria.h
1
6#pragma once
7#include <aws/iot/IoT_EXPORTS.h>
8#include <aws/iot/model/ComparisonOperator.h>
9#include <aws/iot/model/MachineLearningDetectionConfig.h>
10#include <aws/iot/model/MetricValue.h>
11#include <aws/iot/model/StatisticalThreshold.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace IoT {
23namespace Model {
24
32 public:
33 AWS_IOT_API BehaviorCriteria() = default;
37
39
50 inline ComparisonOperator GetComparisonOperator() const { return m_comparisonOperator; }
51 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
53 m_comparisonOperatorHasBeenSet = true;
54 m_comparisonOperator = value;
55 }
58 return *this;
59 }
61
63
66 inline const MetricValue& GetValue() const { return m_value; }
67 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
68 template <typename ValueT = MetricValue>
69 void SetValue(ValueT&& value) {
70 m_valueHasBeenSet = true;
71 m_value = std::forward<ValueT>(value);
72 }
73 template <typename ValueT = MetricValue>
74 BehaviorCriteria& WithValue(ValueT&& value) {
75 SetValue(std::forward<ValueT>(value));
76 return *this;
77 }
79
81
91 inline int GetDurationSeconds() const { return m_durationSeconds; }
92 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
93 inline void SetDurationSeconds(int value) {
94 m_durationSecondsHasBeenSet = true;
95 m_durationSeconds = value;
96 }
98 SetDurationSeconds(value);
99 return *this;
100 }
102
104
108 inline int GetConsecutiveDatapointsToAlarm() const { return m_consecutiveDatapointsToAlarm; }
109 inline bool ConsecutiveDatapointsToAlarmHasBeenSet() const { return m_consecutiveDatapointsToAlarmHasBeenSet; }
110 inline void SetConsecutiveDatapointsToAlarm(int value) {
111 m_consecutiveDatapointsToAlarmHasBeenSet = true;
112 m_consecutiveDatapointsToAlarm = value;
113 }
116 return *this;
117 }
119
121
126 inline int GetConsecutiveDatapointsToClear() const { return m_consecutiveDatapointsToClear; }
127 inline bool ConsecutiveDatapointsToClearHasBeenSet() const { return m_consecutiveDatapointsToClearHasBeenSet; }
128 inline void SetConsecutiveDatapointsToClear(int value) {
129 m_consecutiveDatapointsToClearHasBeenSet = true;
130 m_consecutiveDatapointsToClear = value;
131 }
134 return *this;
135 }
137
139
143 inline const StatisticalThreshold& GetStatisticalThreshold() const { return m_statisticalThreshold; }
144 inline bool StatisticalThresholdHasBeenSet() const { return m_statisticalThresholdHasBeenSet; }
145 template <typename StatisticalThresholdT = StatisticalThreshold>
146 void SetStatisticalThreshold(StatisticalThresholdT&& value) {
147 m_statisticalThresholdHasBeenSet = true;
148 m_statisticalThreshold = std::forward<StatisticalThresholdT>(value);
149 }
150 template <typename StatisticalThresholdT = StatisticalThreshold>
151 BehaviorCriteria& WithStatisticalThreshold(StatisticalThresholdT&& value) {
152 SetStatisticalThreshold(std::forward<StatisticalThresholdT>(value));
153 return *this;
154 }
156
158
161 inline const MachineLearningDetectionConfig& GetMlDetectionConfig() const { return m_mlDetectionConfig; }
162 inline bool MlDetectionConfigHasBeenSet() const { return m_mlDetectionConfigHasBeenSet; }
163 template <typename MlDetectionConfigT = MachineLearningDetectionConfig>
164 void SetMlDetectionConfig(MlDetectionConfigT&& value) {
165 m_mlDetectionConfigHasBeenSet = true;
166 m_mlDetectionConfig = std::forward<MlDetectionConfigT>(value);
167 }
168 template <typename MlDetectionConfigT = MachineLearningDetectionConfig>
169 BehaviorCriteria& WithMlDetectionConfig(MlDetectionConfigT&& value) {
170 SetMlDetectionConfig(std::forward<MlDetectionConfigT>(value));
171 return *this;
172 }
174 private:
176
177 MetricValue m_value;
178
179 int m_durationSeconds{0};
180
181 int m_consecutiveDatapointsToAlarm{0};
182
183 int m_consecutiveDatapointsToClear{0};
184
185 StatisticalThreshold m_statisticalThreshold;
186
187 MachineLearningDetectionConfig m_mlDetectionConfig;
188 bool m_comparisonOperatorHasBeenSet = false;
189 bool m_valueHasBeenSet = false;
190 bool m_durationSecondsHasBeenSet = false;
191 bool m_consecutiveDatapointsToAlarmHasBeenSet = false;
192 bool m_consecutiveDatapointsToClearHasBeenSet = false;
193 bool m_statisticalThresholdHasBeenSet = false;
194 bool m_mlDetectionConfigHasBeenSet = false;
195};
196
197} // namespace Model
198} // namespace IoT
199} // namespace Aws
BehaviorCriteria & WithStatisticalThreshold(StatisticalThresholdT &&value)
BehaviorCriteria & WithMlDetectionConfig(MlDetectionConfigT &&value)
BehaviorCriteria & WithValue(ValueT &&value)
void SetComparisonOperator(ComparisonOperator value)
AWS_IOT_API BehaviorCriteria()=default
ComparisonOperator GetComparisonOperator() const
const MachineLearningDetectionConfig & GetMlDetectionConfig() const
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
const StatisticalThreshold & GetStatisticalThreshold() const
void SetMlDetectionConfig(MlDetectionConfigT &&value)
BehaviorCriteria & WithDurationSeconds(int value)
BehaviorCriteria & WithConsecutiveDatapointsToClear(int value)
BehaviorCriteria & WithComparisonOperator(ComparisonOperator value)
AWS_IOT_API BehaviorCriteria & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_IOT_API BehaviorCriteria(Aws::Utils::Json::JsonView jsonValue)
BehaviorCriteria & WithConsecutiveDatapointsToAlarm(int value)
void SetStatisticalThreshold(StatisticalThresholdT &&value)
const MetricValue & GetValue() const
Aws::Utils::Json::JsonValue JsonValue