7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/AlarmState.h>
12#include <aws/lightsail/model/ComparisonOperator.h>
13#include <aws/lightsail/model/ContactProtocol.h>
14#include <aws/lightsail/model/MetricName.h>
15#include <aws/lightsail/model/MetricStatistic.h>
16#include <aws/lightsail/model/MetricUnit.h>
17#include <aws/lightsail/model/MonitoredResourceInfo.h>
18#include <aws/lightsail/model/ResourceLocation.h>
19#include <aws/lightsail/model/ResourceType.h>
20#include <aws/lightsail/model/TreatMissingData.h>
44 AWS_LIGHTSAIL_API
Alarm() =
default;
55 template <
typename NameT = Aws::String>
57 m_nameHasBeenSet =
true;
58 m_name = std::forward<NameT>(value);
60 template <
typename NameT = Aws::String>
62 SetName(std::forward<NameT>(value));
73 template <
typename ArnT = Aws::String>
75 m_arnHasBeenSet =
true;
76 m_arn = std::forward<ArnT>(value);
78 template <
typename ArnT = Aws::String>
80 SetArn(std::forward<ArnT>(value));
91 template <
typename CreatedAtT = Aws::Utils::DateTime>
93 m_createdAtHasBeenSet =
true;
94 m_createdAt = std::forward<CreatedAtT>(value);
96 template <
typename CreatedAtT = Aws::Utils::DateTime>
109 template <
typename LocationT = ResourceLocation>
111 m_locationHasBeenSet =
true;
112 m_location = std::forward<LocationT>(value);
114 template <
typename LocationT = ResourceLocation>
128 m_resourceTypeHasBeenSet =
true;
129 m_resourceType = value;
145 template <
typename SupportCodeT = Aws::String>
147 m_supportCodeHasBeenSet =
true;
148 m_supportCode = std::forward<SupportCodeT>(value);
150 template <
typename SupportCodeT = Aws::String>
164 template <
typename MonitoredResourceInfoT = MonitoredResourceInfo>
166 m_monitoredResourceInfoHasBeenSet =
true;
167 m_monitoredResourceInfo = std::forward<MonitoredResourceInfoT>(value);
169 template <
typename MonitoredResourceInfoT = MonitoredResourceInfo>
184 m_comparisonOperatorHasBeenSet =
true;
185 m_comparisonOperator = value;
201 m_evaluationPeriodsHasBeenSet =
true;
202 m_evaluationPeriods = value;
217 m_periodHasBeenSet =
true;
233 m_thresholdHasBeenSet =
true;
250 m_datapointsToAlarmHasBeenSet =
true;
251 m_datapointsToAlarm = value;
275 m_treatMissingDataHasBeenSet =
true;
276 m_treatMissingData = value;
305 m_statisticHasBeenSet =
true;
321 m_metricNameHasBeenSet =
true;
322 m_metricName = value;
342 m_stateHasBeenSet =
true;
358 m_unitHasBeenSet =
true;
374 template <
typename ContactProtocolsT = Aws::Vector<ContactProtocol>>
376 m_contactProtocolsHasBeenSet =
true;
377 m_contactProtocols = std::forward<ContactProtocolsT>(value);
379 template <
typename ContactProtocolsT = Aws::Vector<ContactProtocol>>
385 m_contactProtocolsHasBeenSet =
true;
386 m_contactProtocols.push_back(value);
397 template <
typename NotificationTriggersT = Aws::Vector<AlarmState>>
399 m_notificationTriggersHasBeenSet =
true;
400 m_notificationTriggers = std::forward<NotificationTriggersT>(value);
402 template <
typename NotificationTriggersT = Aws::Vector<AlarmState>>
408 m_notificationTriggersHasBeenSet =
true;
409 m_notificationTriggers.push_back(value);
421 m_notificationEnabledHasBeenSet =
true;
422 m_notificationEnabled = value;
436 ResourceLocation m_location;
442 MonitoredResourceInfo m_monitoredResourceInfo;
446 int m_evaluationPeriods{0};
450 double m_threshold{0.0};
452 int m_datapointsToAlarm{0};
468 bool m_notificationEnabled{
false};
469 bool m_nameHasBeenSet =
false;
470 bool m_arnHasBeenSet =
false;
471 bool m_createdAtHasBeenSet =
false;
472 bool m_locationHasBeenSet =
false;
473 bool m_resourceTypeHasBeenSet =
false;
474 bool m_supportCodeHasBeenSet =
false;
475 bool m_monitoredResourceInfoHasBeenSet =
false;
476 bool m_comparisonOperatorHasBeenSet =
false;
477 bool m_evaluationPeriodsHasBeenSet =
false;
478 bool m_periodHasBeenSet =
false;
479 bool m_thresholdHasBeenSet =
false;
480 bool m_datapointsToAlarmHasBeenSet =
false;
481 bool m_treatMissingDataHasBeenSet =
false;
482 bool m_statisticHasBeenSet =
false;
483 bool m_metricNameHasBeenSet =
false;
484 bool m_stateHasBeenSet =
false;
485 bool m_unitHasBeenSet =
false;
486 bool m_contactProtocolsHasBeenSet =
false;
487 bool m_notificationTriggersHasBeenSet =
false;
488 bool m_notificationEnabledHasBeenSet =
false;
void SetSupportCode(SupportCodeT &&value)
bool CreatedAtHasBeenSet() const
void SetThreshold(double value)
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
ResourceType GetResourceType() const
Alarm & WithArn(ArnT &&value)
Alarm & WithContactProtocols(ContactProtocolsT &&value)
double GetThreshold() const
void SetContactProtocols(ContactProtocolsT &&value)
bool GetNotificationEnabled() const
bool ThresholdHasBeenSet() const
Alarm & AddContactProtocols(ContactProtocol value)
Alarm & WithUnit(MetricUnit value)
void SetResourceType(ResourceType value)
Alarm & WithMonitoredResourceInfo(MonitoredResourceInfoT &&value)
bool LocationHasBeenSet() const
ComparisonOperator GetComparisonOperator() const
void SetCreatedAt(CreatedAtT &&value)
Alarm & WithCreatedAt(CreatedAtT &&value)
void SetNotificationEnabled(bool value)
const Aws::String & GetName() const
void SetArn(ArnT &&value)
MetricStatistic GetStatistic() const
bool TreatMissingDataHasBeenSet() const
const Aws::Vector< AlarmState > & GetNotificationTriggers() const
void SetMetricName(MetricName value)
Alarm & WithPeriod(int value)
void SetLocation(LocationT &&value)
Alarm & AddNotificationTriggers(AlarmState value)
void SetPeriod(int value)
bool MetricNameHasBeenSet() const
int GetDatapointsToAlarm() const
bool NameHasBeenSet() const
void SetDatapointsToAlarm(int value)
Alarm & WithNotificationEnabled(bool value)
AWS_LIGHTSAIL_API Alarm(Aws::Utils::Json::JsonView jsonValue)
Alarm & WithName(NameT &&value)
bool DatapointsToAlarmHasBeenSet() const
const MonitoredResourceInfo & GetMonitoredResourceInfo() const
bool UnitHasBeenSet() const
bool EvaluationPeriodsHasBeenSet() const
Alarm & WithNotificationTriggers(NotificationTriggersT &&value)
bool ResourceTypeHasBeenSet() const
void SetNotificationTriggers(NotificationTriggersT &&value)
void SetComparisonOperator(ComparisonOperator value)
Alarm & WithComparisonOperator(ComparisonOperator value)
Alarm & WithMetricName(MetricName value)
void SetEvaluationPeriods(int value)
void SetName(NameT &&value)
const Aws::Utils::DateTime & GetCreatedAt() const
const Aws::String & GetSupportCode() const
int GetEvaluationPeriods() const
Alarm & WithSupportCode(SupportCodeT &&value)
MetricUnit GetUnit() const
AWS_LIGHTSAIL_API Alarm()=default
void SetState(AlarmState value)
Alarm & WithEvaluationPeriods(int value)
void SetStatistic(MetricStatistic value)
Alarm & WithThreshold(double value)
bool ArnHasBeenSet() const
const Aws::Vector< ContactProtocol > & GetContactProtocols() const
bool StatisticHasBeenSet() const
Alarm & WithStatistic(MetricStatistic value)
void SetTreatMissingData(TreatMissingData value)
bool ComparisonOperatorHasBeenSet() const
Alarm & WithLocation(LocationT &&value)
bool MonitoredResourceInfoHasBeenSet() const
Alarm & WithResourceType(ResourceType value)
bool NotificationEnabledHasBeenSet() const
const Aws::String & GetArn() const
AWS_LIGHTSAIL_API Alarm & operator=(Aws::Utils::Json::JsonView jsonValue)
Alarm & WithDatapointsToAlarm(int value)
bool NotificationTriggersHasBeenSet() const
bool SupportCodeHasBeenSet() const
void SetMonitoredResourceInfo(MonitoredResourceInfoT &&value)
void SetUnit(MetricUnit value)
bool PeriodHasBeenSet() const
TreatMissingData GetTreatMissingData() const
const ResourceLocation & GetLocation() const
AlarmState GetState() const
Alarm & WithTreatMissingData(TreatMissingData value)
bool StateHasBeenSet() const
MetricName GetMetricName() const
bool ContactProtocolsHasBeenSet() const
Alarm & WithState(AlarmState value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue