AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Anomaly.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/logs/CloudWatchLogs_EXPORTS.h>
11#include <aws/logs/model/LogEvent.h>
12#include <aws/logs/model/PatternToken.h>
13#include <aws/logs/model/State.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace CloudWatchLogs {
25namespace Model {
26
35class Anomaly {
36 public:
37 AWS_CLOUDWATCHLOGS_API Anomaly() = default;
38 AWS_CLOUDWATCHLOGS_API Anomaly(Aws::Utils::Json::JsonView jsonValue);
39 AWS_CLOUDWATCHLOGS_API Anomaly& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetAnomalyId() const { return m_anomalyId; }
47 inline bool AnomalyIdHasBeenSet() const { return m_anomalyIdHasBeenSet; }
48 template <typename AnomalyIdT = Aws::String>
49 void SetAnomalyId(AnomalyIdT&& value) {
50 m_anomalyIdHasBeenSet = true;
51 m_anomalyId = std::forward<AnomalyIdT>(value);
52 }
53 template <typename AnomalyIdT = Aws::String>
54 Anomaly& WithAnomalyId(AnomalyIdT&& value) {
55 SetAnomalyId(std::forward<AnomalyIdT>(value));
56 return *this;
57 }
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) {
68 m_patternIdHasBeenSet = true;
69 m_patternId = std::forward<PatternIdT>(value);
70 }
71 template <typename PatternIdT = Aws::String>
72 Anomaly& WithPatternId(PatternIdT&& value) {
73 SetPatternId(std::forward<PatternIdT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetAnomalyDetectorArn() const { return m_anomalyDetectorArn; }
83 inline bool AnomalyDetectorArnHasBeenSet() const { return m_anomalyDetectorArnHasBeenSet; }
84 template <typename AnomalyDetectorArnT = Aws::String>
85 void SetAnomalyDetectorArn(AnomalyDetectorArnT&& value) {
86 m_anomalyDetectorArnHasBeenSet = true;
87 m_anomalyDetectorArn = std::forward<AnomalyDetectorArnT>(value);
88 }
89 template <typename AnomalyDetectorArnT = Aws::String>
90 Anomaly& WithAnomalyDetectorArn(AnomalyDetectorArnT&& value) {
91 SetAnomalyDetectorArn(std::forward<AnomalyDetectorArnT>(value));
92 return *this;
93 }
95
97
100 inline const Aws::String& GetPatternString() const { return m_patternString; }
101 inline bool PatternStringHasBeenSet() const { return m_patternStringHasBeenSet; }
102 template <typename PatternStringT = Aws::String>
103 void SetPatternString(PatternStringT&& value) {
104 m_patternStringHasBeenSet = true;
105 m_patternString = std::forward<PatternStringT>(value);
106 }
107 template <typename PatternStringT = Aws::String>
108 Anomaly& WithPatternString(PatternStringT&& value) {
109 SetPatternString(std::forward<PatternStringT>(value));
110 return *this;
111 }
113
115
119 inline const Aws::String& GetPatternRegex() const { return m_patternRegex; }
120 inline bool PatternRegexHasBeenSet() const { return m_patternRegexHasBeenSet; }
121 template <typename PatternRegexT = Aws::String>
122 void SetPatternRegex(PatternRegexT&& value) {
123 m_patternRegexHasBeenSet = true;
124 m_patternRegex = std::forward<PatternRegexT>(value);
125 }
126 template <typename PatternRegexT = Aws::String>
127 Anomaly& WithPatternRegex(PatternRegexT&& value) {
128 SetPatternRegex(std::forward<PatternRegexT>(value));
129 return *this;
130 }
132
134
140 inline const Aws::String& GetPriority() const { return m_priority; }
141 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
142 template <typename PriorityT = Aws::String>
143 void SetPriority(PriorityT&& value) {
144 m_priorityHasBeenSet = true;
145 m_priority = std::forward<PriorityT>(value);
146 }
147 template <typename PriorityT = Aws::String>
148 Anomaly& WithPriority(PriorityT&& value) {
149 SetPriority(std::forward<PriorityT>(value));
150 return *this;
151 }
153
155
160 inline long long GetFirstSeen() const { return m_firstSeen; }
161 inline bool FirstSeenHasBeenSet() const { return m_firstSeenHasBeenSet; }
162 inline void SetFirstSeen(long long value) {
163 m_firstSeenHasBeenSet = true;
164 m_firstSeen = value;
165 }
166 inline Anomaly& WithFirstSeen(long long value) {
167 SetFirstSeen(value);
168 return *this;
169 }
171
173
178 inline long long GetLastSeen() const { return m_lastSeen; }
179 inline bool LastSeenHasBeenSet() const { return m_lastSeenHasBeenSet; }
180 inline void SetLastSeen(long long value) {
181 m_lastSeenHasBeenSet = true;
182 m_lastSeen = value;
183 }
184 inline Anomaly& WithLastSeen(long long value) {
185 SetLastSeen(value);
186 return *this;
187 }
189
191
195 inline const Aws::String& GetDescription() const { return m_description; }
196 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
197 template <typename DescriptionT = Aws::String>
198 void SetDescription(DescriptionT&& value) {
199 m_descriptionHasBeenSet = true;
200 m_description = std::forward<DescriptionT>(value);
201 }
202 template <typename DescriptionT = Aws::String>
203 Anomaly& WithDescription(DescriptionT&& value) {
204 SetDescription(std::forward<DescriptionT>(value));
205 return *this;
206 }
208
210
213 inline bool GetActive() const { return m_active; }
214 inline bool ActiveHasBeenSet() const { return m_activeHasBeenSet; }
215 inline void SetActive(bool value) {
216 m_activeHasBeenSet = true;
217 m_active = value;
218 }
219 inline Anomaly& WithActive(bool value) {
220 SetActive(value);
221 return *this;
222 }
224
226
234 inline State GetState() const { return m_state; }
235 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
236 inline void SetState(State value) {
237 m_stateHasBeenSet = true;
238 m_state = value;
239 }
240 inline Anomaly& WithState(State value) {
241 SetState(value);
242 return *this;
243 }
245
247
253 inline const Aws::Map<Aws::String, long long>& GetHistogram() const { return m_histogram; }
254 inline bool HistogramHasBeenSet() const { return m_histogramHasBeenSet; }
255 template <typename HistogramT = Aws::Map<Aws::String, long long>>
256 void SetHistogram(HistogramT&& value) {
257 m_histogramHasBeenSet = true;
258 m_histogram = std::forward<HistogramT>(value);
259 }
260 template <typename HistogramT = Aws::Map<Aws::String, long long>>
261 Anomaly& WithHistogram(HistogramT&& value) {
262 SetHistogram(std::forward<HistogramT>(value));
263 return *this;
264 }
265 inline Anomaly& AddHistogram(Aws::String key, long long value) {
266 m_histogramHasBeenSet = true;
267 m_histogram.emplace(key, value);
268 return *this;
269 }
271
273
277 inline const Aws::Vector<LogEvent>& GetLogSamples() const { return m_logSamples; }
278 inline bool LogSamplesHasBeenSet() const { return m_logSamplesHasBeenSet; }
279 template <typename LogSamplesT = Aws::Vector<LogEvent>>
280 void SetLogSamples(LogSamplesT&& value) {
281 m_logSamplesHasBeenSet = true;
282 m_logSamples = std::forward<LogSamplesT>(value);
283 }
284 template <typename LogSamplesT = Aws::Vector<LogEvent>>
285 Anomaly& WithLogSamples(LogSamplesT&& value) {
286 SetLogSamples(std::forward<LogSamplesT>(value));
287 return *this;
288 }
289 template <typename LogSamplesT = LogEvent>
290 Anomaly& AddLogSamples(LogSamplesT&& value) {
291 m_logSamplesHasBeenSet = true;
292 m_logSamples.emplace_back(std::forward<LogSamplesT>(value));
293 return *this;
294 }
296
298
302 inline const Aws::Vector<PatternToken>& GetPatternTokens() const { return m_patternTokens; }
303 inline bool PatternTokensHasBeenSet() const { return m_patternTokensHasBeenSet; }
304 template <typename PatternTokensT = Aws::Vector<PatternToken>>
305 void SetPatternTokens(PatternTokensT&& value) {
306 m_patternTokensHasBeenSet = true;
307 m_patternTokens = std::forward<PatternTokensT>(value);
308 }
309 template <typename PatternTokensT = Aws::Vector<PatternToken>>
310 Anomaly& WithPatternTokens(PatternTokensT&& value) {
311 SetPatternTokens(std::forward<PatternTokensT>(value));
312 return *this;
313 }
314 template <typename PatternTokensT = PatternToken>
315 Anomaly& AddPatternTokens(PatternTokensT&& value) {
316 m_patternTokensHasBeenSet = true;
317 m_patternTokens.emplace_back(std::forward<PatternTokensT>(value));
318 return *this;
319 }
321
323
327 inline const Aws::Vector<Aws::String>& GetLogGroupArnList() const { return m_logGroupArnList; }
328 inline bool LogGroupArnListHasBeenSet() const { return m_logGroupArnListHasBeenSet; }
329 template <typename LogGroupArnListT = Aws::Vector<Aws::String>>
330 void SetLogGroupArnList(LogGroupArnListT&& value) {
331 m_logGroupArnListHasBeenSet = true;
332 m_logGroupArnList = std::forward<LogGroupArnListT>(value);
333 }
334 template <typename LogGroupArnListT = Aws::Vector<Aws::String>>
335 Anomaly& WithLogGroupArnList(LogGroupArnListT&& value) {
336 SetLogGroupArnList(std::forward<LogGroupArnListT>(value));
337 return *this;
338 }
339 template <typename LogGroupArnListT = Aws::String>
340 Anomaly& AddLogGroupArnList(LogGroupArnListT&& value) {
341 m_logGroupArnListHasBeenSet = true;
342 m_logGroupArnList.emplace_back(std::forward<LogGroupArnListT>(value));
343 return *this;
344 }
346
348
353 inline bool GetSuppressed() const { return m_suppressed; }
354 inline bool SuppressedHasBeenSet() const { return m_suppressedHasBeenSet; }
355 inline void SetSuppressed(bool value) {
356 m_suppressedHasBeenSet = true;
357 m_suppressed = value;
358 }
359 inline Anomaly& WithSuppressed(bool value) {
360 SetSuppressed(value);
361 return *this;
362 }
364
366
369 inline long long GetSuppressedDate() const { return m_suppressedDate; }
370 inline bool SuppressedDateHasBeenSet() const { return m_suppressedDateHasBeenSet; }
371 inline void SetSuppressedDate(long long value) {
372 m_suppressedDateHasBeenSet = true;
373 m_suppressedDate = value;
374 }
375 inline Anomaly& WithSuppressedDate(long long value) {
376 SetSuppressedDate(value);
377 return *this;
378 }
380
382
387 inline long long GetSuppressedUntil() const { return m_suppressedUntil; }
388 inline bool SuppressedUntilHasBeenSet() const { return m_suppressedUntilHasBeenSet; }
389 inline void SetSuppressedUntil(long long value) {
390 m_suppressedUntilHasBeenSet = true;
391 m_suppressedUntil = value;
392 }
393 inline Anomaly& WithSuppressedUntil(long long value) {
394 SetSuppressedUntil(value);
395 return *this;
396 }
398
400
405 inline bool GetIsPatternLevelSuppression() const { return m_isPatternLevelSuppression; }
406 inline bool IsPatternLevelSuppressionHasBeenSet() const { return m_isPatternLevelSuppressionHasBeenSet; }
407 inline void SetIsPatternLevelSuppression(bool value) {
408 m_isPatternLevelSuppressionHasBeenSet = true;
409 m_isPatternLevelSuppression = value;
410 }
413 return *this;
414 }
416 private:
417 Aws::String m_anomalyId;
418
419 Aws::String m_patternId;
420
421 Aws::String m_anomalyDetectorArn;
422
423 Aws::String m_patternString;
424
425 Aws::String m_patternRegex;
426
427 Aws::String m_priority;
428
429 long long m_firstSeen{0};
430
431 long long m_lastSeen{0};
432
433 Aws::String m_description;
434
435 bool m_active{false};
436
437 State m_state{State::NOT_SET};
438
440
441 Aws::Vector<LogEvent> m_logSamples;
442
443 Aws::Vector<PatternToken> m_patternTokens;
444
445 Aws::Vector<Aws::String> m_logGroupArnList;
446
447 bool m_suppressed{false};
448
449 long long m_suppressedDate{0};
450
451 long long m_suppressedUntil{0};
452
453 bool m_isPatternLevelSuppression{false};
454 bool m_anomalyIdHasBeenSet = false;
455 bool m_patternIdHasBeenSet = false;
456 bool m_anomalyDetectorArnHasBeenSet = false;
457 bool m_patternStringHasBeenSet = false;
458 bool m_patternRegexHasBeenSet = false;
459 bool m_priorityHasBeenSet = false;
460 bool m_firstSeenHasBeenSet = false;
461 bool m_lastSeenHasBeenSet = false;
462 bool m_descriptionHasBeenSet = false;
463 bool m_activeHasBeenSet = false;
464 bool m_stateHasBeenSet = false;
465 bool m_histogramHasBeenSet = false;
466 bool m_logSamplesHasBeenSet = false;
467 bool m_patternTokensHasBeenSet = false;
468 bool m_logGroupArnListHasBeenSet = false;
469 bool m_suppressedHasBeenSet = false;
470 bool m_suppressedDateHasBeenSet = false;
471 bool m_suppressedUntilHasBeenSet = false;
472 bool m_isPatternLevelSuppressionHasBeenSet = false;
473};
474
475} // namespace Model
476} // namespace CloudWatchLogs
477} // namespace Aws
void SetPatternTokens(PatternTokensT &&value)
Definition Anomaly.h:305
Anomaly & AddPatternTokens(PatternTokensT &&value)
Definition Anomaly.h:315
void SetSuppressedUntil(long long value)
Definition Anomaly.h:389
const Aws::Vector< PatternToken > & GetPatternTokens() const
Definition Anomaly.h:302
const Aws::Vector< LogEvent > & GetLogSamples() const
Definition Anomaly.h:277
void SetFirstSeen(long long value)
Definition Anomaly.h:162
void SetLastSeen(long long value)
Definition Anomaly.h:180
const Aws::Map< Aws::String, long long > & GetHistogram() const
Definition Anomaly.h:253
void SetPatternId(PatternIdT &&value)
Definition Anomaly.h:67
const Aws::String & GetDescription() const
Definition Anomaly.h:195
void SetLogSamples(LogSamplesT &&value)
Definition Anomaly.h:280
const Aws::Vector< Aws::String > & GetLogGroupArnList() const
Definition Anomaly.h:327
const Aws::String & GetPriority() const
Definition Anomaly.h:140
const Aws::String & GetAnomalyDetectorArn() const
Definition Anomaly.h:82
void SetPatternString(PatternStringT &&value)
Definition Anomaly.h:103
Anomaly & WithIsPatternLevelSuppression(bool value)
Definition Anomaly.h:411
Anomaly & WithLogGroupArnList(LogGroupArnListT &&value)
Definition Anomaly.h:335
Anomaly & WithPatternString(PatternStringT &&value)
Definition Anomaly.h:108
void SetAnomalyId(AnomalyIdT &&value)
Definition Anomaly.h:49
Anomaly & WithAnomalyDetectorArn(AnomalyDetectorArnT &&value)
Definition Anomaly.h:90
AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const
Anomaly & WithLastSeen(long long value)
Definition Anomaly.h:184
Anomaly & WithActive(bool value)
Definition Anomaly.h:219
const Aws::String & GetPatternId() const
Definition Anomaly.h:64
Anomaly & WithAnomalyId(AnomalyIdT &&value)
Definition Anomaly.h:54
void SetPatternRegex(PatternRegexT &&value)
Definition Anomaly.h:122
const Aws::String & GetAnomalyId() const
Definition Anomaly.h:46
void SetHistogram(HistogramT &&value)
Definition Anomaly.h:256
void SetPriority(PriorityT &&value)
Definition Anomaly.h:143
Anomaly & WithPatternId(PatternIdT &&value)
Definition Anomaly.h:72
const Aws::String & GetPatternRegex() const
Definition Anomaly.h:119
Anomaly & AddLogGroupArnList(LogGroupArnListT &&value)
Definition Anomaly.h:340
Anomaly & WithPatternTokens(PatternTokensT &&value)
Definition Anomaly.h:310
bool AnomalyDetectorArnHasBeenSet() const
Definition Anomaly.h:83
bool IsPatternLevelSuppressionHasBeenSet() const
Definition Anomaly.h:406
Anomaly & WithPriority(PriorityT &&value)
Definition Anomaly.h:148
void SetIsPatternLevelSuppression(bool value)
Definition Anomaly.h:407
Anomaly & WithFirstSeen(long long value)
Definition Anomaly.h:166
AWS_CLOUDWATCHLOGS_API Anomaly & operator=(Aws::Utils::Json::JsonView jsonValue)
Anomaly & WithPatternRegex(PatternRegexT &&value)
Definition Anomaly.h:127
void SetAnomalyDetectorArn(AnomalyDetectorArnT &&value)
Definition Anomaly.h:85
Anomaly & WithSuppressedDate(long long value)
Definition Anomaly.h:375
void SetSuppressedDate(long long value)
Definition Anomaly.h:371
Anomaly & WithSuppressedUntil(long long value)
Definition Anomaly.h:393
Anomaly & WithState(State value)
Definition Anomaly.h:240
Anomaly & AddHistogram(Aws::String key, long long value)
Definition Anomaly.h:265
void SetLogGroupArnList(LogGroupArnListT &&value)
Definition Anomaly.h:330
long long GetSuppressedDate() const
Definition Anomaly.h:369
Anomaly & WithSuppressed(bool value)
Definition Anomaly.h:359
AWS_CLOUDWATCHLOGS_API Anomaly()=default
long long GetSuppressedUntil() const
Definition Anomaly.h:387
Anomaly & WithLogSamples(LogSamplesT &&value)
Definition Anomaly.h:285
bool GetIsPatternLevelSuppression() const
Definition Anomaly.h:405
const Aws::String & GetPatternString() const
Definition Anomaly.h:100
AWS_CLOUDWATCHLOGS_API Anomaly(Aws::Utils::Json::JsonView jsonValue)
Anomaly & AddLogSamples(LogSamplesT &&value)
Definition Anomaly.h:290
void SetDescription(DescriptionT &&value)
Definition Anomaly.h:198
Anomaly & WithDescription(DescriptionT &&value)
Definition Anomaly.h:203
Anomaly & WithHistogram(HistogramT &&value)
Definition Anomaly.h:261
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