/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Lightsail { namespace Model { /** *

Describes an alarm.

An alarm is a way to monitor your Lightsail * resource metrics. For more information, see Alarms * in Amazon Lightsail.

See Also:

AWS API * Reference

*/ class Alarm { public: AWS_LIGHTSAIL_API Alarm(); AWS_LIGHTSAIL_API Alarm(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Alarm& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the alarm.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the alarm.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the alarm.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the alarm.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the alarm.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the alarm.

*/ inline Alarm& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the alarm.

*/ inline Alarm& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the alarm.

*/ inline Alarm& WithName(const char* value) { SetName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline Alarm& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline Alarm& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline Alarm& WithArn(const char* value) { SetArn(value); return *this;} /** *

The timestamp when the alarm was created.

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The timestamp when the alarm was created.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

The timestamp when the alarm was created.

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

The timestamp when the alarm was created.

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

The timestamp when the alarm was created.

*/ inline Alarm& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The timestamp when the alarm was created.

*/ inline Alarm& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

An object that lists information about the location of the alarm.

*/ inline const ResourceLocation& GetLocation() const{ return m_location; } /** *

An object that lists information about the location of the alarm.

*/ inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; } /** *

An object that lists information about the location of the alarm.

*/ inline void SetLocation(const ResourceLocation& value) { m_locationHasBeenSet = true; m_location = value; } /** *

An object that lists information about the location of the alarm.

*/ inline void SetLocation(ResourceLocation&& value) { m_locationHasBeenSet = true; m_location = std::move(value); } /** *

An object that lists information about the location of the alarm.

*/ inline Alarm& WithLocation(const ResourceLocation& value) { SetLocation(value); return *this;} /** *

An object that lists information about the location of the alarm.

*/ inline Alarm& WithLocation(ResourceLocation&& value) { SetLocation(std::move(value)); return *this;} /** *

The Lightsail resource type (e.g., Alarm).

*/ inline const ResourceType& GetResourceType() const{ return m_resourceType; } /** *

The Lightsail resource type (e.g., Alarm).

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The Lightsail resource type (e.g., Alarm).

*/ inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The Lightsail resource type (e.g., Alarm).

*/ inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The Lightsail resource type (e.g., Alarm).

*/ inline Alarm& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;} /** *

The Lightsail resource type (e.g., Alarm).

*/ inline Alarm& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline const Aws::String& GetSupportCode() const{ return m_supportCode; } /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; } /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline void SetSupportCode(const Aws::String& value) { m_supportCodeHasBeenSet = true; m_supportCode = value; } /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline void SetSupportCode(Aws::String&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::move(value); } /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline void SetSupportCode(const char* value) { m_supportCodeHasBeenSet = true; m_supportCode.assign(value); } /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline Alarm& WithSupportCode(const Aws::String& value) { SetSupportCode(value); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline Alarm& WithSupportCode(Aws::String&& value) { SetSupportCode(std::move(value)); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about your Lightsail alarm. This code enables our support team to look * up your Lightsail information more easily.

*/ inline Alarm& WithSupportCode(const char* value) { SetSupportCode(value); return *this;} /** *

An object that lists information about the resource monitored by the * alarm.

*/ inline const MonitoredResourceInfo& GetMonitoredResourceInfo() const{ return m_monitoredResourceInfo; } /** *

An object that lists information about the resource monitored by the * alarm.

*/ inline bool MonitoredResourceInfoHasBeenSet() const { return m_monitoredResourceInfoHasBeenSet; } /** *

An object that lists information about the resource monitored by the * alarm.

*/ inline void SetMonitoredResourceInfo(const MonitoredResourceInfo& value) { m_monitoredResourceInfoHasBeenSet = true; m_monitoredResourceInfo = value; } /** *

An object that lists information about the resource monitored by the * alarm.

*/ inline void SetMonitoredResourceInfo(MonitoredResourceInfo&& value) { m_monitoredResourceInfoHasBeenSet = true; m_monitoredResourceInfo = std::move(value); } /** *

An object that lists information about the resource monitored by the * alarm.

*/ inline Alarm& WithMonitoredResourceInfo(const MonitoredResourceInfo& value) { SetMonitoredResourceInfo(value); return *this;} /** *

An object that lists information about the resource monitored by the * alarm.

*/ inline Alarm& WithMonitoredResourceInfo(MonitoredResourceInfo&& value) { SetMonitoredResourceInfo(std::move(value)); return *this;} /** *

The arithmetic operation used when comparing the specified statistic and * threshold.

*/ inline const ComparisonOperator& GetComparisonOperator() const{ return m_comparisonOperator; } /** *

The arithmetic operation used when comparing the specified statistic and * threshold.

*/ inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; } /** *

The arithmetic operation used when comparing the specified statistic and * threshold.

*/ inline void SetComparisonOperator(const ComparisonOperator& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; } /** *

The arithmetic operation used when comparing the specified statistic and * threshold.

*/ inline void SetComparisonOperator(ComparisonOperator&& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = std::move(value); } /** *

The arithmetic operation used when comparing the specified statistic and * threshold.

*/ inline Alarm& WithComparisonOperator(const ComparisonOperator& value) { SetComparisonOperator(value); return *this;} /** *

The arithmetic operation used when comparing the specified statistic and * threshold.

*/ inline Alarm& WithComparisonOperator(ComparisonOperator&& value) { SetComparisonOperator(std::move(value)); return *this;} /** *

The number of periods over which data is compared to the specified * threshold.

*/ inline int GetEvaluationPeriods() const{ return m_evaluationPeriods; } /** *

The number of periods over which data is compared to the specified * threshold.

*/ inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; } /** *

The number of periods over which data is compared to the specified * threshold.

*/ inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; } /** *

The number of periods over which data is compared to the specified * threshold.

*/ inline Alarm& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;} /** *

The period, in seconds, over which the statistic is applied.

*/ inline int GetPeriod() const{ return m_period; } /** *

The period, in seconds, over which the statistic is applied.

*/ inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; } /** *

The period, in seconds, over which the statistic is applied.

*/ inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; } /** *

The period, in seconds, over which the statistic is applied.

*/ inline Alarm& WithPeriod(int value) { SetPeriod(value); return *this;} /** *

The value against which the specified statistic is compared.

*/ inline double GetThreshold() const{ return m_threshold; } /** *

The value against which the specified statistic is compared.

*/ inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; } /** *

The value against which the specified statistic is compared.

*/ inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; } /** *

The value against which the specified statistic is compared.

*/ inline Alarm& WithThreshold(double value) { SetThreshold(value); return *this;} /** *

The number of data points that must not within the specified threshold to * trigger the alarm.

*/ inline int GetDatapointsToAlarm() const{ return m_datapointsToAlarm; } /** *

The number of data points that must not within the specified threshold to * trigger the alarm.

*/ inline bool DatapointsToAlarmHasBeenSet() const { return m_datapointsToAlarmHasBeenSet; } /** *

The number of data points that must not within the specified threshold to * trigger the alarm.

*/ inline void SetDatapointsToAlarm(int value) { m_datapointsToAlarmHasBeenSet = true; m_datapointsToAlarm = value; } /** *

The number of data points that must not within the specified threshold to * trigger the alarm.

*/ inline Alarm& WithDatapointsToAlarm(int value) { SetDatapointsToAlarm(value); return *this;} /** *

Specifies how the alarm handles missing data points.

An alarm can * treat missing data in the following ways:

  • * breaching - Assume the missing data is not within the threshold. * Missing data counts towards the number of times the metric is not within the * threshold.

  • notBreaching - Assume the missing * data is within the threshold. Missing data does not count towards the number of * times the metric is not within the threshold.

  • * ignore - Ignore the missing data. Maintains the current alarm * state.

  • missing - Missing data is treated as * missing.

*/ inline const TreatMissingData& GetTreatMissingData() const{ return m_treatMissingData; } /** *

Specifies how the alarm handles missing data points.

An alarm can * treat missing data in the following ways:

  • * breaching - Assume the missing data is not within the threshold. * Missing data counts towards the number of times the metric is not within the * threshold.

  • notBreaching - Assume the missing * data is within the threshold. Missing data does not count towards the number of * times the metric is not within the threshold.

  • * ignore - Ignore the missing data. Maintains the current alarm * state.

  • missing - Missing data is treated as * missing.

*/ inline bool TreatMissingDataHasBeenSet() const { return m_treatMissingDataHasBeenSet; } /** *

Specifies how the alarm handles missing data points.

An alarm can * treat missing data in the following ways:

  • * breaching - Assume the missing data is not within the threshold. * Missing data counts towards the number of times the metric is not within the * threshold.

  • notBreaching - Assume the missing * data is within the threshold. Missing data does not count towards the number of * times the metric is not within the threshold.

  • * ignore - Ignore the missing data. Maintains the current alarm * state.

  • missing - Missing data is treated as * missing.

*/ inline void SetTreatMissingData(const TreatMissingData& value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData = value; } /** *

Specifies how the alarm handles missing data points.

An alarm can * treat missing data in the following ways:

  • * breaching - Assume the missing data is not within the threshold. * Missing data counts towards the number of times the metric is not within the * threshold.

  • notBreaching - Assume the missing * data is within the threshold. Missing data does not count towards the number of * times the metric is not within the threshold.

  • * ignore - Ignore the missing data. Maintains the current alarm * state.

  • missing - Missing data is treated as * missing.

*/ inline void SetTreatMissingData(TreatMissingData&& value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData = std::move(value); } /** *

Specifies how the alarm handles missing data points.

An alarm can * treat missing data in the following ways:

  • * breaching - Assume the missing data is not within the threshold. * Missing data counts towards the number of times the metric is not within the * threshold.

  • notBreaching - Assume the missing * data is within the threshold. Missing data does not count towards the number of * times the metric is not within the threshold.

  • * ignore - Ignore the missing data. Maintains the current alarm * state.

  • missing - Missing data is treated as * missing.

*/ inline Alarm& WithTreatMissingData(const TreatMissingData& value) { SetTreatMissingData(value); return *this;} /** *

Specifies how the alarm handles missing data points.

An alarm can * treat missing data in the following ways:

  • * breaching - Assume the missing data is not within the threshold. * Missing data counts towards the number of times the metric is not within the * threshold.

  • notBreaching - Assume the missing * data is within the threshold. Missing data does not count towards the number of * times the metric is not within the threshold.

  • * ignore - Ignore the missing data. Maintains the current alarm * state.

  • missing - Missing data is treated as * missing.

*/ inline Alarm& WithTreatMissingData(TreatMissingData&& value) { SetTreatMissingData(std::move(value)); return *this;} /** *

The statistic for the metric associated with the alarm.

The following * statistics are available:

  • Minimum - The lowest * value observed during the specified period. Use this value to determine low * volumes of activity for your application.

  • * Maximum - The highest value observed during the specified period. * Use this value to determine high volumes of activity for your application.

    *
  • Sum - All values submitted for the matching metric * added together. You can use this statistic to determine the total volume of a * metric.

  • Average - The value of Sum / SampleCount * during the specified period. By comparing this statistic with the Minimum and * Maximum values, you can determine the full scope of a metric and how close the * average use is to the Minimum and Maximum values. This comparison helps you to * know when to increase or decrease your resources.

  • * SampleCount - The count, or number, of data points used for the * statistical calculation.

*/ inline const MetricStatistic& GetStatistic() const{ return m_statistic; } /** *

The statistic for the metric associated with the alarm.

The following * statistics are available:

  • Minimum - The lowest * value observed during the specified period. Use this value to determine low * volumes of activity for your application.

  • * Maximum - The highest value observed during the specified period. * Use this value to determine high volumes of activity for your application.

    *
  • Sum - All values submitted for the matching metric * added together. You can use this statistic to determine the total volume of a * metric.

  • Average - The value of Sum / SampleCount * during the specified period. By comparing this statistic with the Minimum and * Maximum values, you can determine the full scope of a metric and how close the * average use is to the Minimum and Maximum values. This comparison helps you to * know when to increase or decrease your resources.

  • * SampleCount - The count, or number, of data points used for the * statistical calculation.

*/ inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; } /** *

The statistic for the metric associated with the alarm.

The following * statistics are available:

  • Minimum - The lowest * value observed during the specified period. Use this value to determine low * volumes of activity for your application.

  • * Maximum - The highest value observed during the specified period. * Use this value to determine high volumes of activity for your application.

    *
  • Sum - All values submitted for the matching metric * added together. You can use this statistic to determine the total volume of a * metric.

  • Average - The value of Sum / SampleCount * during the specified period. By comparing this statistic with the Minimum and * Maximum values, you can determine the full scope of a metric and how close the * average use is to the Minimum and Maximum values. This comparison helps you to * know when to increase or decrease your resources.

  • * SampleCount - The count, or number, of data points used for the * statistical calculation.

*/ inline void SetStatistic(const MetricStatistic& value) { m_statisticHasBeenSet = true; m_statistic = value; } /** *

The statistic for the metric associated with the alarm.

The following * statistics are available:

  • Minimum - The lowest * value observed during the specified period. Use this value to determine low * volumes of activity for your application.

  • * Maximum - The highest value observed during the specified period. * Use this value to determine high volumes of activity for your application.

    *
  • Sum - All values submitted for the matching metric * added together. You can use this statistic to determine the total volume of a * metric.

  • Average - The value of Sum / SampleCount * during the specified period. By comparing this statistic with the Minimum and * Maximum values, you can determine the full scope of a metric and how close the * average use is to the Minimum and Maximum values. This comparison helps you to * know when to increase or decrease your resources.

  • * SampleCount - The count, or number, of data points used for the * statistical calculation.

*/ inline void SetStatistic(MetricStatistic&& value) { m_statisticHasBeenSet = true; m_statistic = std::move(value); } /** *

The statistic for the metric associated with the alarm.

The following * statistics are available:

  • Minimum - The lowest * value observed during the specified period. Use this value to determine low * volumes of activity for your application.

  • * Maximum - The highest value observed during the specified period. * Use this value to determine high volumes of activity for your application.

    *
  • Sum - All values submitted for the matching metric * added together. You can use this statistic to determine the total volume of a * metric.

  • Average - The value of Sum / SampleCount * during the specified period. By comparing this statistic with the Minimum and * Maximum values, you can determine the full scope of a metric and how close the * average use is to the Minimum and Maximum values. This comparison helps you to * know when to increase or decrease your resources.

  • * SampleCount - The count, or number, of data points used for the * statistical calculation.

*/ inline Alarm& WithStatistic(const MetricStatistic& value) { SetStatistic(value); return *this;} /** *

The statistic for the metric associated with the alarm.

The following * statistics are available:

  • Minimum - The lowest * value observed during the specified period. Use this value to determine low * volumes of activity for your application.

  • * Maximum - The highest value observed during the specified period. * Use this value to determine high volumes of activity for your application.

    *
  • Sum - All values submitted for the matching metric * added together. You can use this statistic to determine the total volume of a * metric.

  • Average - The value of Sum / SampleCount * during the specified period. By comparing this statistic with the Minimum and * Maximum values, you can determine the full scope of a metric and how close the * average use is to the Minimum and Maximum values. This comparison helps you to * know when to increase or decrease your resources.

  • * SampleCount - The count, or number, of data points used for the * statistical calculation.

*/ inline Alarm& WithStatistic(MetricStatistic&& value) { SetStatistic(std::move(value)); return *this;} /** *

The name of the metric associated with the alarm.

*/ inline const MetricName& GetMetricName() const{ return m_metricName; } /** *

The name of the metric associated with the alarm.

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

The name of the metric associated with the alarm.

*/ inline void SetMetricName(const MetricName& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

The name of the metric associated with the alarm.

*/ inline void SetMetricName(MetricName&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

The name of the metric associated with the alarm.

*/ inline Alarm& WithMetricName(const MetricName& value) { SetMetricName(value); return *this;} /** *

The name of the metric associated with the alarm.

*/ inline Alarm& WithMetricName(MetricName&& value) { SetMetricName(std::move(value)); return *this;} /** *

The current state of the alarm.

An alarm has the following possible * states:

  • ALARM - The metric is outside of the * defined threshold.

  • INSUFFICIENT_DATA - The alarm * has just started, the metric is not available, or not enough data is available * for the metric to determine the alarm state.

  • OK * - The metric is within the defined threshold.

*/ inline const AlarmState& GetState() const{ return m_state; } /** *

The current state of the alarm.

An alarm has the following possible * states:

  • ALARM - The metric is outside of the * defined threshold.

  • INSUFFICIENT_DATA - The alarm * has just started, the metric is not available, or not enough data is available * for the metric to determine the alarm state.

  • OK * - The metric is within the defined threshold.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The current state of the alarm.

An alarm has the following possible * states:

  • ALARM - The metric is outside of the * defined threshold.

  • INSUFFICIENT_DATA - The alarm * has just started, the metric is not available, or not enough data is available * for the metric to determine the alarm state.

  • OK * - The metric is within the defined threshold.

*/ inline void SetState(const AlarmState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The current state of the alarm.

An alarm has the following possible * states:

  • ALARM - The metric is outside of the * defined threshold.

  • INSUFFICIENT_DATA - The alarm * has just started, the metric is not available, or not enough data is available * for the metric to determine the alarm state.

  • OK * - The metric is within the defined threshold.

*/ inline void SetState(AlarmState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The current state of the alarm.

An alarm has the following possible * states:

  • ALARM - The metric is outside of the * defined threshold.

  • INSUFFICIENT_DATA - The alarm * has just started, the metric is not available, or not enough data is available * for the metric to determine the alarm state.

  • OK * - The metric is within the defined threshold.

*/ inline Alarm& WithState(const AlarmState& value) { SetState(value); return *this;} /** *

The current state of the alarm.

An alarm has the following possible * states:

  • ALARM - The metric is outside of the * defined threshold.

  • INSUFFICIENT_DATA - The alarm * has just started, the metric is not available, or not enough data is available * for the metric to determine the alarm state.

  • OK * - The metric is within the defined threshold.

*/ inline Alarm& WithState(AlarmState&& value) { SetState(std::move(value)); return *this;} /** *

The unit of the metric associated with the alarm.

*/ inline const MetricUnit& GetUnit() const{ return m_unit; } /** *

The unit of the metric associated with the alarm.

*/ inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; } /** *

The unit of the metric associated with the alarm.

*/ inline void SetUnit(const MetricUnit& value) { m_unitHasBeenSet = true; m_unit = value; } /** *

The unit of the metric associated with the alarm.

*/ inline void SetUnit(MetricUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); } /** *

The unit of the metric associated with the alarm.

*/ inline Alarm& WithUnit(const MetricUnit& value) { SetUnit(value); return *this;} /** *

The unit of the metric associated with the alarm.

*/ inline Alarm& WithUnit(MetricUnit&& value) { SetUnit(std::move(value)); return *this;} /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline const Aws::Vector& GetContactProtocols() const{ return m_contactProtocols; } /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline bool ContactProtocolsHasBeenSet() const { return m_contactProtocolsHasBeenSet; } /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline void SetContactProtocols(const Aws::Vector& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols = value; } /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline void SetContactProtocols(Aws::Vector&& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols = std::move(value); } /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline Alarm& WithContactProtocols(const Aws::Vector& value) { SetContactProtocols(value); return *this;} /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline Alarm& WithContactProtocols(Aws::Vector&& value) { SetContactProtocols(std::move(value)); return *this;} /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline Alarm& AddContactProtocols(const ContactProtocol& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols.push_back(value); return *this; } /** *

The contact protocols for the alarm, such as Email, * SMS (text messaging), or both.

*/ inline Alarm& AddContactProtocols(ContactProtocol&& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols.push_back(std::move(value)); return *this; } /** *

The alarm states that trigger a notification.

*/ inline const Aws::Vector& GetNotificationTriggers() const{ return m_notificationTriggers; } /** *

The alarm states that trigger a notification.

*/ inline bool NotificationTriggersHasBeenSet() const { return m_notificationTriggersHasBeenSet; } /** *

The alarm states that trigger a notification.

*/ inline void SetNotificationTriggers(const Aws::Vector& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers = value; } /** *

The alarm states that trigger a notification.

*/ inline void SetNotificationTriggers(Aws::Vector&& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers = std::move(value); } /** *

The alarm states that trigger a notification.

*/ inline Alarm& WithNotificationTriggers(const Aws::Vector& value) { SetNotificationTriggers(value); return *this;} /** *

The alarm states that trigger a notification.

*/ inline Alarm& WithNotificationTriggers(Aws::Vector&& value) { SetNotificationTriggers(std::move(value)); return *this;} /** *

The alarm states that trigger a notification.

*/ inline Alarm& AddNotificationTriggers(const AlarmState& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers.push_back(value); return *this; } /** *

The alarm states that trigger a notification.

*/ inline Alarm& AddNotificationTriggers(AlarmState&& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers.push_back(std::move(value)); return *this; } /** *

Indicates whether the alarm is enabled.

*/ inline bool GetNotificationEnabled() const{ return m_notificationEnabled; } /** *

Indicates whether the alarm is enabled.

*/ inline bool NotificationEnabledHasBeenSet() const { return m_notificationEnabledHasBeenSet; } /** *

Indicates whether the alarm is enabled.

*/ inline void SetNotificationEnabled(bool value) { m_notificationEnabledHasBeenSet = true; m_notificationEnabled = value; } /** *

Indicates whether the alarm is enabled.

*/ inline Alarm& WithNotificationEnabled(bool value) { SetNotificationEnabled(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet = false; ResourceLocation m_location; bool m_locationHasBeenSet = false; ResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::String m_supportCode; bool m_supportCodeHasBeenSet = false; MonitoredResourceInfo m_monitoredResourceInfo; bool m_monitoredResourceInfoHasBeenSet = false; ComparisonOperator m_comparisonOperator; bool m_comparisonOperatorHasBeenSet = false; int m_evaluationPeriods; bool m_evaluationPeriodsHasBeenSet = false; int m_period; bool m_periodHasBeenSet = false; double m_threshold; bool m_thresholdHasBeenSet = false; int m_datapointsToAlarm; bool m_datapointsToAlarmHasBeenSet = false; TreatMissingData m_treatMissingData; bool m_treatMissingDataHasBeenSet = false; MetricStatistic m_statistic; bool m_statisticHasBeenSet = false; MetricName m_metricName; bool m_metricNameHasBeenSet = false; AlarmState m_state; bool m_stateHasBeenSet = false; MetricUnit m_unit; bool m_unitHasBeenSet = false; Aws::Vector m_contactProtocols; bool m_contactProtocolsHasBeenSet = false; Aws::Vector m_notificationTriggers; bool m_notificationTriggersHasBeenSet = false; bool m_notificationEnabled; bool m_notificationEnabledHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws