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

com.amazonaws.services.pi.model.GetResourceMetricsRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2014-2019 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.pi.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 GetResourceMetricsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The AWS service for which Performance Insights will return metrics. The only valid value for ServiceType * is: RDS *

*/ private String serviceType; /** *

* An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data * source. *

*

* To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for example: * db-FAIHNTYBKTGAUSUZQYPDS2GW4A *

*/ private String identifier; /** *

* An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. *

*/ private java.util.List metricQueries; /** *

* The date and time specifying the beginning of the requested time series data. You can't specify a * StartTime that's earlier than 7 days ago. The value specified is inclusive - data points * equal to or greater than StartTime will be returned. *

*

* The value for StartTime must be earlier than the value for EndTime. *

*/ private java.util.Date startTime; /** *

* The date and time specifiying the end of the requested time series data. The value specified is exclusive * - data points less than (but not equal to) EndTime will be returned. *

*

* The value for EndTime must be later than the value for StartTime. *

*/ private java.util.Date endTime; /** *

* The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as * one second, or as long as one day (86400 seconds). Valid values are: *

*
    *
  • *

    * 1 (one second) *

    *
  • *
  • *

    * 60 (one minute) *

    *
  • *
  • *

    * 300 (five minutes) *

    *
  • *
  • *

    * 3600 (one hour) *

    *
  • *
  • *

    * 86400 (twenty-four hours) *

    *
  • *
*

* If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, with a * goal of returning roughly 100-200 data points in the response. *

*/ private Integer periodInSeconds; /** *

* The maximum number of items to return in the response. If more items exist than the specified * MaxRecords value, a pagination token is included in the response so that the remaining results can * be retrieved. *

*/ private Integer maxResults; /** *

* An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the token, up to the value specified by MaxRecords. *

*/ private String nextToken; /** *

* The AWS service for which Performance Insights will return metrics. The only valid value for ServiceType * is: RDS *

* * @param serviceType * The AWS service for which Performance Insights will return metrics. The only valid value for * ServiceType is: RDS * @see ServiceType */ public void setServiceType(String serviceType) { this.serviceType = serviceType; } /** *

* The AWS service for which Performance Insights will return metrics. The only valid value for ServiceType * is: RDS *

* * @return The AWS service for which Performance Insights will return metrics. The only valid value for * ServiceType is: RDS * @see ServiceType */ public String getServiceType() { return this.serviceType; } /** *

* The AWS service for which Performance Insights will return metrics. The only valid value for ServiceType * is: RDS *

* * @param serviceType * The AWS service for which Performance Insights will return metrics. The only valid value for * ServiceType is: RDS * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceType */ public GetResourceMetricsRequest withServiceType(String serviceType) { setServiceType(serviceType); return this; } /** *

* The AWS service for which Performance Insights will return metrics. The only valid value for ServiceType * is: RDS *

* * @param serviceType * The AWS service for which Performance Insights will return metrics. The only valid value for * ServiceType is: RDS * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceType */ public GetResourceMetricsRequest withServiceType(ServiceType serviceType) { this.serviceType = serviceType.toString(); return this; } /** *

* An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data * source. *

*

* To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for example: * db-FAIHNTYBKTGAUSUZQYPDS2GW4A *

* * @param identifier * An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from * this data source.

*

* To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for * example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A */ public void setIdentifier(String identifier) { this.identifier = identifier; } /** *

* An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data * source. *

*

* To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for example: * db-FAIHNTYBKTGAUSUZQYPDS2GW4A *

* * @return An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from * this data source.

*

* To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for * example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A */ public String getIdentifier() { return this.identifier; } /** *

* An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data * source. *

*

* To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for example: * db-FAIHNTYBKTGAUSUZQYPDS2GW4A *

* * @param identifier * An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from * this data source.

*

* To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for * example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withIdentifier(String identifier) { setIdentifier(identifier); return this; } /** *

* An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. *

* * @return An array of one or more queries to perform. Each query must specify a Performance Insights metric, and * can optionally specify aggregation and filtering criteria. */ public java.util.List getMetricQueries() { return metricQueries; } /** *

* An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. *

* * @param metricQueries * An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. */ public void setMetricQueries(java.util.Collection metricQueries) { if (metricQueries == null) { this.metricQueries = null; return; } this.metricQueries = new java.util.ArrayList(metricQueries); } /** *

* An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricQueries(java.util.Collection)} or {@link #withMetricQueries(java.util.Collection)} if you want * to override the existing values. *

* * @param metricQueries * An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withMetricQueries(MetricQuery... metricQueries) { if (this.metricQueries == null) { setMetricQueries(new java.util.ArrayList(metricQueries.length)); } for (MetricQuery ele : metricQueries) { this.metricQueries.add(ele); } return this; } /** *

* An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. *

* * @param metricQueries * An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can * optionally specify aggregation and filtering criteria. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withMetricQueries(java.util.Collection metricQueries) { setMetricQueries(metricQueries); return this; } /** *

* The date and time specifying the beginning of the requested time series data. You can't specify a * StartTime that's earlier than 7 days ago. The value specified is inclusive - data points * equal to or greater than StartTime will be returned. *

*

* The value for StartTime must be earlier than the value for EndTime. *

* * @param startTime * The date and time specifying the beginning of the requested time series data. You can't specify a * StartTime that's earlier than 7 days ago. The value specified is inclusive - data * points equal to or greater than StartTime will be returned.

*

* The value for StartTime must be earlier than the value for EndTime. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The date and time specifying the beginning of the requested time series data. You can't specify a * StartTime that's earlier than 7 days ago. The value specified is inclusive - data points * equal to or greater than StartTime will be returned. *

*

* The value for StartTime must be earlier than the value for EndTime. *

* * @return The date and time specifying the beginning of the requested time series data. You can't specify a * StartTime that's earlier than 7 days ago. The value specified is inclusive - data * points equal to or greater than StartTime will be returned.

*

* The value for StartTime must be earlier than the value for EndTime. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The date and time specifying the beginning of the requested time series data. You can't specify a * StartTime that's earlier than 7 days ago. The value specified is inclusive - data points * equal to or greater than StartTime will be returned. *

*

* The value for StartTime must be earlier than the value for EndTime. *

* * @param startTime * The date and time specifying the beginning of the requested time series data. You can't specify a * StartTime that's earlier than 7 days ago. The value specified is inclusive - data * points equal to or greater than StartTime will be returned.

*

* The value for StartTime must be earlier than the value for EndTime. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The date and time specifiying the end of the requested time series data. The value specified is exclusive * - data points less than (but not equal to) EndTime will be returned. *

*

* The value for EndTime must be later than the value for StartTime. *

* * @param endTime * The date and time specifiying the end of the requested time series data. The value specified is * exclusive - data points less than (but not equal to) EndTime will be returned.

*

* The value for EndTime must be later than the value for StartTime. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The date and time specifiying the end of the requested time series data. The value specified is exclusive * - data points less than (but not equal to) EndTime will be returned. *

*

* The value for EndTime must be later than the value for StartTime. *

* * @return The date and time specifiying the end of the requested time series data. The value specified is * exclusive - data points less than (but not equal to) EndTime will be returned.

*

* The value for EndTime must be later than the value for StartTime. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The date and time specifiying the end of the requested time series data. The value specified is exclusive * - data points less than (but not equal to) EndTime will be returned. *

*

* The value for EndTime must be later than the value for StartTime. *

* * @param endTime * The date and time specifiying the end of the requested time series data. The value specified is * exclusive - data points less than (but not equal to) EndTime will be returned.

*

* The value for EndTime must be later than the value for StartTime. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as * one second, or as long as one day (86400 seconds). Valid values are: *

*
    *
  • *

    * 1 (one second) *

    *
  • *
  • *

    * 60 (one minute) *

    *
  • *
  • *

    * 300 (five minutes) *

    *
  • *
  • *

    * 3600 (one hour) *

    *
  • *
  • *

    * 86400 (twenty-four hours) *

    *
  • *
*

* If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, with a * goal of returning roughly 100-200 data points in the response. *

* * @param periodInSeconds * The granularity, in seconds, of the data points returned from Performance Insights. A period can be as * short as one second, or as long as one day (86400 seconds). Valid values are:

*
    *
  • *

    * 1 (one second) *

    *
  • *
  • *

    * 60 (one minute) *

    *
  • *
  • *

    * 300 (five minutes) *

    *
  • *
  • *

    * 3600 (one hour) *

    *
  • *
  • *

    * 86400 (twenty-four hours) *

    *
  • *
*

* If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, * with a goal of returning roughly 100-200 data points in the response. */ public void setPeriodInSeconds(Integer periodInSeconds) { this.periodInSeconds = periodInSeconds; } /** *

* The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as * one second, or as long as one day (86400 seconds). Valid values are: *

*
    *
  • *

    * 1 (one second) *

    *
  • *
  • *

    * 60 (one minute) *

    *
  • *
  • *

    * 300 (five minutes) *

    *
  • *
  • *

    * 3600 (one hour) *

    *
  • *
  • *

    * 86400 (twenty-four hours) *

    *
  • *
*

* If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, with a * goal of returning roughly 100-200 data points in the response. *

* * @return The granularity, in seconds, of the data points returned from Performance Insights. A period can be as * short as one second, or as long as one day (86400 seconds). Valid values are:

*
    *
  • *

    * 1 (one second) *

    *
  • *
  • *

    * 60 (one minute) *

    *
  • *
  • *

    * 300 (five minutes) *

    *
  • *
  • *

    * 3600 (one hour) *

    *
  • *
  • *

    * 86400 (twenty-four hours) *

    *
  • *
*

* If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, * with a goal of returning roughly 100-200 data points in the response. */ public Integer getPeriodInSeconds() { return this.periodInSeconds; } /** *

* The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as * one second, or as long as one day (86400 seconds). Valid values are: *

*
    *
  • *

    * 1 (one second) *

    *
  • *
  • *

    * 60 (one minute) *

    *
  • *
  • *

    * 300 (five minutes) *

    *
  • *
  • *

    * 3600 (one hour) *

    *
  • *
  • *

    * 86400 (twenty-four hours) *

    *
  • *
*

* If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, with a * goal of returning roughly 100-200 data points in the response. *

* * @param periodInSeconds * The granularity, in seconds, of the data points returned from Performance Insights. A period can be as * short as one second, or as long as one day (86400 seconds). Valid values are:

*
    *
  • *

    * 1 (one second) *

    *
  • *
  • *

    * 60 (one minute) *

    *
  • *
  • *

    * 300 (five minutes) *

    *
  • *
  • *

    * 3600 (one hour) *

    *
  • *
  • *

    * 86400 (twenty-four hours) *

    *
  • *
*

* If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, * with a goal of returning roughly 100-200 data points in the response. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withPeriodInSeconds(Integer periodInSeconds) { setPeriodInSeconds(periodInSeconds); return this; } /** *

* The maximum number of items to return in the response. If more items exist than the specified * MaxRecords value, a pagination token is included in the response so that the remaining results can * be retrieved. *

* * @param maxResults * The maximum number of items to return in the response. If more items exist than the specified * MaxRecords value, a pagination token is included in the response so that the remaining * results can be retrieved. */ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* The maximum number of items to return in the response. If more items exist than the specified * MaxRecords value, a pagination token is included in the response so that the remaining results can * be retrieved. *

* * @return The maximum number of items to return in the response. If more items exist than the specified * MaxRecords value, a pagination token is included in the response so that the remaining * results can be retrieved. */ public Integer getMaxResults() { return this.maxResults; } /** *

* The maximum number of items to return in the response. If more items exist than the specified * MaxRecords value, a pagination token is included in the response so that the remaining results can * be retrieved. *

* * @param maxResults * The maximum number of items to return in the response. If more items exist than the specified * MaxRecords value, a pagination token is included in the response so that the remaining * results can be retrieved. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; } /** *

* An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the token, up to the value specified by MaxRecords. *

* * @param nextToken * An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the token, up to the value specified by MaxRecords. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the token, up to the value specified by MaxRecords. *

* * @return An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the token, up to the value specified by MaxRecords. */ public String getNextToken() { return this.nextToken; } /** *

* An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the token, up to the value specified by MaxRecords. *

* * @param nextToken * An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the token, up to the value specified by MaxRecords. * @return Returns a reference to this object so that method calls can be chained together. */ public GetResourceMetricsRequest withNextToken(String nextToken) { setNextToken(nextToken); 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 (getServiceType() != null) sb.append("ServiceType: ").append(getServiceType()).append(","); if (getIdentifier() != null) sb.append("Identifier: ").append(getIdentifier()).append(","); if (getMetricQueries() != null) sb.append("MetricQueries: ").append(getMetricQueries()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getPeriodInSeconds() != null) sb.append("PeriodInSeconds: ").append(getPeriodInSeconds()).append(","); if (getMaxResults() != null) sb.append("MaxResults: ").append(getMaxResults()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetResourceMetricsRequest == false) return false; GetResourceMetricsRequest other = (GetResourceMetricsRequest) obj; if (other.getServiceType() == null ^ this.getServiceType() == null) return false; if (other.getServiceType() != null && other.getServiceType().equals(this.getServiceType()) == false) return false; if (other.getIdentifier() == null ^ this.getIdentifier() == null) return false; if (other.getIdentifier() != null && other.getIdentifier().equals(this.getIdentifier()) == false) return false; if (other.getMetricQueries() == null ^ this.getMetricQueries() == null) return false; if (other.getMetricQueries() != null && other.getMetricQueries().equals(this.getMetricQueries()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getPeriodInSeconds() == null ^ this.getPeriodInSeconds() == null) return false; if (other.getPeriodInSeconds() != null && other.getPeriodInSeconds().equals(this.getPeriodInSeconds()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServiceType() == null) ? 0 : getServiceType().hashCode()); hashCode = prime * hashCode + ((getIdentifier() == null) ? 0 : getIdentifier().hashCode()); hashCode = prime * hashCode + ((getMetricQueries() == null) ? 0 : getMetricQueries().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getPeriodInSeconds() == null) ? 0 : getPeriodInSeconds().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public GetResourceMetricsRequest clone() { return (GetResourceMetricsRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy