AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateAlertRequest.h
1
6#pragma once
7#include <aws/lookoutmetrics/LookoutMetrics_EXPORTS.h>
8#include <aws/lookoutmetrics/LookoutMetricsRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/lookoutmetrics/model/Action.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/lookoutmetrics/model/AlertFilters.h>
13#include <utility>
14
15namespace Aws
16{
17namespace LookoutMetrics
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_LOOKOUTMETRICS_API CreateAlertRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateAlert"; }
34
35 AWS_LOOKOUTMETRICS_API Aws::String SerializePayload() const override;
36
37
39
42 inline const Aws::String& GetAlertName() const { return m_alertName; }
43 inline bool AlertNameHasBeenSet() const { return m_alertNameHasBeenSet; }
44 template<typename AlertNameT = Aws::String>
45 void SetAlertName(AlertNameT&& value) { m_alertNameHasBeenSet = true; m_alertName = std::forward<AlertNameT>(value); }
46 template<typename AlertNameT = Aws::String>
47 CreateAlertRequest& WithAlertName(AlertNameT&& value) { SetAlertName(std::forward<AlertNameT>(value)); return *this;}
49
51
54 inline int GetAlertSensitivityThreshold() const { return m_alertSensitivityThreshold; }
55 inline bool AlertSensitivityThresholdHasBeenSet() const { return m_alertSensitivityThresholdHasBeenSet; }
56 inline void SetAlertSensitivityThreshold(int value) { m_alertSensitivityThresholdHasBeenSet = true; m_alertSensitivityThreshold = value; }
59
61
64 inline const Aws::String& GetAlertDescription() const { return m_alertDescription; }
65 inline bool AlertDescriptionHasBeenSet() const { return m_alertDescriptionHasBeenSet; }
66 template<typename AlertDescriptionT = Aws::String>
67 void SetAlertDescription(AlertDescriptionT&& value) { m_alertDescriptionHasBeenSet = true; m_alertDescription = std::forward<AlertDescriptionT>(value); }
68 template<typename AlertDescriptionT = Aws::String>
69 CreateAlertRequest& WithAlertDescription(AlertDescriptionT&& value) { SetAlertDescription(std::forward<AlertDescriptionT>(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 CreateAlertRequest& WithAnomalyDetectorArn(AnomalyDetectorArnT&& value) { SetAnomalyDetectorArn(std::forward<AnomalyDetectorArnT>(value)); return *this;}
83
85
88 inline const Action& GetAction() const { return m_action; }
89 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
90 template<typename ActionT = Action>
91 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
92 template<typename ActionT = Action>
93 CreateAlertRequest& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
95
97
102 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
103 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
104 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
105 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
106 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
107 CreateAlertRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
108 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
109 CreateAlertRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
110 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
111 }
113
115
119 inline const AlertFilters& GetAlertFilters() const { return m_alertFilters; }
120 inline bool AlertFiltersHasBeenSet() const { return m_alertFiltersHasBeenSet; }
121 template<typename AlertFiltersT = AlertFilters>
122 void SetAlertFilters(AlertFiltersT&& value) { m_alertFiltersHasBeenSet = true; m_alertFilters = std::forward<AlertFiltersT>(value); }
123 template<typename AlertFiltersT = AlertFilters>
124 CreateAlertRequest& WithAlertFilters(AlertFiltersT&& value) { SetAlertFilters(std::forward<AlertFiltersT>(value)); return *this;}
126 private:
127
128 Aws::String m_alertName;
129 bool m_alertNameHasBeenSet = false;
130
131 int m_alertSensitivityThreshold{0};
132 bool m_alertSensitivityThresholdHasBeenSet = false;
133
134 Aws::String m_alertDescription;
135 bool m_alertDescriptionHasBeenSet = false;
136
137 Aws::String m_anomalyDetectorArn;
138 bool m_anomalyDetectorArnHasBeenSet = false;
139
140 Action m_action;
141 bool m_actionHasBeenSet = false;
142
144 bool m_tagsHasBeenSet = false;
145
146 AlertFilters m_alertFilters;
147 bool m_alertFiltersHasBeenSet = false;
148 };
149
150} // namespace Model
151} // namespace LookoutMetrics
152} // namespace Aws
CreateAlertRequest & WithAnomalyDetectorArn(AnomalyDetectorArnT &&value)
virtual const char * GetServiceRequestName() const override
CreateAlertRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateAlertRequest & WithTags(TagsT &&value)
AWS_LOOKOUTMETRICS_API CreateAlertRequest()=default
CreateAlertRequest & WithAlertSensitivityThreshold(int value)
CreateAlertRequest & WithAlertDescription(AlertDescriptionT &&value)
CreateAlertRequest & WithAction(ActionT &&value)
CreateAlertRequest & WithAlertFilters(AlertFiltersT &&value)
void SetAnomalyDetectorArn(AnomalyDetectorArnT &&value)
void SetAlertDescription(AlertDescriptionT &&value)
AWS_LOOKOUTMETRICS_API Aws::String SerializePayload() const override
CreateAlertRequest & WithAlertName(AlertNameT &&value)
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