/* * 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.route53.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* A complex type that contains information about the CloudWatch alarm that Amazon Route 53 is monitoring for this * health check. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CloudWatchAlarmConfiguration implements Serializable, Cloneable { /** ** For the metric that the CloudWatch alarm is associated with, the number of periods that the metric is compared to * the threshold. *
*/ private Integer evaluationPeriods; /** ** For the metric that the CloudWatch alarm is associated with, the value the metric is compared with. *
*/ private Double threshold; /** ** For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. *
*/ private String comparisonOperator; /** ** For the metric that the CloudWatch alarm is associated with, the duration of one evaluation period in seconds. *
*/ private Integer period; /** ** The name of the CloudWatch metric that the alarm is associated with. *
*/ private String metricName; /** ** The namespace of the metric that the alarm is associated with. For more information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
*/ private String namespace; /** ** For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. *
*/ private String statistic; /** ** For the metric that the CloudWatch alarm is associated with, a complex type that contains information about the * dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
*/ private com.amazonaws.internal.SdkInternalList* For the metric that the CloudWatch alarm is associated with, the number of periods that the metric is compared to * the threshold. *
* * @param evaluationPeriods * For the metric that the CloudWatch alarm is associated with, the number of periods that the metric is * compared to the threshold. */ public void setEvaluationPeriods(Integer evaluationPeriods) { this.evaluationPeriods = evaluationPeriods; } /** ** For the metric that the CloudWatch alarm is associated with, the number of periods that the metric is compared to * the threshold. *
* * @return For the metric that the CloudWatch alarm is associated with, the number of periods that the metric is * compared to the threshold. */ public Integer getEvaluationPeriods() { return this.evaluationPeriods; } /** ** For the metric that the CloudWatch alarm is associated with, the number of periods that the metric is compared to * the threshold. *
* * @param evaluationPeriods * For the metric that the CloudWatch alarm is associated with, the number of periods that the metric is * compared to the threshold. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchAlarmConfiguration withEvaluationPeriods(Integer evaluationPeriods) { setEvaluationPeriods(evaluationPeriods); return this; } /** ** For the metric that the CloudWatch alarm is associated with, the value the metric is compared with. *
* * @param threshold * For the metric that the CloudWatch alarm is associated with, the value the metric is compared with. */ public void setThreshold(Double threshold) { this.threshold = threshold; } /** ** For the metric that the CloudWatch alarm is associated with, the value the metric is compared with. *
* * @return For the metric that the CloudWatch alarm is associated with, the value the metric is compared with. */ public Double getThreshold() { return this.threshold; } /** ** For the metric that the CloudWatch alarm is associated with, the value the metric is compared with. *
* * @param threshold * For the metric that the CloudWatch alarm is associated with, the value the metric is compared with. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchAlarmConfiguration withThreshold(Double threshold) { setThreshold(threshold); return this; } /** ** For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. *
* * @param comparisonOperator * For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. * @see ComparisonOperator */ public void setComparisonOperator(String comparisonOperator) { this.comparisonOperator = comparisonOperator; } /** ** For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. *
* * @return For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for * the comparison. * @see ComparisonOperator */ public String getComparisonOperator() { return this.comparisonOperator; } /** ** For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. *
* * @param comparisonOperator * For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. * @return Returns a reference to this object so that method calls can be chained together. * @see ComparisonOperator */ public CloudWatchAlarmConfiguration withComparisonOperator(String comparisonOperator) { setComparisonOperator(comparisonOperator); return this; } /** ** For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. *
* * @param comparisonOperator * For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. * @see ComparisonOperator */ public void setComparisonOperator(ComparisonOperator comparisonOperator) { withComparisonOperator(comparisonOperator); } /** ** For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. *
* * @param comparisonOperator * For the metric that the CloudWatch alarm is associated with, the arithmetic operation that is used for the * comparison. * @return Returns a reference to this object so that method calls can be chained together. * @see ComparisonOperator */ public CloudWatchAlarmConfiguration withComparisonOperator(ComparisonOperator comparisonOperator) { this.comparisonOperator = comparisonOperator.toString(); return this; } /** ** For the metric that the CloudWatch alarm is associated with, the duration of one evaluation period in seconds. *
* * @param period * For the metric that the CloudWatch alarm is associated with, the duration of one evaluation period in * seconds. */ public void setPeriod(Integer period) { this.period = period; } /** ** For the metric that the CloudWatch alarm is associated with, the duration of one evaluation period in seconds. *
* * @return For the metric that the CloudWatch alarm is associated with, the duration of one evaluation period in * seconds. */ public Integer getPeriod() { return this.period; } /** ** For the metric that the CloudWatch alarm is associated with, the duration of one evaluation period in seconds. *
* * @param period * For the metric that the CloudWatch alarm is associated with, the duration of one evaluation period in * seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchAlarmConfiguration withPeriod(Integer period) { setPeriod(period); return this; } /** ** The name of the CloudWatch metric that the alarm is associated with. *
* * @param metricName * The name of the CloudWatch metric that the alarm is associated with. */ public void setMetricName(String metricName) { this.metricName = metricName; } /** ** The name of the CloudWatch metric that the alarm is associated with. *
* * @return The name of the CloudWatch metric that the alarm is associated with. */ public String getMetricName() { return this.metricName; } /** ** The name of the CloudWatch metric that the alarm is associated with. *
* * @param metricName * The name of the CloudWatch metric that the alarm is associated with. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchAlarmConfiguration withMetricName(String metricName) { setMetricName(metricName); return this; } /** ** The namespace of the metric that the alarm is associated with. For more information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
* * @param namespace * The namespace of the metric that the alarm is associated with. For more information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. */ public void setNamespace(String namespace) { this.namespace = namespace; } /** ** The namespace of the metric that the alarm is associated with. For more information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
* * @return The namespace of the metric that the alarm is associated with. For more information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. */ public String getNamespace() { return this.namespace; } /** ** The namespace of the metric that the alarm is associated with. For more information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
* * @param namespace * The namespace of the metric that the alarm is associated with. For more information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchAlarmConfiguration withNamespace(String namespace) { setNamespace(namespace); return this; } /** ** For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. *
* * @param statistic * For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. * @see Statistic */ public void setStatistic(String statistic) { this.statistic = statistic; } /** ** For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. *
* * @return For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. * @see Statistic */ public String getStatistic() { return this.statistic; } /** ** For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. *
* * @param statistic * For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. * @return Returns a reference to this object so that method calls can be chained together. * @see Statistic */ public CloudWatchAlarmConfiguration withStatistic(String statistic) { setStatistic(statistic); return this; } /** ** For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. *
* * @param statistic * For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. * @see Statistic */ public void setStatistic(Statistic statistic) { withStatistic(statistic); } /** ** For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. *
* * @param statistic * For the metric that the CloudWatch alarm is associated with, the statistic that is applied to the metric. * @return Returns a reference to this object so that method calls can be chained together. * @see Statistic */ public CloudWatchAlarmConfiguration withStatistic(Statistic statistic) { this.statistic = statistic.toString(); return this; } /** ** For the metric that the CloudWatch alarm is associated with, a complex type that contains information about the * dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
* * @return For the metric that the CloudWatch alarm is associated with, a complex type that contains information * about the dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. */ public java.util.List* For the metric that the CloudWatch alarm is associated with, a complex type that contains information about the * dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
* * @param dimensions * For the metric that the CloudWatch alarm is associated with, a complex type that contains information * about the dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. */ public void setDimensions(java.util.Collection* For the metric that the CloudWatch alarm is associated with, a complex type that contains information about the * dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDimensions(java.util.Collection)} or {@link #withDimensions(java.util.Collection)} if you want to * override the existing values. *
* * @param dimensions * For the metric that the CloudWatch alarm is associated with, a complex type that contains information * about the dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchAlarmConfiguration withDimensions(Dimension... dimensions) { if (this.dimensions == null) { setDimensions(new com.amazonaws.internal.SdkInternalList* For the metric that the CloudWatch alarm is associated with, a complex type that contains information about the * dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. *
* * @param dimensions * For the metric that the CloudWatch alarm is associated with, a complex type that contains information * about the dimensions for the metric. For information, see Amazon * CloudWatch Namespaces, Dimensions, and Metrics Reference in the Amazon CloudWatch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchAlarmConfiguration withDimensions(java.util.Collection