AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Anomaly.h
1
6#pragma once
7#include <aws/logs/CloudWatchLogs_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/logs/model/State.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/logs/model/LogEvent.h>
13#include <aws/logs/model/PatternToken.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace CloudWatchLogs
27{
28namespace Model
29{
30
39 class Anomaly
40 {
41 public:
42 AWS_CLOUDWATCHLOGS_API Anomaly() = default;
43 AWS_CLOUDWATCHLOGS_API Anomaly(Aws::Utils::Json::JsonView jsonValue);
44 AWS_CLOUDWATCHLOGS_API Anomaly& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
46
47
49
52 inline const Aws::String& GetAnomalyId() const { return m_anomalyId; }
53 inline bool AnomalyIdHasBeenSet() const { return m_anomalyIdHasBeenSet; }
54 template<typename AnomalyIdT = Aws::String>
55 void SetAnomalyId(AnomalyIdT&& value) { m_anomalyIdHasBeenSet = true; m_anomalyId = std::forward<AnomalyIdT>(value); }
56 template<typename AnomalyIdT = Aws::String>
57 Anomaly& WithAnomalyId(AnomalyIdT&& value) { SetAnomalyId(std::forward<AnomalyIdT>(value)); return *this;}
59
61
64 inline const Aws::String& GetPatternId() const { return m_patternId; }
65 inline bool PatternIdHasBeenSet() const { return m_patternIdHasBeenSet; }
66 template<typename PatternIdT = Aws::String>
67 void SetPatternId(PatternIdT&& value) { m_patternIdHasBeenSet = true; m_patternId = std::forward<PatternIdT>(value); }
68 template<typename PatternIdT = Aws::String>
69 Anomaly& WithPatternId(PatternIdT&& value) { SetPatternId(std::forward<PatternIdT>(value)); return *this;}
71
73
76 inline const Aws::String& GetAnomalyDetectorArn() const { return m_anomalyDetectorArn; }
77 inline bool AnomalyDetectorArnHasBeenSet() const { return m_anomalyDetectorArnHasBeenSet; }
78 template<typename AnomalyDetectorArnT = Aws::String>
79 void SetAnomalyDetectorArn(AnomalyDetectorArnT&& value) { m_anomalyDetectorArnHasBeenSet = true; m_anomalyDetectorArn = std::forward<AnomalyDetectorArnT>(value); }
80 template<typename AnomalyDetectorArnT = Aws::String>
81 Anomaly& WithAnomalyDetectorArn(AnomalyDetectorArnT&& value) { SetAnomalyDetectorArn(std::forward<AnomalyDetectorArnT>(value)); return *this;}
83
85
88 inline const Aws::String& GetPatternString() const { return m_patternString; }
89 inline bool PatternStringHasBeenSet() const { return m_patternStringHasBeenSet; }
90 template<typename PatternStringT = Aws::String>
91 void SetPatternString(PatternStringT&& value) { m_patternStringHasBeenSet = true; m_patternString = std::forward<PatternStringT>(value); }
92 template<typename PatternStringT = Aws::String>
93 Anomaly& WithPatternString(PatternStringT&& value) { SetPatternString(std::forward<PatternStringT>(value)); return *this;}
95
97
101 inline const Aws::String& GetPatternRegex() const { return m_patternRegex; }
102 inline bool PatternRegexHasBeenSet() const { return m_patternRegexHasBeenSet; }
103 template<typename PatternRegexT = Aws::String>
104 void SetPatternRegex(PatternRegexT&& value) { m_patternRegexHasBeenSet = true; m_patternRegex = std::forward<PatternRegexT>(value); }
105 template<typename PatternRegexT = Aws::String>
106 Anomaly& WithPatternRegex(PatternRegexT&& value) { SetPatternRegex(std::forward<PatternRegexT>(value)); return *this;}
108
110
116 inline const Aws::String& GetPriority() const { return m_priority; }
117 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
118 template<typename PriorityT = Aws::String>
119 void SetPriority(PriorityT&& value) { m_priorityHasBeenSet = true; m_priority = std::forward<PriorityT>(value); }
120 template<typename PriorityT = Aws::String>
121 Anomaly& WithPriority(PriorityT&& value) { SetPriority(std::forward<PriorityT>(value)); return *this;}
123
125
130 inline long long GetFirstSeen() const { return m_firstSeen; }
131 inline bool FirstSeenHasBeenSet() const { return m_firstSeenHasBeenSet; }
132 inline void SetFirstSeen(long long value) { m_firstSeenHasBeenSet = true; m_firstSeen = value; }
133 inline Anomaly& WithFirstSeen(long long value) { SetFirstSeen(value); return *this;}
135
137
142 inline long long GetLastSeen() const { return m_lastSeen; }
143 inline bool LastSeenHasBeenSet() const { return m_lastSeenHasBeenSet; }
144 inline void SetLastSeen(long long value) { m_lastSeenHasBeenSet = true; m_lastSeen = value; }
145 inline Anomaly& WithLastSeen(long long value) { SetLastSeen(value); return *this;}
147
149
153 inline const Aws::String& GetDescription() const { return m_description; }
154 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
155 template<typename DescriptionT = Aws::String>
156 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
157 template<typename DescriptionT = Aws::String>
158 Anomaly& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
160
162
165 inline bool GetActive() const { return m_active; }
166 inline bool ActiveHasBeenSet() const { return m_activeHasBeenSet; }
167 inline void SetActive(bool value) { m_activeHasBeenSet = true; m_active = value; }
168 inline Anomaly& WithActive(bool value) { SetActive(value); return *this;}
170
172
180 inline State GetState() const { return m_state; }
181 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
182 inline void SetState(State value) { m_stateHasBeenSet = true; m_state = value; }
183 inline Anomaly& WithState(State value) { SetState(value); return *this;}
185
187
193 inline const Aws::Map<Aws::String, long long>& GetHistogram() const { return m_histogram; }
194 inline bool HistogramHasBeenSet() const { return m_histogramHasBeenSet; }
195 template<typename HistogramT = Aws::Map<Aws::String, long long>>
196 void SetHistogram(HistogramT&& value) { m_histogramHasBeenSet = true; m_histogram = std::forward<HistogramT>(value); }
197 template<typename HistogramT = Aws::Map<Aws::String, long long>>
198 Anomaly& WithHistogram(HistogramT&& value) { SetHistogram(std::forward<HistogramT>(value)); return *this;}
199 inline Anomaly& AddHistogram(Aws::String key, long long value) {
200 m_histogramHasBeenSet = true; m_histogram.emplace(key, value); return *this;
201 }
203
205
209 inline const Aws::Vector<LogEvent>& GetLogSamples() const { return m_logSamples; }
210 inline bool LogSamplesHasBeenSet() const { return m_logSamplesHasBeenSet; }
211 template<typename LogSamplesT = Aws::Vector<LogEvent>>
212 void SetLogSamples(LogSamplesT&& value) { m_logSamplesHasBeenSet = true; m_logSamples = std::forward<LogSamplesT>(value); }
213 template<typename LogSamplesT = Aws::Vector<LogEvent>>
214 Anomaly& WithLogSamples(LogSamplesT&& value) { SetLogSamples(std::forward<LogSamplesT>(value)); return *this;}
215 template<typename LogSamplesT = LogEvent>
216 Anomaly& AddLogSamples(LogSamplesT&& value) { m_logSamplesHasBeenSet = true; m_logSamples.emplace_back(std::forward<LogSamplesT>(value)); return *this; }
218
220
224 inline const Aws::Vector<PatternToken>& GetPatternTokens() const { return m_patternTokens; }
225 inline bool PatternTokensHasBeenSet() const { return m_patternTokensHasBeenSet; }
226 template<typename PatternTokensT = Aws::Vector<PatternToken>>
227 void SetPatternTokens(PatternTokensT&& value) { m_patternTokensHasBeenSet = true; m_patternTokens = std::forward<PatternTokensT>(value); }
228 template<typename PatternTokensT = Aws::Vector<PatternToken>>
229 Anomaly& WithPatternTokens(PatternTokensT&& value) { SetPatternTokens(std::forward<PatternTokensT>(value)); return *this;}
230 template<typename PatternTokensT = PatternToken>
231 Anomaly& AddPatternTokens(PatternTokensT&& value) { m_patternTokensHasBeenSet = true; m_patternTokens.emplace_back(std::forward<PatternTokensT>(value)); return *this; }
233
235
239 inline const Aws::Vector<Aws::String>& GetLogGroupArnList() const { return m_logGroupArnList; }
240 inline bool LogGroupArnListHasBeenSet() const { return m_logGroupArnListHasBeenSet; }
241 template<typename LogGroupArnListT = Aws::Vector<Aws::String>>
242 void SetLogGroupArnList(LogGroupArnListT&& value) { m_logGroupArnListHasBeenSet = true; m_logGroupArnList = std::forward<LogGroupArnListT>(value); }
243 template<typename LogGroupArnListT = Aws::Vector<Aws::String>>
244 Anomaly& WithLogGroupArnList(LogGroupArnListT&& value) { SetLogGroupArnList(std::forward<LogGroupArnListT>(value)); return *this;}
245 template<typename LogGroupArnListT = Aws::String>
246 Anomaly& AddLogGroupArnList(LogGroupArnListT&& value) { m_logGroupArnListHasBeenSet = true; m_logGroupArnList.emplace_back(std::forward<LogGroupArnListT>(value)); return *this; }
248
250
255 inline bool GetSuppressed() const { return m_suppressed; }
256 inline bool SuppressedHasBeenSet() const { return m_suppressedHasBeenSet; }
257 inline void SetSuppressed(bool value) { m_suppressedHasBeenSet = true; m_suppressed = value; }
258 inline Anomaly& WithSuppressed(bool value) { SetSuppressed(value); return *this;}
260
262
265 inline long long GetSuppressedDate() const { return m_suppressedDate; }
266 inline bool SuppressedDateHasBeenSet() const { return m_suppressedDateHasBeenSet; }
267 inline void SetSuppressedDate(long long value) { m_suppressedDateHasBeenSet = true; m_suppressedDate = value; }
268 inline Anomaly& WithSuppressedDate(long long value) { SetSuppressedDate(value); return *this;}
270
272
277 inline long long GetSuppressedUntil() const { return m_suppressedUntil; }
278 inline bool SuppressedUntilHasBeenSet() const { return m_suppressedUntilHasBeenSet; }
279 inline void SetSuppressedUntil(long long value) { m_suppressedUntilHasBeenSet = true; m_suppressedUntil = value; }
280 inline Anomaly& WithSuppressedUntil(long long value) { SetSuppressedUntil(value); return *this;}
282
284
289 inline bool GetIsPatternLevelSuppression() const { return m_isPatternLevelSuppression; }
290 inline bool IsPatternLevelSuppressionHasBeenSet() const { return m_isPatternLevelSuppressionHasBeenSet; }
291 inline void SetIsPatternLevelSuppression(bool value) { m_isPatternLevelSuppressionHasBeenSet = true; m_isPatternLevelSuppression = value; }
292 inline Anomaly& WithIsPatternLevelSuppression(bool value) { SetIsPatternLevelSuppression(value); return *this;}
294 private:
295
296 Aws::String m_anomalyId;
297 bool m_anomalyIdHasBeenSet = false;
298
299 Aws::String m_patternId;
300 bool m_patternIdHasBeenSet = false;
301
302 Aws::String m_anomalyDetectorArn;
303 bool m_anomalyDetectorArnHasBeenSet = false;
304
305 Aws::String m_patternString;
306 bool m_patternStringHasBeenSet = false;
307
308 Aws::String m_patternRegex;
309 bool m_patternRegexHasBeenSet = false;
310
311 Aws::String m_priority;
312 bool m_priorityHasBeenSet = false;
313
314 long long m_firstSeen{0};
315 bool m_firstSeenHasBeenSet = false;
316
317 long long m_lastSeen{0};
318 bool m_lastSeenHasBeenSet = false;
319
320 Aws::String m_description;
321 bool m_descriptionHasBeenSet = false;
322
323 bool m_active{false};
324 bool m_activeHasBeenSet = false;
325
326 State m_state{State::NOT_SET};
327 bool m_stateHasBeenSet = false;
328
330 bool m_histogramHasBeenSet = false;
331
332 Aws::Vector<LogEvent> m_logSamples;
333 bool m_logSamplesHasBeenSet = false;
334
335 Aws::Vector<PatternToken> m_patternTokens;
336 bool m_patternTokensHasBeenSet = false;
337
338 Aws::Vector<Aws::String> m_logGroupArnList;
339 bool m_logGroupArnListHasBeenSet = false;
340
341 bool m_suppressed{false};
342 bool m_suppressedHasBeenSet = false;
343
344 long long m_suppressedDate{0};
345 bool m_suppressedDateHasBeenSet = false;
346
347 long long m_suppressedUntil{0};
348 bool m_suppressedUntilHasBeenSet = false;
349
350 bool m_isPatternLevelSuppression{false};
351 bool m_isPatternLevelSuppressionHasBeenSet = false;
352 };
353
354} // namespace Model
355} // namespace CloudWatchLogs
356} // namespace Aws
void SetPatternTokens(PatternTokensT &&value)
Definition Anomaly.h:227
Anomaly & AddPatternTokens(PatternTokensT &&value)
Definition Anomaly.h:231
void SetSuppressedUntil(long long value)
Definition Anomaly.h:279
const Aws::Vector< PatternToken > & GetPatternTokens() const
Definition Anomaly.h:224
const Aws::Vector< LogEvent > & GetLogSamples() const
Definition Anomaly.h:209
void SetFirstSeen(long long value)
Definition Anomaly.h:132
void SetLastSeen(long long value)
Definition Anomaly.h:144
const Aws::Map< Aws::String, long long > & GetHistogram() const
Definition Anomaly.h:193
void SetPatternId(PatternIdT &&value)
Definition Anomaly.h:67
const Aws::String & GetDescription() const
Definition Anomaly.h:153
void SetLogSamples(LogSamplesT &&value)
Definition Anomaly.h:212
const Aws::Vector< Aws::String > & GetLogGroupArnList() const
Definition Anomaly.h:239
const Aws::String & GetPriority() const
Definition Anomaly.h:116
const Aws::String & GetAnomalyDetectorArn() const
Definition Anomaly.h:76
void SetPatternString(PatternStringT &&value)
Definition Anomaly.h:91
Anomaly & WithIsPatternLevelSuppression(bool value)
Definition Anomaly.h:292
Anomaly & WithLogGroupArnList(LogGroupArnListT &&value)
Definition Anomaly.h:244
Anomaly & WithPatternString(PatternStringT &&value)
Definition Anomaly.h:93
void SetAnomalyId(AnomalyIdT &&value)
Definition Anomaly.h:55
Anomaly & WithAnomalyDetectorArn(AnomalyDetectorArnT &&value)
Definition Anomaly.h:81
AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const
Anomaly & WithLastSeen(long long value)
Definition Anomaly.h:145
Anomaly & WithActive(bool value)
Definition Anomaly.h:168
const Aws::String & GetPatternId() const
Definition Anomaly.h:64
Anomaly & WithAnomalyId(AnomalyIdT &&value)
Definition Anomaly.h:57
void SetPatternRegex(PatternRegexT &&value)
Definition Anomaly.h:104
const Aws::String & GetAnomalyId() const
Definition Anomaly.h:52
void SetHistogram(HistogramT &&value)
Definition Anomaly.h:196
void SetPriority(PriorityT &&value)
Definition Anomaly.h:119
Anomaly & WithPatternId(PatternIdT &&value)
Definition Anomaly.h:69
const Aws::String & GetPatternRegex() const
Definition Anomaly.h:101
Anomaly & AddLogGroupArnList(LogGroupArnListT &&value)
Definition Anomaly.h:246
Anomaly & WithPatternTokens(PatternTokensT &&value)
Definition Anomaly.h:229
bool AnomalyDetectorArnHasBeenSet() const
Definition Anomaly.h:77
bool IsPatternLevelSuppressionHasBeenSet() const
Definition Anomaly.h:290
Anomaly & WithPriority(PriorityT &&value)
Definition Anomaly.h:121
void SetIsPatternLevelSuppression(bool value)
Definition Anomaly.h:291
Anomaly & WithFirstSeen(long long value)
Definition Anomaly.h:133
AWS_CLOUDWATCHLOGS_API Anomaly & operator=(Aws::Utils::Json::JsonView jsonValue)
Anomaly & WithPatternRegex(PatternRegexT &&value)
Definition Anomaly.h:106
void SetAnomalyDetectorArn(AnomalyDetectorArnT &&value)
Definition Anomaly.h:79
Anomaly & WithSuppressedDate(long long value)
Definition Anomaly.h:268
void SetSuppressedDate(long long value)
Definition Anomaly.h:267
Anomaly & WithSuppressedUntil(long long value)
Definition Anomaly.h:280
Anomaly & WithState(State value)
Definition Anomaly.h:183
Anomaly & AddHistogram(Aws::String key, long long value)
Definition Anomaly.h:199
void SetLogGroupArnList(LogGroupArnListT &&value)
Definition Anomaly.h:242
long long GetSuppressedDate() const
Definition Anomaly.h:265
Anomaly & WithSuppressed(bool value)
Definition Anomaly.h:258
AWS_CLOUDWATCHLOGS_API Anomaly()=default
long long GetSuppressedUntil() const
Definition Anomaly.h:277
Anomaly & WithLogSamples(LogSamplesT &&value)
Definition Anomaly.h:214
bool GetIsPatternLevelSuppression() const
Definition Anomaly.h:289
const Aws::String & GetPatternString() const
Definition Anomaly.h:88
AWS_CLOUDWATCHLOGS_API Anomaly(Aws::Utils::Json::JsonView jsonValue)
Anomaly & AddLogSamples(LogSamplesT &&value)
Definition Anomaly.h:216
void SetDescription(DescriptionT &&value)
Definition Anomaly.h:156
Anomaly & WithDescription(DescriptionT &&value)
Definition Anomaly.h:158
Anomaly & WithHistogram(HistogramT &&value)
Definition Anomaly.h:198
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue