/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutAlarmRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration * of the alarm. *
*/ private String alarmName; /** ** The name of the metric to associate with the alarm. *
** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
, StatusCheckFailed
,
* StatusCheckFailed_Instance
, and StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. *
*/ private String metricName; /** ** The name of the Lightsail resource that will be monitored. *
** Instances, load balancers, and relational databases are the only Lightsail resources that can currently be * monitored by alarms. *
*/ private String monitoredResourceName; /** ** The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic * value is used as the first operand. *
*/ private String comparisonOperator; /** ** The value against which the specified statistic is compared. *
*/ private Double threshold; /** *
* The number of most recent periods over which data is compared to the specified threshold. If you are setting an
* "M out of N" alarm, this value (evaluationPeriods
) is the N.
*
* If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the * alarm, this value specifies the rolling period of time in which data points are evaluated. *
** Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a metric * over a rolling period of two hours. *
** You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 hours). *
*/ private Integer evaluationPeriods; /** *
* The number of data points that must be not within the specified threshold to trigger the alarm. If you are
* setting an "M out of N" alarm, this value (datapointsToAlarm
) is the M.
*
* Sets how this alarm will handle 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
*
* The contact protocols to use for the alarm, such as Email
, SMS
(text messaging), or
* both.
*
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when * the alarm is triggered. *
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not
* configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using the
* notificationEnabled
paramater.
*
* Use the CreateContactMethod
action to configure a contact protocol in an Amazon Web Services Region.
*
* The alarm states that trigger a notification. *
** 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.
*
* When you specify a notification trigger, the ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the ALARM
* state.
*
* If you specify OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be thought
* of as an all clear alarm notification.
*
* If you specify INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
state.
*
* The notification trigger defaults to ALARM
if you don't specify this parameter.
*
* Indicates whether the alarm is enabled. *
** Notifications are enabled by default if you don't specify this parameter. *
*/ private Boolean notificationEnabled; /** ** The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration * of the alarm. *
* * @param alarmName * The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous * configuration of the alarm. */ public void setAlarmName(String alarmName) { this.alarmName = alarmName; } /** ** The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration * of the alarm. *
* * @return The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous * configuration of the alarm. */ public String getAlarmName() { return this.alarmName; } /** ** The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration * of the alarm. *
* * @param alarmName * The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous * configuration of the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAlarmRequest withAlarmName(String alarmName) { setAlarmName(alarmName); return this; } /** ** The name of the metric to associate with the alarm. *
** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
, StatusCheckFailed
,
* StatusCheckFailed_Instance
, and StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. *
* * @param metricName * The name of the metric to associate with the alarm. ** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
,
* StatusCheckFailed
, StatusCheckFailed_Instance
, and
* StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. * @see MetricName */ public void setMetricName(String metricName) { this.metricName = metricName; } /** *
* The name of the metric to associate with the alarm. *
** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
, StatusCheckFailed
,
* StatusCheckFailed_Instance
, and StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. *
* * @return The name of the metric to associate with the alarm. ** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
,
* StatusCheckFailed
, StatusCheckFailed_Instance
, and
* StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. * @see MetricName */ public String getMetricName() { return this.metricName; } /** *
* The name of the metric to associate with the alarm. *
** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
, StatusCheckFailed
,
* StatusCheckFailed_Instance
, and StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. *
* * @param metricName * The name of the metric to associate with the alarm. ** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
,
* StatusCheckFailed
, StatusCheckFailed_Instance
, and
* StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. * @return Returns a reference to this object so that method calls can be chained together. * @see MetricName */ public PutAlarmRequest withMetricName(String metricName) { setMetricName(metricName); return this; } /** *
* The name of the metric to associate with the alarm. *
** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
, StatusCheckFailed
,
* StatusCheckFailed_Instance
, and StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. *
* * @param metricName * The name of the metric to associate with the alarm. ** You can configure up to two alarms per metric. *
** The following metrics are available for each resource type: *
*
* Instances: BurstCapacityPercentage
, BurstCapacityTime
,
* CPUUtilization
, NetworkIn
, NetworkOut
,
* StatusCheckFailed
, StatusCheckFailed_Instance
, and
* StatusCheckFailed_System
.
*
* Load balancers: ClientTLSNegotiationErrorCount
, HealthyHostCount
,
* UnhealthyHostCount
, HTTPCode_LB_4XX_Count
, HTTPCode_LB_5XX_Count
,
* HTTPCode_Instance_2XX_Count
, HTTPCode_Instance_3XX_Count
,
* HTTPCode_Instance_4XX_Count
, HTTPCode_Instance_5XX_Count
,
* InstanceResponseTime
, RejectedConnectionCount
, and RequestCount
.
*
* Relational databases: CPUUtilization
, DatabaseConnections
,
* DiskQueueDepth
, FreeStorageSpace
, NetworkReceiveThroughput
, and
* NetworkTransmitThroughput
.
*
* For more information about these metrics, see Metrics available in Lightsail. * @return Returns a reference to this object so that method calls can be chained together. * @see MetricName */ public PutAlarmRequest withMetricName(MetricName metricName) { this.metricName = metricName.toString(); return this; } /** *
* The name of the Lightsail resource that will be monitored. *
** Instances, load balancers, and relational databases are the only Lightsail resources that can currently be * monitored by alarms. *
* * @param monitoredResourceName * The name of the Lightsail resource that will be monitored. ** Instances, load balancers, and relational databases are the only Lightsail resources that can currently be * monitored by alarms. */ public void setMonitoredResourceName(String monitoredResourceName) { this.monitoredResourceName = monitoredResourceName; } /** *
* The name of the Lightsail resource that will be monitored. *
** Instances, load balancers, and relational databases are the only Lightsail resources that can currently be * monitored by alarms. *
* * @return The name of the Lightsail resource that will be monitored. ** Instances, load balancers, and relational databases are the only Lightsail resources that can currently * be monitored by alarms. */ public String getMonitoredResourceName() { return this.monitoredResourceName; } /** *
* The name of the Lightsail resource that will be monitored. *
** Instances, load balancers, and relational databases are the only Lightsail resources that can currently be * monitored by alarms. *
* * @param monitoredResourceName * The name of the Lightsail resource that will be monitored. ** Instances, load balancers, and relational databases are the only Lightsail resources that can currently be * monitored by alarms. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAlarmRequest withMonitoredResourceName(String monitoredResourceName) { setMonitoredResourceName(monitoredResourceName); return this; } /** *
* The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic * value is used as the first operand. *
* * @param comparisonOperator * The arithmetic operation to use when comparing the specified statistic to the threshold. The specified * statistic value is used as the first operand. * @see ComparisonOperator */ public void setComparisonOperator(String comparisonOperator) { this.comparisonOperator = comparisonOperator; } /** ** The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic * value is used as the first operand. *
* * @return The arithmetic operation to use when comparing the specified statistic to the threshold. The specified * statistic value is used as the first operand. * @see ComparisonOperator */ public String getComparisonOperator() { return this.comparisonOperator; } /** ** The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic * value is used as the first operand. *
* * @param comparisonOperator * The arithmetic operation to use when comparing the specified statistic to the threshold. The specified * statistic value is used as the first operand. * @return Returns a reference to this object so that method calls can be chained together. * @see ComparisonOperator */ public PutAlarmRequest withComparisonOperator(String comparisonOperator) { setComparisonOperator(comparisonOperator); return this; } /** ** The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic * value is used as the first operand. *
* * @param comparisonOperator * The arithmetic operation to use when comparing the specified statistic to the threshold. The specified * statistic value is used as the first operand. * @return Returns a reference to this object so that method calls can be chained together. * @see ComparisonOperator */ public PutAlarmRequest withComparisonOperator(ComparisonOperator comparisonOperator) { this.comparisonOperator = comparisonOperator.toString(); return this; } /** ** The value against which the specified statistic is compared. *
* * @param threshold * The value against which the specified statistic is compared. */ public void setThreshold(Double threshold) { this.threshold = threshold; } /** ** The value against which the specified statistic is compared. *
* * @return The value against which the specified statistic is compared. */ public Double getThreshold() { return this.threshold; } /** ** The value against which the specified statistic is compared. *
* * @param threshold * The value against which the specified statistic is compared. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAlarmRequest withThreshold(Double threshold) { setThreshold(threshold); return this; } /** *
* The number of most recent periods over which data is compared to the specified threshold. If you are setting an
* "M out of N" alarm, this value (evaluationPeriods
) is the N.
*
* If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the * alarm, this value specifies the rolling period of time in which data points are evaluated. *
** Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a metric * over a rolling period of two hours. *
** You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 hours). *
* * @param evaluationPeriods * The number of most recent periods over which data is compared to the specified threshold. If you are * setting an "M out of N" alarm, this value (evaluationPeriods
) is the N.
* * If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger * the alarm, this value specifies the rolling period of time in which data points are evaluated. *
** Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a * metric over a rolling period of two hours. *
** You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 * hours). */ public void setEvaluationPeriods(Integer evaluationPeriods) { this.evaluationPeriods = evaluationPeriods; } /** *
* The number of most recent periods over which data is compared to the specified threshold. If you are setting an
* "M out of N" alarm, this value (evaluationPeriods
) is the N.
*
* If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the * alarm, this value specifies the rolling period of time in which data points are evaluated. *
** Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a metric * over a rolling period of two hours. *
** You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 hours). *
* * @return The number of most recent periods over which data is compared to the specified threshold. If you are * setting an "M out of N" alarm, this value (evaluationPeriods
) is the N.
* * If you are setting an alarm that requires that a number of consecutive data points be breaching to * trigger the alarm, this value specifies the rolling period of time in which data points are evaluated. *
** Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate * a metric over a rolling period of two hours. *
** You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 * hours). */ public Integer getEvaluationPeriods() { return this.evaluationPeriods; } /** *
* The number of most recent periods over which data is compared to the specified threshold. If you are setting an
* "M out of N" alarm, this value (evaluationPeriods
) is the N.
*
* If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the * alarm, this value specifies the rolling period of time in which data points are evaluated. *
** Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a metric * over a rolling period of two hours. *
** You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 hours). *
* * @param evaluationPeriods * The number of most recent periods over which data is compared to the specified threshold. If you are * setting an "M out of N" alarm, this value (evaluationPeriods
) is the N.
* * If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger * the alarm, this value specifies the rolling period of time in which data points are evaluated. *
** Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a * metric over a rolling period of two hours. *
** You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 * hours). * @return Returns a reference to this object so that method calls can be chained together. */ public PutAlarmRequest withEvaluationPeriods(Integer evaluationPeriods) { setEvaluationPeriods(evaluationPeriods); return this; } /** *
* The number of data points that must be not within the specified threshold to trigger the alarm. If you are
* setting an "M out of N" alarm, this value (datapointsToAlarm
) is the M.
*
datapointsToAlarm
) is the M.
*/
public void setDatapointsToAlarm(Integer datapointsToAlarm) {
this.datapointsToAlarm = datapointsToAlarm;
}
/**
*
* The number of data points that must be not within the specified threshold to trigger the alarm. If you are
* setting an "M out of N" alarm, this value (datapointsToAlarm
) is the M.
*
datapointsToAlarm
) is the M.
*/
public Integer getDatapointsToAlarm() {
return this.datapointsToAlarm;
}
/**
*
* The number of data points that must be not within the specified threshold to trigger the alarm. If you are
* setting an "M out of N" alarm, this value (datapointsToAlarm
) is the M.
*
datapointsToAlarm
) is the M.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutAlarmRequest withDatapointsToAlarm(Integer datapointsToAlarm) {
setDatapointsToAlarm(datapointsToAlarm);
return this;
}
/**
* * Sets how this alarm will handle 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
*
* 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
* @see TreatMissingData
*/
public void setTreatMissingData(String treatMissingData) {
this.treatMissingData = treatMissingData;
}
/**
*
* Sets how this alarm will handle 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
*
* 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
* @see TreatMissingData
*/
public String getTreatMissingData() {
return this.treatMissingData;
}
/**
*
* Sets how this alarm will handle 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
*
* 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TreatMissingData
*/
public PutAlarmRequest withTreatMissingData(String treatMissingData) {
setTreatMissingData(treatMissingData);
return this;
}
/**
*
* Sets how this alarm will handle 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
*
* 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.
*
* If treatMissingData
is not specified, the default behavior of missing
is used.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TreatMissingData
*/
public PutAlarmRequest withTreatMissingData(TreatMissingData treatMissingData) {
this.treatMissingData = treatMissingData.toString();
return this;
}
/**
*
* The contact protocols to use for the alarm, such as Email
, SMS
(text messaging), or
* both.
*
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when * the alarm is triggered. *
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not
* configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using the
* notificationEnabled
paramater.
*
* Use the CreateContactMethod
action to configure a contact protocol in an Amazon Web Services Region.
*
Email
, SMS
(text
* messaging), or both.
* * A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered. *
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is
* not configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using
* the notificationEnabled
paramater.
*
* Use the
* The contact protocols to use for the alarm, such as
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when
* the alarm is triggered.
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not
* configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using the
*
* Use the CreateContactMethod
action to configure a contact protocol in an Amazon Web Services
* Region.
* @see ContactProtocol
*/
public java.util.ListEmail
, SMS
(text messaging), or
* both.
* notificationEnabled
paramater.
* CreateContactMethod
action to configure a contact protocol in an Amazon Web Services Region.
* Email
, SMS
(text messaging),
* or both.
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered. *
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is
* not configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using
* the notificationEnabled
paramater.
*
* Use the
* The contact protocols to use for the alarm, such as
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when
* the alarm is triggered.
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not
* configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using the
*
* Use the
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setContactProtocols(java.util.Collection)} or {@link #withContactProtocols(java.util.Collection)} if you
* want to override the existing values.
* CreateContactMethod
action to configure a contact protocol in an Amazon Web Services
* Region.
* @see ContactProtocol
*/
public void setContactProtocols(java.util.CollectionEmail
, SMS
(text messaging), or
* both.
* notificationEnabled
paramater.
* CreateContactMethod
action to configure a contact protocol in an Amazon Web Services Region.
* Email
, SMS
(text messaging),
* or both.
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered. *
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is
* not configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using
* the notificationEnabled
paramater.
*
* Use the
* The contact protocols to use for the alarm, such as
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when
* the alarm is triggered.
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not
* configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using the
*
* Use the CreateContactMethod
action to configure a contact protocol in an Amazon Web Services
* Region.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ContactProtocol
*/
public PutAlarmRequest withContactProtocols(String... contactProtocols) {
if (this.contactProtocols == null) {
setContactProtocols(new java.util.ArrayListEmail
, SMS
(text messaging), or
* both.
* notificationEnabled
paramater.
* CreateContactMethod
action to configure a contact protocol in an Amazon Web Services Region.
* Email
, SMS
(text messaging),
* or both.
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered. *
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is
* not configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using
* the notificationEnabled
paramater.
*
* Use the
* The contact protocols to use for the alarm, such as
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when
* the alarm is triggered.
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not
* configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using the
*
* Use the CreateContactMethod
action to configure a contact protocol in an Amazon Web Services
* Region.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ContactProtocol
*/
public PutAlarmRequest withContactProtocols(java.util.CollectionEmail
, SMS
(text messaging), or
* both.
* notificationEnabled
paramater.
* CreateContactMethod
action to configure a contact protocol in an Amazon Web Services Region.
* Email
, SMS
(text messaging),
* or both.
* A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered. *
*
* A notification is not sent if a contact protocol is not specified, if the specified contact protocol is
* not configured in the Amazon Web Services Region, or if notifications are not enabled for the alarm using
* the notificationEnabled
paramater.
*
* Use the
* The alarm states that trigger a notification.
*
* An alarm has the following possible states:
*
*
*
*
* When you specify a notification trigger, the
* If you specify
* If you specify
* The notification trigger defaults to CreateContactMethod
action to configure a contact protocol in an Amazon Web Services
* Region.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ContactProtocol
*/
public PutAlarmRequest withContactProtocols(ContactProtocol... contactProtocols) {
java.util.ArrayList
*
* 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.
* ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the ALARM
* state.
*
*
* OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be thought
* of as an all clear alarm notification.
* INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
state.
* ALARM
if you don't specify this parameter.
*
* 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.
*
* When you specify a notification trigger, the ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the
* ALARM
state.
*
* If you specify OK
as an alarm trigger, a notification is sent when the alarm switches from
* an ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can
* be thought of as an all clear alarm notification.
*
* If you specify INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
* state.
*
* The notification trigger defaults to
* The alarm states that trigger a notification.
*
* An alarm has the following possible states:
*
*
*
*
* When you specify a notification trigger, the
* If you specify
* If you specify
* The notification trigger defaults to ALARM
if you don't specify this parameter.
* @see AlarmState
*/
public java.util.List
*
* 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.
* ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the ALARM
* state.
*
*
* OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be thought
* of as an all clear alarm notification.
* INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
state.
* ALARM
if you don't specify this parameter.
*
* 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.
*
* When you specify a notification trigger, the ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the
* ALARM
state.
*
* If you specify OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be
* thought of as an all clear alarm notification.
*
* If you specify INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
* state.
*
* The notification trigger defaults to
* The alarm states that trigger a notification.
*
* An alarm has the following possible states:
*
*
*
*
* When you specify a notification trigger, the
* If you specify
* If you specify
* The notification trigger defaults to
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNotificationTriggers(java.util.Collection)} or {@link #withNotificationTriggers(java.util.Collection)}
* if you want to override the existing values.
* ALARM
if you don't specify this parameter.
* @see AlarmState
*/
public void setNotificationTriggers(java.util.Collection
*
* 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.
* ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the ALARM
* state.
*
*
* OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be thought
* of as an all clear alarm notification.
* INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
state.
* ALARM
if you don't specify this parameter.
*
* 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.
*
* When you specify a notification trigger, the ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the
* ALARM
state.
*
* If you specify OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be
* thought of as an all clear alarm notification.
*
* If you specify INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
* state.
*
* The notification trigger defaults to
* The alarm states that trigger a notification.
*
* An alarm has the following possible states:
*
*
*
*
* When you specify a notification trigger, the
* If you specify
* If you specify
* The notification trigger defaults to ALARM
if you don't specify this parameter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AlarmState
*/
public PutAlarmRequest withNotificationTriggers(String... notificationTriggers) {
if (this.notificationTriggers == null) {
setNotificationTriggers(new java.util.ArrayList
*
* 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.
* ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the ALARM
* state.
*
*
* OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be thought
* of as an all clear alarm notification.
* INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
state.
* ALARM
if you don't specify this parameter.
*
* 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.
*
* When you specify a notification trigger, the ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the
* ALARM
state.
*
* If you specify OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be
* thought of as an all clear alarm notification.
*
* If you specify INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
* state.
*
* The notification trigger defaults to
* The alarm states that trigger a notification.
*
* An alarm has the following possible states:
*
*
*
*
* When you specify a notification trigger, the
* If you specify
* If you specify
* The notification trigger defaults to ALARM
if you don't specify this parameter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AlarmState
*/
public PutAlarmRequest withNotificationTriggers(java.util.Collection
*
* 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.
* ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the ALARM
* state.
*
*
* OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be thought
* of as an all clear alarm notification.
* INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
state.
* ALARM
if you don't specify this parameter.
*
* 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.
*
* When you specify a notification trigger, the ALARM
state must be specified. The
* INSUFFICIENT_DATA
and OK
states can be specified in addition to the
* ALARM
state.
*
* If you specify OK
as an alarm trigger, a notification is sent when the alarm switches from an
* ALARM
or INSUFFICIENT_DATA
alarm state to an OK
state. This can be
* thought of as an all clear alarm notification.
*
* If you specify INSUFFICIENT_DATA
as the alarm trigger, a notification is sent when the alarm
* switches from an OK
or ALARM
alarm state to an INSUFFICIENT_DATA
* state.
*
* The notification trigger defaults to
* Indicates whether the alarm is enabled.
*
* Notifications are enabled by default if you don't specify this parameter.
* ALARM
if you don't specify this parameter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AlarmState
*/
public PutAlarmRequest withNotificationTriggers(AlarmState... notificationTriggers) {
java.util.ArrayList
* Notifications are enabled by default if you don't specify this parameter. */ public void setNotificationEnabled(Boolean notificationEnabled) { this.notificationEnabled = notificationEnabled; } /** *
* Indicates whether the alarm is enabled. *
** Notifications are enabled by default if you don't specify this parameter. *
* * @return Indicates whether the alarm is enabled. ** Notifications are enabled by default if you don't specify this parameter. */ public Boolean getNotificationEnabled() { return this.notificationEnabled; } /** *
* Indicates whether the alarm is enabled. *
** Notifications are enabled by default if you don't specify this parameter. *
* * @param notificationEnabled * Indicates whether the alarm is enabled. ** Notifications are enabled by default if you don't specify this parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAlarmRequest withNotificationEnabled(Boolean notificationEnabled) { setNotificationEnabled(notificationEnabled); return this; } /** *
* Indicates whether the alarm is enabled. *
** Notifications are enabled by default if you don't specify this parameter. *
* * @return Indicates whether the alarm is enabled. ** Notifications are enabled by default if you don't specify this parameter. */ public Boolean isNotificationEnabled() { return this.notificationEnabled; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAlarmName() != null) sb.append("AlarmName: ").append(getAlarmName()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getMonitoredResourceName() != null) sb.append("MonitoredResourceName: ").append(getMonitoredResourceName()).append(","); if (getComparisonOperator() != null) sb.append("ComparisonOperator: ").append(getComparisonOperator()).append(","); if (getThreshold() != null) sb.append("Threshold: ").append(getThreshold()).append(","); if (getEvaluationPeriods() != null) sb.append("EvaluationPeriods: ").append(getEvaluationPeriods()).append(","); if (getDatapointsToAlarm() != null) sb.append("DatapointsToAlarm: ").append(getDatapointsToAlarm()).append(","); if (getTreatMissingData() != null) sb.append("TreatMissingData: ").append(getTreatMissingData()).append(","); if (getContactProtocols() != null) sb.append("ContactProtocols: ").append(getContactProtocols()).append(","); if (getNotificationTriggers() != null) sb.append("NotificationTriggers: ").append(getNotificationTriggers()).append(","); if (getNotificationEnabled() != null) sb.append("NotificationEnabled: ").append(getNotificationEnabled()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutAlarmRequest == false) return false; PutAlarmRequest other = (PutAlarmRequest) obj; if (other.getAlarmName() == null ^ this.getAlarmName() == null) return false; if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == false) return false; if (other.getMetricName() == null ^ this.getMetricName() == null) return false; if (other.getMetricName() != null && other.getMetricName().equals(this.getMetricName()) == false) return false; if (other.getMonitoredResourceName() == null ^ this.getMonitoredResourceName() == null) return false; if (other.getMonitoredResourceName() != null && other.getMonitoredResourceName().equals(this.getMonitoredResourceName()) == false) return false; if (other.getComparisonOperator() == null ^ this.getComparisonOperator() == null) return false; if (other.getComparisonOperator() != null && other.getComparisonOperator().equals(this.getComparisonOperator()) == false) return false; if (other.getThreshold() == null ^ this.getThreshold() == null) return false; if (other.getThreshold() != null && other.getThreshold().equals(this.getThreshold()) == false) return false; if (other.getEvaluationPeriods() == null ^ this.getEvaluationPeriods() == null) return false; if (other.getEvaluationPeriods() != null && other.getEvaluationPeriods().equals(this.getEvaluationPeriods()) == false) return false; if (other.getDatapointsToAlarm() == null ^ this.getDatapointsToAlarm() == null) return false; if (other.getDatapointsToAlarm() != null && other.getDatapointsToAlarm().equals(this.getDatapointsToAlarm()) == false) return false; if (other.getTreatMissingData() == null ^ this.getTreatMissingData() == null) return false; if (other.getTreatMissingData() != null && other.getTreatMissingData().equals(this.getTreatMissingData()) == false) return false; if (other.getContactProtocols() == null ^ this.getContactProtocols() == null) return false; if (other.getContactProtocols() != null && other.getContactProtocols().equals(this.getContactProtocols()) == false) return false; if (other.getNotificationTriggers() == null ^ this.getNotificationTriggers() == null) return false; if (other.getNotificationTriggers() != null && other.getNotificationTriggers().equals(this.getNotificationTriggers()) == false) return false; if (other.getNotificationEnabled() == null ^ this.getNotificationEnabled() == null) return false; if (other.getNotificationEnabled() != null && other.getNotificationEnabled().equals(this.getNotificationEnabled()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getMonitoredResourceName() == null) ? 0 : getMonitoredResourceName().hashCode()); hashCode = prime * hashCode + ((getComparisonOperator() == null) ? 0 : getComparisonOperator().hashCode()); hashCode = prime * hashCode + ((getThreshold() == null) ? 0 : getThreshold().hashCode()); hashCode = prime * hashCode + ((getEvaluationPeriods() == null) ? 0 : getEvaluationPeriods().hashCode()); hashCode = prime * hashCode + ((getDatapointsToAlarm() == null) ? 0 : getDatapointsToAlarm().hashCode()); hashCode = prime * hashCode + ((getTreatMissingData() == null) ? 0 : getTreatMissingData().hashCode()); hashCode = prime * hashCode + ((getContactProtocols() == null) ? 0 : getContactProtocols().hashCode()); hashCode = prime * hashCode + ((getNotificationTriggers() == null) ? 0 : getNotificationTriggers().hashCode()); hashCode = prime * hashCode + ((getNotificationEnabled() == null) ? 0 : getNotificationEnabled().hashCode()); return hashCode; } @Override public PutAlarmRequest clone() { return (PutAlarmRequest) super.clone(); } }