/* * 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 DescribeAnomalyDetectorsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Use the token returned by the previous operation to request the next page of results. *
*/ private String nextToken; /** ** The maximum number of results to return in one operation. The maximum value that you can specify is 100. *
*
* To retrieve the remaining results, make another call with the returned NextToken
value.
*
* Limits the results to only the anomaly detection models that are associated with the specified namespace. *
*/ private String namespace; /** ** Limits the results to only the anomaly detection models that are associated with the specified metric name. If * there are multiple metrics with this name in different namespaces that have anomaly detection models, they're all * returned. *
*/ private String metricName; /** ** Limits the results to only the anomaly detection models that are associated with the specified metric dimensions. * If there are multiple metrics that have these dimensions and have anomaly detection models associated, they're * all returned. *
*/ private com.amazonaws.internal.SdkInternalList
* The anomaly detector types to request when using DescribeAnomalyDetectorsInput
. If empty, defaults
* to SINGLE_METRIC
.
*
* Use the token returned by the previous operation to request the next page of results. *
* * @param nextToken * Use the token returned by the previous operation to request the next page of results. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** ** Use the token returned by the previous operation to request the next page of results. *
* * @return Use the token returned by the previous operation to request the next page of results. */ public String getNextToken() { return this.nextToken; } /** ** Use the token returned by the previous operation to request the next page of results. *
* * @param nextToken * Use the token returned by the previous operation to request the next page of results. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAnomalyDetectorsRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** ** The maximum number of results to return in one operation. The maximum value that you can specify is 100. *
*
* To retrieve the remaining results, make another call with the returned NextToken
value.
*
* To retrieve the remaining results, make another call with the returned NextToken
value.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of results to return in one operation. The maximum value that you can specify is 100. *
*
* To retrieve the remaining results, make another call with the returned NextToken
value.
*
* To retrieve the remaining results, make another call with the returned NextToken
value.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of results to return in one operation. The maximum value that you can specify is 100. *
*
* To retrieve the remaining results, make another call with the returned NextToken
value.
*
* To retrieve the remaining results, make another call with the returned NextToken
value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeAnomalyDetectorsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* Limits the results to only the anomaly detection models that are associated with the specified namespace. *
* * @param namespace * Limits the results to only the anomaly detection models that are associated with the specified namespace. */ public void setNamespace(String namespace) { this.namespace = namespace; } /** ** Limits the results to only the anomaly detection models that are associated with the specified namespace. *
* * @return Limits the results to only the anomaly detection models that are associated with the specified namespace. */ public String getNamespace() { return this.namespace; } /** ** Limits the results to only the anomaly detection models that are associated with the specified namespace. *
* * @param namespace * Limits the results to only the anomaly detection models that are associated with the specified namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAnomalyDetectorsRequest withNamespace(String namespace) { setNamespace(namespace); return this; } /** ** Limits the results to only the anomaly detection models that are associated with the specified metric name. If * there are multiple metrics with this name in different namespaces that have anomaly detection models, they're all * returned. *
* * @param metricName * Limits the results to only the anomaly detection models that are associated with the specified metric * name. If there are multiple metrics with this name in different namespaces that have anomaly detection * models, they're all returned. */ public void setMetricName(String metricName) { this.metricName = metricName; } /** ** Limits the results to only the anomaly detection models that are associated with the specified metric name. If * there are multiple metrics with this name in different namespaces that have anomaly detection models, they're all * returned. *
* * @return Limits the results to only the anomaly detection models that are associated with the specified metric * name. If there are multiple metrics with this name in different namespaces that have anomaly detection * models, they're all returned. */ public String getMetricName() { return this.metricName; } /** ** Limits the results to only the anomaly detection models that are associated with the specified metric name. If * there are multiple metrics with this name in different namespaces that have anomaly detection models, they're all * returned. *
* * @param metricName * Limits the results to only the anomaly detection models that are associated with the specified metric * name. If there are multiple metrics with this name in different namespaces that have anomaly detection * models, they're all returned. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAnomalyDetectorsRequest withMetricName(String metricName) { setMetricName(metricName); return this; } /** ** Limits the results to only the anomaly detection models that are associated with the specified metric dimensions. * If there are multiple metrics that have these dimensions and have anomaly detection models associated, they're * all returned. *
* * @return Limits the results to only the anomaly detection models that are associated with the specified metric * dimensions. If there are multiple metrics that have these dimensions and have anomaly detection models * associated, they're all returned. */ public java.util.List* Limits the results to only the anomaly detection models that are associated with the specified metric dimensions. * If there are multiple metrics that have these dimensions and have anomaly detection models associated, they're * all returned. *
* * @param dimensions * Limits the results to only the anomaly detection models that are associated with the specified metric * dimensions. If there are multiple metrics that have these dimensions and have anomaly detection models * associated, they're all returned. */ public void setDimensions(java.util.Collection* Limits the results to only the anomaly detection models that are associated with the specified metric dimensions. * If there are multiple metrics that have these dimensions and have anomaly detection models associated, they're * all returned. *
** 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 * Limits the results to only the anomaly detection models that are associated with the specified metric * dimensions. If there are multiple metrics that have these dimensions and have anomaly detection models * associated, they're all returned. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAnomalyDetectorsRequest withDimensions(Dimension... dimensions) { if (this.dimensions == null) { setDimensions(new com.amazonaws.internal.SdkInternalList* Limits the results to only the anomaly detection models that are associated with the specified metric dimensions. * If there are multiple metrics that have these dimensions and have anomaly detection models associated, they're * all returned. *
* * @param dimensions * Limits the results to only the anomaly detection models that are associated with the specified metric * dimensions. If there are multiple metrics that have these dimensions and have anomaly detection models * associated, they're all returned. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAnomalyDetectorsRequest withDimensions(java.util.Collection
* The anomaly detector types to request when using DescribeAnomalyDetectorsInput
. If empty, defaults
* to SINGLE_METRIC
.
*
DescribeAnomalyDetectorsInput
. If empty,
* defaults to SINGLE_METRIC
.
* @see AnomalyDetectorType
*/
public java.util.List
* The anomaly detector types to request when using DescribeAnomalyDetectorsInput
. If empty, defaults
* to SINGLE_METRIC
.
*
DescribeAnomalyDetectorsInput
. If empty,
* defaults to SINGLE_METRIC
.
* @see AnomalyDetectorType
*/
public void setAnomalyDetectorTypes(java.util.Collection
* The anomaly detector types to request when using DescribeAnomalyDetectorsInput
. If empty, defaults
* to SINGLE_METRIC
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAnomalyDetectorTypes(java.util.Collection)} or {@link #withAnomalyDetectorTypes(java.util.Collection)} * if you want to override the existing values. *
* * @param anomalyDetectorTypes * The anomaly detector types to request when usingDescribeAnomalyDetectorsInput
. If empty,
* defaults to SINGLE_METRIC
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnomalyDetectorType
*/
public DescribeAnomalyDetectorsRequest withAnomalyDetectorTypes(String... anomalyDetectorTypes) {
if (this.anomalyDetectorTypes == null) {
setAnomalyDetectorTypes(new com.amazonaws.internal.SdkInternalList
* The anomaly detector types to request when using DescribeAnomalyDetectorsInput
. If empty, defaults
* to SINGLE_METRIC
.
*
DescribeAnomalyDetectorsInput
. If empty,
* defaults to SINGLE_METRIC
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnomalyDetectorType
*/
public DescribeAnomalyDetectorsRequest withAnomalyDetectorTypes(java.util.Collection
* The anomaly detector types to request when using DescribeAnomalyDetectorsInput
. If empty, defaults
* to SINGLE_METRIC
.
*
DescribeAnomalyDetectorsInput
. If empty,
* defaults to SINGLE_METRIC
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnomalyDetectorType
*/
public DescribeAnomalyDetectorsRequest withAnomalyDetectorTypes(AnomalyDetectorType... anomalyDetectorTypes) {
com.amazonaws.internal.SdkInternalList