com.amazonaws.services.pi.model.GetResourceMetricsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-pi Show documentation
/*
* 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.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 Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*/
private String serviceType;
/**
*
* An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights
* gathers metrics from this data source. In the console, the identifier is shown as ResourceID. When you
* call DescribeDBInstances
, the identifier is returned as DbiResourceId
.
*
*
* To use a DB instance as a data source, specify its DbiResourceId
value. For example, specify
* db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
*
*/
private String identifier;
/**
*
* An array of one or more queries to perform. Each query must specify a Performance Insights metric and specify an
* aggregate function, and you can provide filtering criteria. You must append the aggregate function to the metric.
* For example, to find the average for the metric db.load
you must use db.load.avg
. Valid
* values for aggregate functions include .avg
, .min
, .max
, and
* .sum
.
*
*/
private java.util.List metricQueries;
/**
*
* The date and time specifying the beginning of the requested time series query range. You can't specify a
* StartTime
that is earlier than 7 days ago. By default, Performance Insights has 7 days of retention,
* but you can extend this range up to 2 years. The value specified is inclusive. Thus, the command returns
* data points equal to or greater than StartTime
.
*
*
* The value for StartTime
must be earlier than the value for EndTime
.
*
*/
private java.util.Date startTime;
/**
*
* The date and time specifying the end of the requested time series query range. The value specified is
* exclusive. Thus, the command returns data points less than (but not equal to) EndTime
.
*
*
* 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 returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
*
*/
private String periodAlignment;
/**
*
* The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @param serviceType
* The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as
* follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @see ServiceType
*/
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
/**
*
* The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @return The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as
* follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @see ServiceType
*/
public String getServiceType() {
return this.serviceType;
}
/**
*
* The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @param serviceType
* The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as
* follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @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 Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @param serviceType
* The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as
* follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @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 identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights
* gathers metrics from this data source. In the console, the identifier is shown as ResourceID. When you
* call DescribeDBInstances
, the identifier is returned as DbiResourceId
.
*
*
* To use a DB instance as a data source, specify its DbiResourceId
value. For example, specify
* db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
*
*
* @param identifier
* An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance
* Insights gathers metrics from this data source. In the console, the identifier is shown as
* ResourceID. When you call DescribeDBInstances
, the identifier is returned as
* DbiResourceId
.
*
* To use a DB instance as a data source, specify its DbiResourceId
value. For example, specify
* db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
*
* An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights
* gathers metrics from this data source. In the console, the identifier is shown as ResourceID. When you
* call DescribeDBInstances
, the identifier is returned as DbiResourceId
.
*
*
* To use a DB instance as a data source, specify its DbiResourceId
value. For example, specify
* db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
*
*
* @return An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance
* Insights gathers metrics from this data source. In the console, the identifier is shown as
* ResourceID. When you call DescribeDBInstances
, the identifier is returned as
* DbiResourceId
.
*
* To use a DB instance as a data source, specify its DbiResourceId
value. For example, specify
* db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
*/
public String getIdentifier() {
return this.identifier;
}
/**
*
* An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights
* gathers metrics from this data source. In the console, the identifier is shown as ResourceID. When you
* call DescribeDBInstances
, the identifier is returned as DbiResourceId
.
*
*
* To use a DB instance as a data source, specify its DbiResourceId
value. For example, specify
* db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
*
*
* @param identifier
* An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance
* Insights gathers metrics from this data source. In the console, the identifier is shown as
* ResourceID. When you call DescribeDBInstances
, the identifier is returned as
* DbiResourceId
.
*
* To use a DB instance as a data source, specify its DbiResourceId
value. For example, specify
* db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
* @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 specify an
* aggregate function, and you can provide filtering criteria. You must append the aggregate function to the metric.
* For example, to find the average for the metric db.load
you must use db.load.avg
. Valid
* values for aggregate functions include .avg
, .min
, .max
, and
* .sum
.
*
*
* @return An array of one or more queries to perform. Each query must specify a Performance Insights metric and
* specify an aggregate function, and you can provide filtering criteria. You must append the aggregate
* function to the metric. For example, to find the average for the metric db.load
you must use
* db.load.avg
. Valid values for aggregate functions include .avg
,
* .min
, .max
, and .sum
.
*/
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 specify an
* aggregate function, and you can provide filtering criteria. You must append the aggregate function to the metric.
* For example, to find the average for the metric db.load
you must use db.load.avg
. Valid
* values for aggregate functions include .avg
, .min
, .max
, and
* .sum
.
*
*
* @param metricQueries
* An array of one or more queries to perform. Each query must specify a Performance Insights metric and
* specify an aggregate function, and you can provide filtering criteria. You must append the aggregate
* function to the metric. For example, to find the average for the metric db.load
you must use
* db.load.avg
. Valid values for aggregate functions include .avg
,
* .min
, .max
, and .sum
.
*/
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 specify an
* aggregate function, and you can provide filtering criteria. You must append the aggregate function to the metric.
* For example, to find the average for the metric db.load
you must use db.load.avg
. Valid
* values for aggregate functions include .avg
, .min
, .max
, and
* .sum
.
*
*
* 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
* specify an aggregate function, and you can provide filtering criteria. You must append the aggregate
* function to the metric. For example, to find the average for the metric db.load
you must use
* db.load.avg
. Valid values for aggregate functions include .avg
,
* .min
, .max
, and .sum
.
* @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 specify an
* aggregate function, and you can provide filtering criteria. You must append the aggregate function to the metric.
* For example, to find the average for the metric db.load
you must use db.load.avg
. Valid
* values for aggregate functions include .avg
, .min
, .max
, and
* .sum
.
*
*
* @param metricQueries
* An array of one or more queries to perform. Each query must specify a Performance Insights metric and
* specify an aggregate function, and you can provide filtering criteria. You must append the aggregate
* function to the metric. For example, to find the average for the metric db.load
you must use
* db.load.avg
. Valid values for aggregate functions include .avg
,
* .min
, .max
, and .sum
.
* @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 query range. You can't specify a
* StartTime
that is earlier than 7 days ago. By default, Performance Insights has 7 days of retention,
* but you can extend this range up to 2 years. The value specified is inclusive. Thus, the command returns
* data points equal to or greater than StartTime
.
*
*
* 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 query range. You can't specify a
* StartTime
that is earlier than 7 days ago. By default, Performance Insights has 7 days of
* retention, but you can extend this range up to 2 years. The value specified is inclusive. Thus, the
* command returns data points equal to or greater than StartTime
.
*
* 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 query range. You can't specify a
* StartTime
that is earlier than 7 days ago. By default, Performance Insights has 7 days of retention,
* but you can extend this range up to 2 years. The value specified is inclusive. Thus, the command returns
* data points equal to or greater than StartTime
.
*
*
* 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 query range. You can't specify a
* StartTime
that is earlier than 7 days ago. By default, Performance Insights has 7 days of
* retention, but you can extend this range up to 2 years. The value specified is inclusive. Thus,
* the command returns data points equal to or greater than StartTime
.
*
* 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 query range. You can't specify a
* StartTime
that is earlier than 7 days ago. By default, Performance Insights has 7 days of retention,
* but you can extend this range up to 2 years. The value specified is inclusive. Thus, the command returns
* data points equal to or greater than StartTime
.
*
*
* 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 query range. You can't specify a
* StartTime
that is earlier than 7 days ago. By default, Performance Insights has 7 days of
* retention, but you can extend this range up to 2 years. The value specified is inclusive. Thus, the
* command returns data points equal to or greater than StartTime
.
*
* 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 specifying the end of the requested time series query range. The value specified is
* exclusive. Thus, the command returns data points less than (but not equal to) EndTime
.
*
*
* The value for EndTime
must be later than the value for StartTime
.
*
*
* @param endTime
* The date and time specifying the end of the requested time series query range. The value specified is
* exclusive. Thus, the command returns data points less than (but not equal to) EndTime
* .
*
* 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 specifying the end of the requested time series query range. The value specified is
* exclusive. Thus, the command returns data points less than (but not equal to) EndTime
.
*
*
* The value for EndTime
must be later than the value for StartTime
.
*
*
* @return The date and time specifying the end of the requested time series query range. The value specified is
* exclusive. Thus, the command returns data points less than (but not equal to) EndTime
* .
*
* The value for EndTime
must be later than the value for StartTime
.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* The date and time specifying the end of the requested time series query range. The value specified is
* exclusive. Thus, the command returns data points less than (but not equal to) EndTime
.
*
*
* The value for EndTime
must be later than the value for StartTime
.
*
*
* @param endTime
* The date and time specifying the end of the requested time series query range. The value specified is
* exclusive. Thus, the command returns data points less than (but not equal to) EndTime
* .
*
* 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;
}
/**
*
* The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
*
*
* @param periodAlignment
* The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
* @see PeriodAlignment
*/
public void setPeriodAlignment(String periodAlignment) {
this.periodAlignment = periodAlignment;
}
/**
*
* The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
*
*
* @return The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
* @see PeriodAlignment
*/
public String getPeriodAlignment() {
return this.periodAlignment;
}
/**
*
* The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
*
*
* @param periodAlignment
* The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PeriodAlignment
*/
public GetResourceMetricsRequest withPeriodAlignment(String periodAlignment) {
setPeriodAlignment(periodAlignment);
return this;
}
/**
*
* The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
*
*
* @param periodAlignment
* The returned timestamp which is the start or end time of the time periods. The default value is
* END_TIME
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PeriodAlignment
*/
public GetResourceMetricsRequest withPeriodAlignment(PeriodAlignment periodAlignment) {
this.periodAlignment = periodAlignment.toString();
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()).append(",");
if (getPeriodAlignment() != null)
sb.append("PeriodAlignment: ").append(getPeriodAlignment());
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;
if (other.getPeriodAlignment() == null ^ this.getPeriodAlignment() == null)
return false;
if (other.getPeriodAlignment() != null && other.getPeriodAlignment().equals(this.getPeriodAlignment()) == 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());
hashCode = prime * hashCode + ((getPeriodAlignment() == null) ? 0 : getPeriodAlignment().hashCode());
return hashCode;
}
@Override
public GetResourceMetricsRequest clone() {
return (GetResourceMetricsRequest) super.clone();
}
}