AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
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 template<typename AlarmNameT = Aws::String>
51 void SetAlarmName(AlarmNameT&& value) { m_alarmNameHasBeenSet = true; m_alarmName = std::forward<AlarmNameT>(value); }
52 template<typename AlarmNameT = Aws::String>
53 PutAlarmRequest& WithAlarmName(AlarmNameT&& value) { SetAlarmName(std::forward<AlarmNameT>(value)); return *this;}
55
57
80 inline MetricName GetMetricName() const { return m_metricName; }
81 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
82 inline void SetMetricName(MetricName value) { m_metricNameHasBeenSet = true; m_metricName = value; }
83 inline PutAlarmRequest& WithMetricName(MetricName value) { SetMetricName(value); return *this;}
85
87
92 inline const Aws::String& GetMonitoredResourceName() const { return m_monitoredResourceName; }
93 inline bool MonitoredResourceNameHasBeenSet() const { return m_monitoredResourceNameHasBeenSet; }
94 template<typename MonitoredResourceNameT = Aws::String>
95 void SetMonitoredResourceName(MonitoredResourceNameT&& value) { m_monitoredResourceNameHasBeenSet = true; m_monitoredResourceName = std::forward<MonitoredResourceNameT>(value); }
96 template<typename MonitoredResourceNameT = Aws::String>
97 PutAlarmRequest& WithMonitoredResourceName(MonitoredResourceNameT&& value) { SetMonitoredResourceName(std::forward<MonitoredResourceNameT>(value)); return *this;}
99
101
105 inline ComparisonOperator GetComparisonOperator() const { return m_comparisonOperator; }
106 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
107 inline void SetComparisonOperator(ComparisonOperator value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
110
112
115 inline double GetThreshold() const { return m_threshold; }
116 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
117 inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; }
118 inline PutAlarmRequest& WithThreshold(double value) { SetThreshold(value); return *this;}
120
122
133 inline int GetEvaluationPeriods() const { return m_evaluationPeriods; }
134 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
135 inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; }
136 inline PutAlarmRequest& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;}
138
140
145 inline int GetDatapointsToAlarm() const { return m_datapointsToAlarm; }
146 inline bool DatapointsToAlarmHasBeenSet() const { return m_datapointsToAlarmHasBeenSet; }
147 inline void SetDatapointsToAlarm(int value) { m_datapointsToAlarmHasBeenSet = true; m_datapointsToAlarm = value; }
148 inline PutAlarmRequest& WithDatapointsToAlarm(int value) { SetDatapointsToAlarm(value); return *this;}
150
152
165 inline TreatMissingData GetTreatMissingData() const { return m_treatMissingData; }
166 inline bool TreatMissingDataHasBeenSet() const { return m_treatMissingDataHasBeenSet; }
167 inline void SetTreatMissingData(TreatMissingData value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData = value; }
170
172
183 inline const Aws::Vector<ContactProtocol>& GetContactProtocols() const { return m_contactProtocols; }
184 inline bool ContactProtocolsHasBeenSet() const { return m_contactProtocolsHasBeenSet; }
185 template<typename ContactProtocolsT = Aws::Vector<ContactProtocol>>
186 void SetContactProtocols(ContactProtocolsT&& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols = std::forward<ContactProtocolsT>(value); }
187 template<typename ContactProtocolsT = Aws::Vector<ContactProtocol>>
188 PutAlarmRequest& WithContactProtocols(ContactProtocolsT&& value) { SetContactProtocols(std::forward<ContactProtocolsT>(value)); return *this;}
189 inline PutAlarmRequest& AddContactProtocols(ContactProtocol value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols.push_back(value); return *this; }
191
193
213 inline const Aws::Vector<AlarmState>& GetNotificationTriggers() const { return m_notificationTriggers; }
214 inline bool NotificationTriggersHasBeenSet() const { return m_notificationTriggersHasBeenSet; }
215 template<typename NotificationTriggersT = Aws::Vector<AlarmState>>
216 void SetNotificationTriggers(NotificationTriggersT&& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers = std::forward<NotificationTriggersT>(value); }
217 template<typename NotificationTriggersT = Aws::Vector<AlarmState>>
218 PutAlarmRequest& WithNotificationTriggers(NotificationTriggersT&& value) { SetNotificationTriggers(std::forward<NotificationTriggersT>(value)); return *this;}
219 inline PutAlarmRequest& AddNotificationTriggers(AlarmState value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers.push_back(value); return *this; }
221
223
227 inline bool GetNotificationEnabled() const { return m_notificationEnabled; }
228 inline bool NotificationEnabledHasBeenSet() const { return m_notificationEnabledHasBeenSet; }
229 inline void SetNotificationEnabled(bool value) { m_notificationEnabledHasBeenSet = true; m_notificationEnabled = value; }
230 inline PutAlarmRequest& WithNotificationEnabled(bool value) { SetNotificationEnabled(value); return *this;}
232 private:
233
234 Aws::String m_alarmName;
235 bool m_alarmNameHasBeenSet = false;
236
237 MetricName m_metricName{MetricName::NOT_SET};
238 bool m_metricNameHasBeenSet = false;
239
240 Aws::String m_monitoredResourceName;
241 bool m_monitoredResourceNameHasBeenSet = false;
242
244 bool m_comparisonOperatorHasBeenSet = false;
245
246 double m_threshold{0.0};
247 bool m_thresholdHasBeenSet = false;
248
249 int m_evaluationPeriods{0};
250 bool m_evaluationPeriodsHasBeenSet = false;
251
252 int m_datapointsToAlarm{0};
253 bool m_datapointsToAlarmHasBeenSet = false;
254
256 bool m_treatMissingDataHasBeenSet = false;
257
258 Aws::Vector<ContactProtocol> m_contactProtocols;
259 bool m_contactProtocolsHasBeenSet = false;
260
261 Aws::Vector<AlarmState> m_notificationTriggers;
262 bool m_notificationTriggersHasBeenSet = false;
263
264 bool m_notificationEnabled{false};
265 bool m_notificationEnabledHasBeenSet = false;
266 };
267
268} // namespace Model
269} // namespace Lightsail
270} // namespace Aws
PutAlarmRequest & AddNotificationTriggers(AlarmState value)
const Aws::Vector< AlarmState > & GetNotificationTriggers() const
void SetMonitoredResourceName(MonitoredResourceNameT &&value)
PutAlarmRequest & WithContactProtocols(ContactProtocolsT &&value)
void SetAlarmName(AlarmNameT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutAlarmRequest & WithAlarmName(AlarmNameT &&value)
const Aws::String & GetAlarmName() const
PutAlarmRequest & WithMonitoredResourceName(MonitoredResourceNameT &&value)
void SetComparisonOperator(ComparisonOperator value)
void SetNotificationTriggers(NotificationTriggersT &&value)
const Aws::Vector< ContactProtocol > & GetContactProtocols() const
PutAlarmRequest & WithNotificationEnabled(bool value)
void SetTreatMissingData(TreatMissingData value)
PutAlarmRequest & WithComparisonOperator(ComparisonOperator value)
virtual const char * GetServiceRequestName() const override
PutAlarmRequest & WithEvaluationPeriods(int value)
PutAlarmRequest & WithThreshold(double value)
void SetContactProtocols(ContactProtocolsT &&value)
ComparisonOperator GetComparisonOperator() const
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
const Aws::String & GetMonitoredResourceName() const
PutAlarmRequest & WithMetricName(MetricName value)
AWS_LIGHTSAIL_API PutAlarmRequest()=default
PutAlarmRequest & WithDatapointsToAlarm(int value)
PutAlarmRequest & AddContactProtocols(ContactProtocol value)
PutAlarmRequest & WithTreatMissingData(TreatMissingData value)
PutAlarmRequest & WithNotificationTriggers(NotificationTriggersT &&value)
TreatMissingData GetTreatMissingData() const
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