/* * 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.cloudwatch.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 DeleteAnomalyDetectorRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The namespace associated with the anomaly detection model to delete. *
*/ @Deprecated private String namespace; /** ** The metric name associated with the anomaly detection model to delete. *
*/ @Deprecated private String metricName; /** ** The metric dimensions associated with the anomaly detection model to delete. *
*/ @Deprecated private com.amazonaws.internal.SdkInternalList* The statistic associated with the anomaly detection model to delete. *
*/ @Deprecated private String stat; /** ** A single metric anomaly detector to be deleted. *
*
* When using SingleMetricAnomalyDetector
, you cannot include the following parameters in the same
* operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the MetricMathAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the single metric anomaly detector attributes as part of the
* SingleMetricAnomalyDetector
property.
*
* The metric math anomaly detector to be deleted. *
*
* When using MetricMathAnomalyDetector
, you cannot include following parameters in the same operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the SingleMetricAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the metric math anomaly detector attributes as part of the
* MetricMathAnomalyDetector
property.
*
* The namespace associated with the anomaly detection model to delete. *
* * @param namespace * The namespace associated with the anomaly detection model to delete. */ @Deprecated public void setNamespace(String namespace) { this.namespace = namespace; } /** ** The namespace associated with the anomaly detection model to delete. *
* * @return The namespace associated with the anomaly detection model to delete. */ @Deprecated public String getNamespace() { return this.namespace; } /** ** The namespace associated with the anomaly detection model to delete. *
* * @param namespace * The namespace associated with the anomaly detection model to delete. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public DeleteAnomalyDetectorRequest withNamespace(String namespace) { setNamespace(namespace); return this; } /** ** The metric name associated with the anomaly detection model to delete. *
* * @param metricName * The metric name associated with the anomaly detection model to delete. */ @Deprecated public void setMetricName(String metricName) { this.metricName = metricName; } /** ** The metric name associated with the anomaly detection model to delete. *
* * @return The metric name associated with the anomaly detection model to delete. */ @Deprecated public String getMetricName() { return this.metricName; } /** ** The metric name associated with the anomaly detection model to delete. *
* * @param metricName * The metric name associated with the anomaly detection model to delete. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public DeleteAnomalyDetectorRequest withMetricName(String metricName) { setMetricName(metricName); return this; } /** ** The metric dimensions associated with the anomaly detection model to delete. *
* * @return The metric dimensions associated with the anomaly detection model to delete. */ @Deprecated public java.util.List* The metric dimensions associated with the anomaly detection model to delete. *
* * @param dimensions * The metric dimensions associated with the anomaly detection model to delete. */ @Deprecated public void setDimensions(java.util.Collection* The metric dimensions associated with the anomaly detection model to delete. *
** 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 * The metric dimensions associated with the anomaly detection model to delete. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public DeleteAnomalyDetectorRequest withDimensions(Dimension... dimensions) { if (this.dimensions == null) { setDimensions(new com.amazonaws.internal.SdkInternalList* The metric dimensions associated with the anomaly detection model to delete. *
* * @param dimensions * The metric dimensions associated with the anomaly detection model to delete. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public DeleteAnomalyDetectorRequest withDimensions(java.util.Collection* The statistic associated with the anomaly detection model to delete. *
* * @param stat * The statistic associated with the anomaly detection model to delete. */ @Deprecated public void setStat(String stat) { this.stat = stat; } /** ** The statistic associated with the anomaly detection model to delete. *
* * @return The statistic associated with the anomaly detection model to delete. */ @Deprecated public String getStat() { return this.stat; } /** ** The statistic associated with the anomaly detection model to delete. *
* * @param stat * The statistic associated with the anomaly detection model to delete. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public DeleteAnomalyDetectorRequest withStat(String stat) { setStat(stat); return this; } /** ** A single metric anomaly detector to be deleted. *
*
* When using SingleMetricAnomalyDetector
, you cannot include the following parameters in the same
* operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the MetricMathAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the single metric anomaly detector attributes as part of the
* SingleMetricAnomalyDetector
property.
*
* When using SingleMetricAnomalyDetector
, you cannot include the following parameters in the
* same operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the MetricMathAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the single metric anomaly detector attributes as part of the
* SingleMetricAnomalyDetector
property.
*/
public void setSingleMetricAnomalyDetector(SingleMetricAnomalyDetector singleMetricAnomalyDetector) {
this.singleMetricAnomalyDetector = singleMetricAnomalyDetector;
}
/**
*
* A single metric anomaly detector to be deleted. *
*
* When using SingleMetricAnomalyDetector
, you cannot include the following parameters in the same
* operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the MetricMathAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the single metric anomaly detector attributes as part of the
* SingleMetricAnomalyDetector
property.
*
* When using SingleMetricAnomalyDetector
, you cannot include the following parameters in the
* same operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the MetricMathAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the single metric anomaly detector attributes as part of the
* SingleMetricAnomalyDetector
property.
*/
public SingleMetricAnomalyDetector getSingleMetricAnomalyDetector() {
return this.singleMetricAnomalyDetector;
}
/**
*
* A single metric anomaly detector to be deleted. *
*
* When using SingleMetricAnomalyDetector
, you cannot include the following parameters in the same
* operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the MetricMathAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the single metric anomaly detector attributes as part of the
* SingleMetricAnomalyDetector
property.
*
* When using SingleMetricAnomalyDetector
, you cannot include the following parameters in the
* same operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the MetricMathAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the single metric anomaly detector attributes as part of the
* SingleMetricAnomalyDetector
property.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteAnomalyDetectorRequest withSingleMetricAnomalyDetector(SingleMetricAnomalyDetector singleMetricAnomalyDetector) {
setSingleMetricAnomalyDetector(singleMetricAnomalyDetector);
return this;
}
/**
*
* The metric math anomaly detector to be deleted. *
*
* When using MetricMathAnomalyDetector
, you cannot include following parameters in the same operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the SingleMetricAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the metric math anomaly detector attributes as part of the
* MetricMathAnomalyDetector
property.
*
* When using MetricMathAnomalyDetector
, you cannot include following parameters in the same
* operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the SingleMetricAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the metric math anomaly detector attributes as part of the
* MetricMathAnomalyDetector
property.
*/
public void setMetricMathAnomalyDetector(MetricMathAnomalyDetector metricMathAnomalyDetector) {
this.metricMathAnomalyDetector = metricMathAnomalyDetector;
}
/**
*
* The metric math anomaly detector to be deleted. *
*
* When using MetricMathAnomalyDetector
, you cannot include following parameters in the same operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the SingleMetricAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the metric math anomaly detector attributes as part of the
* MetricMathAnomalyDetector
property.
*
* When using MetricMathAnomalyDetector
, you cannot include following parameters in the same
* operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the SingleMetricAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the metric math anomaly detector attributes as part of the
* MetricMathAnomalyDetector
property.
*/
public MetricMathAnomalyDetector getMetricMathAnomalyDetector() {
return this.metricMathAnomalyDetector;
}
/**
*
* The metric math anomaly detector to be deleted. *
*
* When using MetricMathAnomalyDetector
, you cannot include following parameters in the same operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the SingleMetricAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the metric math anomaly detector attributes as part of the
* MetricMathAnomalyDetector
property.
*
* When using MetricMathAnomalyDetector
, you cannot include following parameters in the same
* operation:
*
* Dimensions
,
*
* MetricName
*
* Namespace
*
* Stat
*
* the SingleMetricAnomalyDetector
parameters of DeleteAnomalyDetectorInput
*
* Instead, specify the metric math anomaly detector attributes as part of the
* MetricMathAnomalyDetector
property.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DeleteAnomalyDetectorRequest withMetricMathAnomalyDetector(MetricMathAnomalyDetector metricMathAnomalyDetector) {
setMetricMathAnomalyDetector(metricMathAnomalyDetector);
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 (getNamespace() != null)
sb.append("Namespace: ").append(getNamespace()).append(",");
if (getMetricName() != null)
sb.append("MetricName: ").append(getMetricName()).append(",");
if (getDimensions() != null)
sb.append("Dimensions: ").append(getDimensions()).append(",");
if (getStat() != null)
sb.append("Stat: ").append(getStat()).append(",");
if (getSingleMetricAnomalyDetector() != null)
sb.append("SingleMetricAnomalyDetector: ").append(getSingleMetricAnomalyDetector()).append(",");
if (getMetricMathAnomalyDetector() != null)
sb.append("MetricMathAnomalyDetector: ").append(getMetricMathAnomalyDetector());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DeleteAnomalyDetectorRequest == false)
return false;
DeleteAnomalyDetectorRequest other = (DeleteAnomalyDetectorRequest) obj;
if (other.getNamespace() == null ^ this.getNamespace() == null)
return false;
if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == 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.getDimensions() == null ^ this.getDimensions() == null)
return false;
if (other.getDimensions() != null && other.getDimensions().equals(this.getDimensions()) == false)
return false;
if (other.getStat() == null ^ this.getStat() == null)
return false;
if (other.getStat() != null && other.getStat().equals(this.getStat()) == false)
return false;
if (other.getSingleMetricAnomalyDetector() == null ^ this.getSingleMetricAnomalyDetector() == null)
return false;
if (other.getSingleMetricAnomalyDetector() != null && other.getSingleMetricAnomalyDetector().equals(this.getSingleMetricAnomalyDetector()) == false)
return false;
if (other.getMetricMathAnomalyDetector() == null ^ this.getMetricMathAnomalyDetector() == null)
return false;
if (other.getMetricMathAnomalyDetector() != null && other.getMetricMathAnomalyDetector().equals(this.getMetricMathAnomalyDetector()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode());
hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode());
hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode());
hashCode = prime * hashCode + ((getStat() == null) ? 0 : getStat().hashCode());
hashCode = prime * hashCode + ((getSingleMetricAnomalyDetector() == null) ? 0 : getSingleMetricAnomalyDetector().hashCode());
hashCode = prime * hashCode + ((getMetricMathAnomalyDetector() == null) ? 0 : getMetricMathAnomalyDetector().hashCode());
return hashCode;
}
@Override
public DeleteAnomalyDetectorRequest clone() {
return (DeleteAnomalyDetectorRequest) super.clone();
}
}