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

com.amazonaws.services.cloudwatch.model.PutAnomalyDetectorRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show 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.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 PutAnomalyDetectorRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The namespace of the metric to create the anomaly detection model for. *

*/ @Deprecated private String namespace; /** *

* The name of the metric to create the anomaly detection model for. *

*/ @Deprecated private String metricName; /** *

* The metric dimensions to create the anomaly detection model for. *

*/ @Deprecated private com.amazonaws.internal.SdkInternalList dimensions; /** *

* The statistic to use for the metric and the anomaly detection model. *

*/ @Deprecated private String stat; /** *

* The configuration specifies details about how the anomaly detection model is to be trained, including time ranges * to exclude when training and updating the model. You can specify as many as 10 time ranges. *

*

* The configuration can also include the time zone to use for the metric. *

*/ private AnomalyDetectorConfiguration configuration; /** *

* Use this object to include parameters to provide information about your metric to CloudWatch to help it build * more accurate anomaly detection models. Currently, it includes the PeriodicSpikes parameter. *

*/ private MetricCharacteristics metricCharacteristics; /** *

* A single metric anomaly detector to be created. *

*

* When using SingleMetricAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the MetricMathAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the single metric anomaly detector attributes as part of the property * SingleMetricAnomalyDetector. *

*/ private SingleMetricAnomalyDetector singleMetricAnomalyDetector; /** *

* The metric math anomaly detector to be created. *

*

* When using MetricMathAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the SingleMetricAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the metric math anomaly detector attributes as part of the property * MetricMathAnomalyDetector. *

*/ private MetricMathAnomalyDetector metricMathAnomalyDetector; /** *

* The namespace of the metric to create the anomaly detection model for. *

* * @param namespace * The namespace of the metric to create the anomaly detection model for. */ @Deprecated public void setNamespace(String namespace) { this.namespace = namespace; } /** *

* The namespace of the metric to create the anomaly detection model for. *

* * @return The namespace of the metric to create the anomaly detection model for. */ @Deprecated public String getNamespace() { return this.namespace; } /** *

* The namespace of the metric to create the anomaly detection model for. *

* * @param namespace * The namespace of the metric to create the anomaly detection model for. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public PutAnomalyDetectorRequest withNamespace(String namespace) { setNamespace(namespace); return this; } /** *

* The name of the metric to create the anomaly detection model for. *

* * @param metricName * The name of the metric to create the anomaly detection model for. */ @Deprecated public void setMetricName(String metricName) { this.metricName = metricName; } /** *

* The name of the metric to create the anomaly detection model for. *

* * @return The name of the metric to create the anomaly detection model for. */ @Deprecated public String getMetricName() { return this.metricName; } /** *

* The name of the metric to create the anomaly detection model for. *

* * @param metricName * The name of the metric to create the anomaly detection model for. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public PutAnomalyDetectorRequest withMetricName(String metricName) { setMetricName(metricName); return this; } /** *

* The metric dimensions to create the anomaly detection model for. *

* * @return The metric dimensions to create the anomaly detection model for. */ @Deprecated public java.util.List getDimensions() { if (dimensions == null) { dimensions = new com.amazonaws.internal.SdkInternalList(); } return dimensions; } /** *

* The metric dimensions to create the anomaly detection model for. *

* * @param dimensions * The metric dimensions to create the anomaly detection model for. */ @Deprecated public void setDimensions(java.util.Collection dimensions) { if (dimensions == null) { this.dimensions = null; return; } this.dimensions = new com.amazonaws.internal.SdkInternalList(dimensions); } /** *

* The metric dimensions to create the anomaly detection model for. *

*

* 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 to create the anomaly detection model for. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public PutAnomalyDetectorRequest 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; } /** *

* The metric dimensions to create the anomaly detection model for. *

* * @param dimensions * The metric dimensions to create the anomaly detection model for. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public PutAnomalyDetectorRequest withDimensions(java.util.Collection dimensions) { setDimensions(dimensions); return this; } /** *

* The statistic to use for the metric and the anomaly detection model. *

* * @param stat * The statistic to use for the metric and the anomaly detection model. */ @Deprecated public void setStat(String stat) { this.stat = stat; } /** *

* The statistic to use for the metric and the anomaly detection model. *

* * @return The statistic to use for the metric and the anomaly detection model. */ @Deprecated public String getStat() { return this.stat; } /** *

* The statistic to use for the metric and the anomaly detection model. *

* * @param stat * The statistic to use for the metric and the anomaly detection model. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public PutAnomalyDetectorRequest withStat(String stat) { setStat(stat); return this; } /** *

* The configuration specifies details about how the anomaly detection model is to be trained, including time ranges * to exclude when training and updating the model. You can specify as many as 10 time ranges. *

*

* The configuration can also include the time zone to use for the metric. *

* * @param configuration * The configuration specifies details about how the anomaly detection model is to be trained, including time * ranges to exclude when training and updating the model. You can specify as many as 10 time ranges.

*

* The configuration can also include the time zone to use for the metric. */ public void setConfiguration(AnomalyDetectorConfiguration configuration) { this.configuration = configuration; } /** *

* The configuration specifies details about how the anomaly detection model is to be trained, including time ranges * to exclude when training and updating the model. You can specify as many as 10 time ranges. *

*

* The configuration can also include the time zone to use for the metric. *

* * @return The configuration specifies details about how the anomaly detection model is to be trained, including * time ranges to exclude when training and updating the model. You can specify as many as 10 time * ranges.

*

* The configuration can also include the time zone to use for the metric. */ public AnomalyDetectorConfiguration getConfiguration() { return this.configuration; } /** *

* The configuration specifies details about how the anomaly detection model is to be trained, including time ranges * to exclude when training and updating the model. You can specify as many as 10 time ranges. *

*

* The configuration can also include the time zone to use for the metric. *

* * @param configuration * The configuration specifies details about how the anomaly detection model is to be trained, including time * ranges to exclude when training and updating the model. You can specify as many as 10 time ranges.

*

* The configuration can also include the time zone to use for the metric. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAnomalyDetectorRequest withConfiguration(AnomalyDetectorConfiguration configuration) { setConfiguration(configuration); return this; } /** *

* Use this object to include parameters to provide information about your metric to CloudWatch to help it build * more accurate anomaly detection models. Currently, it includes the PeriodicSpikes parameter. *

* * @param metricCharacteristics * Use this object to include parameters to provide information about your metric to CloudWatch to help it * build more accurate anomaly detection models. Currently, it includes the PeriodicSpikes * parameter. */ public void setMetricCharacteristics(MetricCharacteristics metricCharacteristics) { this.metricCharacteristics = metricCharacteristics; } /** *

* Use this object to include parameters to provide information about your metric to CloudWatch to help it build * more accurate anomaly detection models. Currently, it includes the PeriodicSpikes parameter. *

* * @return Use this object to include parameters to provide information about your metric to CloudWatch to help it * build more accurate anomaly detection models. Currently, it includes the PeriodicSpikes * parameter. */ public MetricCharacteristics getMetricCharacteristics() { return this.metricCharacteristics; } /** *

* Use this object to include parameters to provide information about your metric to CloudWatch to help it build * more accurate anomaly detection models. Currently, it includes the PeriodicSpikes parameter. *

* * @param metricCharacteristics * Use this object to include parameters to provide information about your metric to CloudWatch to help it * build more accurate anomaly detection models. Currently, it includes the PeriodicSpikes * parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAnomalyDetectorRequest withMetricCharacteristics(MetricCharacteristics metricCharacteristics) { setMetricCharacteristics(metricCharacteristics); return this; } /** *

* A single metric anomaly detector to be created. *

*

* When using SingleMetricAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the MetricMathAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the single metric anomaly detector attributes as part of the property * SingleMetricAnomalyDetector. *

* * @param singleMetricAnomalyDetector * A single metric anomaly detector to be created.

*

* When using SingleMetricAnomalyDetector, you cannot include the following parameters in the * same operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the MetricMathAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the single metric anomaly detector attributes as part of the property * SingleMetricAnomalyDetector. */ public void setSingleMetricAnomalyDetector(SingleMetricAnomalyDetector singleMetricAnomalyDetector) { this.singleMetricAnomalyDetector = singleMetricAnomalyDetector; } /** *

* A single metric anomaly detector to be created. *

*

* When using SingleMetricAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the MetricMathAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the single metric anomaly detector attributes as part of the property * SingleMetricAnomalyDetector. *

* * @return A single metric anomaly detector to be created.

*

* When using SingleMetricAnomalyDetector, you cannot include the following parameters in the * same operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the MetricMathAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the single metric anomaly detector attributes as part of the property * SingleMetricAnomalyDetector. */ public SingleMetricAnomalyDetector getSingleMetricAnomalyDetector() { return this.singleMetricAnomalyDetector; } /** *

* A single metric anomaly detector to be created. *

*

* When using SingleMetricAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the MetricMathAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the single metric anomaly detector attributes as part of the property * SingleMetricAnomalyDetector. *

* * @param singleMetricAnomalyDetector * A single metric anomaly detector to be created.

*

* When using SingleMetricAnomalyDetector, you cannot include the following parameters in the * same operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the MetricMathAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the single metric anomaly detector attributes as part of the property * SingleMetricAnomalyDetector. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAnomalyDetectorRequest withSingleMetricAnomalyDetector(SingleMetricAnomalyDetector singleMetricAnomalyDetector) { setSingleMetricAnomalyDetector(singleMetricAnomalyDetector); return this; } /** *

* The metric math anomaly detector to be created. *

*

* When using MetricMathAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the SingleMetricAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the metric math anomaly detector attributes as part of the property * MetricMathAnomalyDetector. *

* * @param metricMathAnomalyDetector * The metric math anomaly detector to be created.

*

* When using MetricMathAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the SingleMetricAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the metric math anomaly detector attributes as part of the property * MetricMathAnomalyDetector. */ public void setMetricMathAnomalyDetector(MetricMathAnomalyDetector metricMathAnomalyDetector) { this.metricMathAnomalyDetector = metricMathAnomalyDetector; } /** *

* The metric math anomaly detector to be created. *

*

* When using MetricMathAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the SingleMetricAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the metric math anomaly detector attributes as part of the property * MetricMathAnomalyDetector. *

* * @return The metric math anomaly detector to be created.

*

* When using MetricMathAnomalyDetector, you cannot include the following parameters in the * same operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the SingleMetricAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the metric math anomaly detector attributes as part of the property * MetricMathAnomalyDetector. */ public MetricMathAnomalyDetector getMetricMathAnomalyDetector() { return this.metricMathAnomalyDetector; } /** *

* The metric math anomaly detector to be created. *

*

* When using MetricMathAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the SingleMetricAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the metric math anomaly detector attributes as part of the property * MetricMathAnomalyDetector. *

* * @param metricMathAnomalyDetector * The metric math anomaly detector to be created.

*

* When using MetricMathAnomalyDetector, you cannot include the following parameters in the same * operation: *

*
    *
  • *

    * Dimensions *

    *
  • *
  • *

    * MetricName *

    *
  • *
  • *

    * Namespace *

    *
  • *
  • *

    * Stat *

    *
  • *
  • *

    * the SingleMetricAnomalyDetector parameters of PutAnomalyDetectorInput *

    *
  • *
*

* Instead, specify the metric math anomaly detector attributes as part of the property * MetricMathAnomalyDetector. * @return Returns a reference to this object so that method calls can be chained together. */ public PutAnomalyDetectorRequest 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 (getConfiguration() != null) sb.append("Configuration: ").append(getConfiguration()).append(","); if (getMetricCharacteristics() != null) sb.append("MetricCharacteristics: ").append(getMetricCharacteristics()).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 PutAnomalyDetectorRequest == false) return false; PutAnomalyDetectorRequest other = (PutAnomalyDetectorRequest) 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.getConfiguration() == null ^ this.getConfiguration() == null) return false; if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false) return false; if (other.getMetricCharacteristics() == null ^ this.getMetricCharacteristics() == null) return false; if (other.getMetricCharacteristics() != null && other.getMetricCharacteristics().equals(this.getMetricCharacteristics()) == 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 + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); hashCode = prime * hashCode + ((getMetricCharacteristics() == null) ? 0 : getMetricCharacteristics().hashCode()); hashCode = prime * hashCode + ((getSingleMetricAnomalyDetector() == null) ? 0 : getSingleMetricAnomalyDetector().hashCode()); hashCode = prime * hashCode + ((getMetricMathAnomalyDetector() == null) ? 0 : getMetricMathAnomalyDetector().hashCode()); return hashCode; } @Override public PutAnomalyDetectorRequest clone() { return (PutAnomalyDetectorRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy