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

com.amazonaws.services.cloudwatch.model.ListMetricsRequest 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 ListMetricsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The metric namespace to filter against. Only the namespace that matches exactly will be returned. *

*/ private String namespace; /** *

* The name of the metric to filter against. Only the metrics with names that match exactly will be returned. *

*/ private String metricName; /** *

* The dimensions to filter against. Only the dimensions that match exactly will be returned. *

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

* The token returned by a previous call to indicate that there is more data available. *

*/ private String nextToken; /** *

* To filter the results to show only metrics that have had data points published in the past three hours, specify * this parameter with a value of PT3H. This is the only valid value for this parameter. *

*

* The results that are returned are an approximation of the value you specify. There is a low probability that the * returned results include metrics with last published data as much as 40 minutes more than the specified time * interval. *

*/ private String recentlyActive; /** *

* If you are using this operation in a monitoring account, specify true to include metrics from source * accounts in the returned data. *

*

* The default is false. *

*/ private Boolean includeLinkedAccounts; /** *

* When you use this operation in a monitoring account, use this field to return metrics only from one source * account. To do so, specify that source account ID in this field, and also specify true for * IncludeLinkedAccounts. *

*/ private String owningAccount; /** *

* The metric namespace to filter against. Only the namespace that matches exactly will be returned. *

* * @param namespace * The metric namespace to filter against. Only the namespace that matches exactly will be returned. */ public void setNamespace(String namespace) { this.namespace = namespace; } /** *

* The metric namespace to filter against. Only the namespace that matches exactly will be returned. *

* * @return The metric namespace to filter against. Only the namespace that matches exactly will be returned. */ public String getNamespace() { return this.namespace; } /** *

* The metric namespace to filter against. Only the namespace that matches exactly will be returned. *

* * @param namespace * The metric namespace to filter against. Only the namespace that matches exactly will be returned. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsRequest withNamespace(String namespace) { setNamespace(namespace); return this; } /** *

* The name of the metric to filter against. Only the metrics with names that match exactly will be returned. *

* * @param metricName * The name of the metric to filter against. Only the metrics with names that match exactly will be returned. */ public void setMetricName(String metricName) { this.metricName = metricName; } /** *

* The name of the metric to filter against. Only the metrics with names that match exactly will be returned. *

* * @return The name of the metric to filter against. Only the metrics with names that match exactly will be * returned. */ public String getMetricName() { return this.metricName; } /** *

* The name of the metric to filter against. Only the metrics with names that match exactly will be returned. *

* * @param metricName * The name of the metric to filter against. Only the metrics with names that match exactly will be returned. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsRequest withMetricName(String metricName) { setMetricName(metricName); return this; } /** *

* The dimensions to filter against. Only the dimensions that match exactly will be returned. *

* * @return The dimensions to filter against. Only the dimensions that match exactly will be returned. */ public java.util.List getDimensions() { if (dimensions == null) { dimensions = new com.amazonaws.internal.SdkInternalList(); } return dimensions; } /** *

* The dimensions to filter against. Only the dimensions that match exactly will be returned. *

* * @param dimensions * The dimensions to filter against. Only the dimensions that match exactly will be returned. */ public void setDimensions(java.util.Collection dimensions) { if (dimensions == null) { this.dimensions = null; return; } this.dimensions = new com.amazonaws.internal.SdkInternalList(dimensions); } /** *

* The dimensions to filter against. Only the dimensions that match exactly will be 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 * The dimensions to filter against. Only the dimensions that match exactly will be returned. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsRequest withDimensions(DimensionFilter... dimensions) { if (this.dimensions == null) { setDimensions(new com.amazonaws.internal.SdkInternalList(dimensions.length)); } for (DimensionFilter ele : dimensions) { this.dimensions.add(ele); } return this; } /** *

* The dimensions to filter against. Only the dimensions that match exactly will be returned. *

* * @param dimensions * The dimensions to filter against. Only the dimensions that match exactly will be returned. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsRequest withDimensions(java.util.Collection dimensions) { setDimensions(dimensions); return this; } /** *

* The token returned by a previous call to indicate that there is more data available. *

* * @param nextToken * The token returned by a previous call to indicate that there is more data available. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The token returned by a previous call to indicate that there is more data available. *

* * @return The token returned by a previous call to indicate that there is more data available. */ public String getNextToken() { return this.nextToken; } /** *

* The token returned by a previous call to indicate that there is more data available. *

* * @param nextToken * The token returned by a previous call to indicate that there is more data available. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* To filter the results to show only metrics that have had data points published in the past three hours, specify * this parameter with a value of PT3H. This is the only valid value for this parameter. *

*

* The results that are returned are an approximation of the value you specify. There is a low probability that the * returned results include metrics with last published data as much as 40 minutes more than the specified time * interval. *

* * @param recentlyActive * To filter the results to show only metrics that have had data points published in the past three hours, * specify this parameter with a value of PT3H. This is the only valid value for this * parameter.

*

* The results that are returned are an approximation of the value you specify. There is a low probability * that the returned results include metrics with last published data as much as 40 minutes more than the * specified time interval. * @see RecentlyActive */ public void setRecentlyActive(String recentlyActive) { this.recentlyActive = recentlyActive; } /** *

* To filter the results to show only metrics that have had data points published in the past three hours, specify * this parameter with a value of PT3H. This is the only valid value for this parameter. *

*

* The results that are returned are an approximation of the value you specify. There is a low probability that the * returned results include metrics with last published data as much as 40 minutes more than the specified time * interval. *

* * @return To filter the results to show only metrics that have had data points published in the past three hours, * specify this parameter with a value of PT3H. This is the only valid value for this * parameter.

*

* The results that are returned are an approximation of the value you specify. There is a low probability * that the returned results include metrics with last published data as much as 40 minutes more than the * specified time interval. * @see RecentlyActive */ public String getRecentlyActive() { return this.recentlyActive; } /** *

* To filter the results to show only metrics that have had data points published in the past three hours, specify * this parameter with a value of PT3H. This is the only valid value for this parameter. *

*

* The results that are returned are an approximation of the value you specify. There is a low probability that the * returned results include metrics with last published data as much as 40 minutes more than the specified time * interval. *

* * @param recentlyActive * To filter the results to show only metrics that have had data points published in the past three hours, * specify this parameter with a value of PT3H. This is the only valid value for this * parameter.

*

* The results that are returned are an approximation of the value you specify. There is a low probability * that the returned results include metrics with last published data as much as 40 minutes more than the * specified time interval. * @return Returns a reference to this object so that method calls can be chained together. * @see RecentlyActive */ public ListMetricsRequest withRecentlyActive(String recentlyActive) { setRecentlyActive(recentlyActive); return this; } /** *

* To filter the results to show only metrics that have had data points published in the past three hours, specify * this parameter with a value of PT3H. This is the only valid value for this parameter. *

*

* The results that are returned are an approximation of the value you specify. There is a low probability that the * returned results include metrics with last published data as much as 40 minutes more than the specified time * interval. *

* * @param recentlyActive * To filter the results to show only metrics that have had data points published in the past three hours, * specify this parameter with a value of PT3H. This is the only valid value for this * parameter.

*

* The results that are returned are an approximation of the value you specify. There is a low probability * that the returned results include metrics with last published data as much as 40 minutes more than the * specified time interval. * @return Returns a reference to this object so that method calls can be chained together. * @see RecentlyActive */ public ListMetricsRequest withRecentlyActive(RecentlyActive recentlyActive) { this.recentlyActive = recentlyActive.toString(); return this; } /** *

* If you are using this operation in a monitoring account, specify true to include metrics from source * accounts in the returned data. *

*

* The default is false. *

* * @param includeLinkedAccounts * If you are using this operation in a monitoring account, specify true to include metrics from * source accounts in the returned data.

*

* The default is false. */ public void setIncludeLinkedAccounts(Boolean includeLinkedAccounts) { this.includeLinkedAccounts = includeLinkedAccounts; } /** *

* If you are using this operation in a monitoring account, specify true to include metrics from source * accounts in the returned data. *

*

* The default is false. *

* * @return If you are using this operation in a monitoring account, specify true to include metrics * from source accounts in the returned data.

*

* The default is false. */ public Boolean getIncludeLinkedAccounts() { return this.includeLinkedAccounts; } /** *

* If you are using this operation in a monitoring account, specify true to include metrics from source * accounts in the returned data. *

*

* The default is false. *

* * @param includeLinkedAccounts * If you are using this operation in a monitoring account, specify true to include metrics from * source accounts in the returned data.

*

* The default is false. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsRequest withIncludeLinkedAccounts(Boolean includeLinkedAccounts) { setIncludeLinkedAccounts(includeLinkedAccounts); return this; } /** *

* If you are using this operation in a monitoring account, specify true to include metrics from source * accounts in the returned data. *

*

* The default is false. *

* * @return If you are using this operation in a monitoring account, specify true to include metrics * from source accounts in the returned data.

*

* The default is false. */ public Boolean isIncludeLinkedAccounts() { return this.includeLinkedAccounts; } /** *

* When you use this operation in a monitoring account, use this field to return metrics only from one source * account. To do so, specify that source account ID in this field, and also specify true for * IncludeLinkedAccounts. *

* * @param owningAccount * When you use this operation in a monitoring account, use this field to return metrics only from one source * account. To do so, specify that source account ID in this field, and also specify true for * IncludeLinkedAccounts. */ public void setOwningAccount(String owningAccount) { this.owningAccount = owningAccount; } /** *

* When you use this operation in a monitoring account, use this field to return metrics only from one source * account. To do so, specify that source account ID in this field, and also specify true for * IncludeLinkedAccounts. *

* * @return When you use this operation in a monitoring account, use this field to return metrics only from one * source account. To do so, specify that source account ID in this field, and also specify * true for IncludeLinkedAccounts. */ public String getOwningAccount() { return this.owningAccount; } /** *

* When you use this operation in a monitoring account, use this field to return metrics only from one source * account. To do so, specify that source account ID in this field, and also specify true for * IncludeLinkedAccounts. *

* * @param owningAccount * When you use this operation in a monitoring account, use this field to return metrics only from one source * account. To do so, specify that source account ID in this field, and also specify true for * IncludeLinkedAccounts. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsRequest withOwningAccount(String owningAccount) { setOwningAccount(owningAccount); 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 (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getRecentlyActive() != null) sb.append("RecentlyActive: ").append(getRecentlyActive()).append(","); if (getIncludeLinkedAccounts() != null) sb.append("IncludeLinkedAccounts: ").append(getIncludeLinkedAccounts()).append(","); if (getOwningAccount() != null) sb.append("OwningAccount: ").append(getOwningAccount()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListMetricsRequest == false) return false; ListMetricsRequest other = (ListMetricsRequest) 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.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getRecentlyActive() == null ^ this.getRecentlyActive() == null) return false; if (other.getRecentlyActive() != null && other.getRecentlyActive().equals(this.getRecentlyActive()) == false) return false; if (other.getIncludeLinkedAccounts() == null ^ this.getIncludeLinkedAccounts() == null) return false; if (other.getIncludeLinkedAccounts() != null && other.getIncludeLinkedAccounts().equals(this.getIncludeLinkedAccounts()) == false) return false; if (other.getOwningAccount() == null ^ this.getOwningAccount() == null) return false; if (other.getOwningAccount() != null && other.getOwningAccount().equals(this.getOwningAccount()) == 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 + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getRecentlyActive() == null) ? 0 : getRecentlyActive().hashCode()); hashCode = prime * hashCode + ((getIncludeLinkedAccounts() == null) ? 0 : getIncludeLinkedAccounts().hashCode()); hashCode = prime * hashCode + ((getOwningAccount() == null) ? 0 : getOwningAccount().hashCode()); return hashCode; } @Override public ListMetricsRequest clone() { return (ListMetricsRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy