All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.route53.model.CloudWatchAlarmConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Route53 module holds the client classes that are used for communicating with Amazon Route53 Service

The newest version!
/*
 * Copyright 2019-2024 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 dimensions; /** *

* 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 getDimensions() { if (dimensions == null) { dimensions = new com.amazonaws.internal.SdkInternalList(); } return 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. *

* * @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 dimensions) { if (dimensions == null) { this.dimensions = null; return; } this.dimensions = new com.amazonaws.internal.SdkInternalList(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. *

*

* 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(dimensions.length)); } for (Dimension ele : dimensions) { this.dimensions.add(ele); } 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. *

* * @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 dimensions) { setDimensions(dimensions); return this; } /** * 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 (getEvaluationPeriods() != null) sb.append("EvaluationPeriods: ").append(getEvaluationPeriods()).append(","); if (getThreshold() != null) sb.append("Threshold: ").append(getThreshold()).append(","); if (getComparisonOperator() != null) sb.append("ComparisonOperator: ").append(getComparisonOperator()).append(","); if (getPeriod() != null) sb.append("Period: ").append(getPeriod()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getStatistic() != null) sb.append("Statistic: ").append(getStatistic()).append(","); if (getDimensions() != null) sb.append("Dimensions: ").append(getDimensions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CloudWatchAlarmConfiguration == false) return false; CloudWatchAlarmConfiguration other = (CloudWatchAlarmConfiguration) obj; if (other.getEvaluationPeriods() == null ^ this.getEvaluationPeriods() == null) return false; if (other.getEvaluationPeriods() != null && other.getEvaluationPeriods().equals(this.getEvaluationPeriods()) == 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.getComparisonOperator() == null ^ this.getComparisonOperator() == null) return false; if (other.getComparisonOperator() != null && other.getComparisonOperator().equals(this.getComparisonOperator()) == false) return false; if (other.getPeriod() == null ^ this.getPeriod() == null) return false; if (other.getPeriod() != null && other.getPeriod().equals(this.getPeriod()) == 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.getNamespace() == null ^ this.getNamespace() == null) return false; if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getStatistic() == null ^ this.getStatistic() == null) return false; if (other.getStatistic() != null && other.getStatistic().equals(this.getStatistic()) == false) return false; if (other.getDimensions() == null ^ this.getDimensions() == null) return false; if (other.getDimensions() != null && other.getDimensions().equals(this.getDimensions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEvaluationPeriods() == null) ? 0 : getEvaluationPeriods().hashCode()); hashCode = prime * hashCode + ((getThreshold() == null) ? 0 : getThreshold().hashCode()); hashCode = prime * hashCode + ((getComparisonOperator() == null) ? 0 : getComparisonOperator().hashCode()); hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getStatistic() == null) ? 0 : getStatistic().hashCode()); hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode()); return hashCode; } @Override public CloudWatchAlarmConfiguration clone() { try { return (CloudWatchAlarmConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy