AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
PutAlarmRequest.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/LightsailRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/lightsail/model/MetricName.h>
11#include <aws/lightsail/model/ComparisonOperator.h>
12#include <aws/lightsail/model/TreatMissingData.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/lightsail/model/ContactProtocol.h>
15#include <aws/lightsail/model/AlarmState.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Lightsail
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_LIGHTSAIL_API PutAlarmRequest();
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "PutAlarm"; }
37
38 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
39
41
42
44
48 inline const Aws::String& GetAlarmName() const{ return m_alarmName; }
49 inline bool AlarmNameHasBeenSet() const { return m_alarmNameHasBeenSet; }
50 inline void SetAlarmName(const Aws::String& value) { m_alarmNameHasBeenSet = true; m_alarmName = value; }
51 inline void SetAlarmName(Aws::String&& value) { m_alarmNameHasBeenSet = true; m_alarmName = std::move(value); }
52 inline void SetAlarmName(const char* value) { m_alarmNameHasBeenSet = true; m_alarmName.assign(value); }
53 inline PutAlarmRequest& WithAlarmName(const Aws::String& value) { SetAlarmName(value); return *this;}
54 inline PutAlarmRequest& WithAlarmName(Aws::String&& value) { SetAlarmName(std::move(value)); return *this;}
55 inline PutAlarmRequest& WithAlarmName(const char* value) { SetAlarmName(value); return *this;}
57
59
82 inline const MetricName& GetMetricName() const{ return m_metricName; }
83 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
84 inline void SetMetricName(const MetricName& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
85 inline void SetMetricName(MetricName&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
86 inline PutAlarmRequest& WithMetricName(const MetricName& value) { SetMetricName(value); return *this;}
87 inline PutAlarmRequest& WithMetricName(MetricName&& value) { SetMetricName(std::move(value)); return *this;}
89
91
96 inline const Aws::String& GetMonitoredResourceName() const{ return m_monitoredResourceName; }
97 inline bool MonitoredResourceNameHasBeenSet() const { return m_monitoredResourceNameHasBeenSet; }
98 inline void SetMonitoredResourceName(const Aws::String& value) { m_monitoredResourceNameHasBeenSet = true; m_monitoredResourceName = value; }
99 inline void SetMonitoredResourceName(Aws::String&& value) { m_monitoredResourceNameHasBeenSet = true; m_monitoredResourceName = std::move(value); }
100 inline void SetMonitoredResourceName(const char* value) { m_monitoredResourceNameHasBeenSet = true; m_monitoredResourceName.assign(value); }
102 inline PutAlarmRequest& WithMonitoredResourceName(Aws::String&& value) { SetMonitoredResourceName(std::move(value)); return *this;}
103 inline PutAlarmRequest& WithMonitoredResourceName(const char* value) { SetMonitoredResourceName(value); return *this;}
105
107
111 inline const ComparisonOperator& GetComparisonOperator() const{ return m_comparisonOperator; }
112 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
113 inline void SetComparisonOperator(const ComparisonOperator& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
114 inline void SetComparisonOperator(ComparisonOperator&& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = std::move(value); }
116 inline PutAlarmRequest& WithComparisonOperator(ComparisonOperator&& value) { SetComparisonOperator(std::move(value)); return *this;}
118
120
123 inline double GetThreshold() const{ return m_threshold; }
124 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
125 inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; }
126 inline PutAlarmRequest& WithThreshold(double value) { SetThreshold(value); return *this;}
128
130
141 inline int GetEvaluationPeriods() const{ return m_evaluationPeriods; }
142 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
143 inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; }
144 inline PutAlarmRequest& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;}
146
148
153 inline int GetDatapointsToAlarm() const{ return m_datapointsToAlarm; }
154 inline bool DatapointsToAlarmHasBeenSet() const { return m_datapointsToAlarmHasBeenSet; }
155 inline void SetDatapointsToAlarm(int value) { m_datapointsToAlarmHasBeenSet = true; m_datapointsToAlarm = value; }
156 inline PutAlarmRequest& WithDatapointsToAlarm(int value) { SetDatapointsToAlarm(value); return *this;}
158
160
173 inline const TreatMissingData& GetTreatMissingData() const{ return m_treatMissingData; }
174 inline bool TreatMissingDataHasBeenSet() const { return m_treatMissingDataHasBeenSet; }
175 inline void SetTreatMissingData(const TreatMissingData& value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData = value; }
176 inline void SetTreatMissingData(TreatMissingData&& value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData = std::move(value); }
177 inline PutAlarmRequest& WithTreatMissingData(const TreatMissingData& value) { SetTreatMissingData(value); return *this;}
178 inline PutAlarmRequest& WithTreatMissingData(TreatMissingData&& value) { SetTreatMissingData(std::move(value)); return *this;}
180
182
193 inline const Aws::Vector<ContactProtocol>& GetContactProtocols() const{ return m_contactProtocols; }
194 inline bool ContactProtocolsHasBeenSet() const { return m_contactProtocolsHasBeenSet; }
195 inline void SetContactProtocols(const Aws::Vector<ContactProtocol>& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols = value; }
196 inline void SetContactProtocols(Aws::Vector<ContactProtocol>&& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols = std::move(value); }
199 inline PutAlarmRequest& AddContactProtocols(const ContactProtocol& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols.push_back(value); return *this; }
200 inline PutAlarmRequest& AddContactProtocols(ContactProtocol&& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols.push_back(std::move(value)); return *this; }
202
204
224 inline const Aws::Vector<AlarmState>& GetNotificationTriggers() const{ return m_notificationTriggers; }
225 inline bool NotificationTriggersHasBeenSet() const { return m_notificationTriggersHasBeenSet; }
226 inline void SetNotificationTriggers(const Aws::Vector<AlarmState>& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers = value; }
227 inline void SetNotificationTriggers(Aws::Vector<AlarmState>&& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers = std::move(value); }
230 inline PutAlarmRequest& AddNotificationTriggers(const AlarmState& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers.push_back(value); return *this; }
231 inline PutAlarmRequest& AddNotificationTriggers(AlarmState&& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers.push_back(std::move(value)); return *this; }
233
235
239 inline bool GetNotificationEnabled() const{ return m_notificationEnabled; }
240 inline bool NotificationEnabledHasBeenSet() const { return m_notificationEnabledHasBeenSet; }
241 inline void SetNotificationEnabled(bool value) { m_notificationEnabledHasBeenSet = true; m_notificationEnabled = value; }
242 inline PutAlarmRequest& WithNotificationEnabled(bool value) { SetNotificationEnabled(value); return *this;}
244 private:
245
246 Aws::String m_alarmName;
247 bool m_alarmNameHasBeenSet = false;
248
249 MetricName m_metricName;
250 bool m_metricNameHasBeenSet = false;
251
252 Aws::String m_monitoredResourceName;
253 bool m_monitoredResourceNameHasBeenSet = false;
254
255 ComparisonOperator m_comparisonOperator;
256 bool m_comparisonOperatorHasBeenSet = false;
257
258 double m_threshold;
259 bool m_thresholdHasBeenSet = false;
260
261 int m_evaluationPeriods;
262 bool m_evaluationPeriodsHasBeenSet = false;
263
264 int m_datapointsToAlarm;
265 bool m_datapointsToAlarmHasBeenSet = false;
266
267 TreatMissingData m_treatMissingData;
268 bool m_treatMissingDataHasBeenSet = false;
269
270 Aws::Vector<ContactProtocol> m_contactProtocols;
271 bool m_contactProtocolsHasBeenSet = false;
272
273 Aws::Vector<AlarmState> m_notificationTriggers;
274 bool m_notificationTriggersHasBeenSet = false;
275
276 bool m_notificationEnabled;
277 bool m_notificationEnabledHasBeenSet = false;
278 };
279
280} // namespace Model
281} // namespace Lightsail
282} // namespace Aws
PutAlarmRequest & WithComparisonOperator(ComparisonOperator &&value)
PutAlarmRequest & AddNotificationTriggers(const AlarmState &value)
void SetContactProtocols(const Aws::Vector< ContactProtocol > &value)
void SetTreatMissingData(TreatMissingData &&value)
void SetMetricName(MetricName &&value)
PutAlarmRequest & AddNotificationTriggers(AlarmState &&value)
void SetAlarmName(const Aws::String &value)
PutAlarmRequest & AddContactProtocols(const ContactProtocol &value)
PutAlarmRequest & WithMonitoredResourceName(const Aws::String &value)
void SetMonitoredResourceName(Aws::String &&value)
const MetricName & GetMetricName() const
void SetContactProtocols(Aws::Vector< ContactProtocol > &&value)
const Aws::Vector< AlarmState > & GetNotificationTriggers() const
PutAlarmRequest & WithTreatMissingData(const TreatMissingData &value)
PutAlarmRequest & WithMetricName(const MetricName &value)
void SetTreatMissingData(const TreatMissingData &value)
PutAlarmRequest & WithMonitoredResourceName(const char *value)
PutAlarmRequest & WithContactProtocols(Aws::Vector< ContactProtocol > &&value)
void SetComparisonOperator(ComparisonOperator &&value)
PutAlarmRequest & WithAlarmName(const Aws::String &value)
void SetMonitoredResourceName(const Aws::String &value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetAlarmName() const
void SetMonitoredResourceName(const char *value)
PutAlarmRequest & WithAlarmName(const char *value)
void SetComparisonOperator(const ComparisonOperator &value)
const Aws::Vector< ContactProtocol > & GetContactProtocols() const
PutAlarmRequest & WithTreatMissingData(TreatMissingData &&value)
PutAlarmRequest & WithNotificationTriggers(const Aws::Vector< AlarmState > &value)
PutAlarmRequest & WithNotificationEnabled(bool value)
void SetAlarmName(Aws::String &&value)
virtual const char * GetServiceRequestName() const override
PutAlarmRequest & WithEvaluationPeriods(int value)
PutAlarmRequest & WithContactProtocols(const Aws::Vector< ContactProtocol > &value)
void SetNotificationTriggers(const Aws::Vector< AlarmState > &value)
PutAlarmRequest & WithThreshold(double value)
PutAlarmRequest & WithAlarmName(Aws::String &&value)
PutAlarmRequest & WithMetricName(MetricName &&value)
PutAlarmRequest & WithNotificationTriggers(Aws::Vector< AlarmState > &&value)
PutAlarmRequest & WithComparisonOperator(const ComparisonOperator &value)
PutAlarmRequest & AddContactProtocols(ContactProtocol &&value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
PutAlarmRequest & WithMonitoredResourceName(Aws::String &&value)
const Aws::String & GetMonitoredResourceName() const
PutAlarmRequest & WithDatapointsToAlarm(int value)
const ComparisonOperator & GetComparisonOperator() const
const TreatMissingData & GetTreatMissingData() const
void SetNotificationTriggers(Aws::Vector< AlarmState > &&value)
void SetMetricName(const MetricName &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector