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

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

    /**
     * 

* The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, a * Metrics Insights query, or a math expression to perform on retrieved data. *

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

* The time stamp indicating the earliest data to be returned. *

*

* The value specified is inclusive; results include data points with the specified time stamp. *

*

* CloudWatch rounds the specified time stamp as follows: *

*
    *
  • *

    * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is rounded down * to 12:32:00. *

    *
  • *
  • *

    * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, 12:32:34 * is rounded down to 12:30:00. *

    *
  • *
  • *

    * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, 12:32:34 is * rounded down to 12:00:00. *

    *
  • *
*

* If you set Period to 5, 10, or 30, the start time of your request is rounded down to the nearest * time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at * (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you * receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using * a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get a * faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime. *

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

* The time stamp indicating the latest data to be returned. *

*

* The value specified is exclusive; results include data points up to the specified time stamp. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime can get a faster * response from CloudWatch than setting 12:07 or 12:29 as the EndTime. *

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

* Include this value, if it was returned by the previous GetMetricData operation, to get the next set * of data points. *

*/ private String nextToken; /** *

* The order in which data points should be returned. TimestampDescending returns the newest data first * and paginates when the MaxDatapoints limit is reached. TimestampAscending returns the * oldest data first and paginates when the MaxDatapoints limit is reached. *

*

* If you omit this parameter, the default of TimestampDescending is used. *

*/ private String scanBy; /** *

* The maximum number of data points the request should return before paginating. If you omit this, the default of * 100,800 is used. *

*/ private Integer maxDatapoints; /** *

* This structure includes the Timezone parameter, which you can use to specify your time zone so that * the labels of returned data display the correct time for your time zone. *

*/ private LabelOptions labelOptions; /** *

* The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, a * Metrics Insights query, or a math expression to perform on retrieved data. *

* * @return The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to * retrieve, a Metrics Insights query, or a math expression to perform on retrieved data. */ public java.util.List getMetricDataQueries() { if (metricDataQueries == null) { metricDataQueries = new com.amazonaws.internal.SdkInternalList(); } return metricDataQueries; } /** *

* The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, a * Metrics Insights query, or a math expression to perform on retrieved data. *

* * @param metricDataQueries * The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, * a Metrics Insights query, or a math expression to perform on retrieved data. */ public void setMetricDataQueries(java.util.Collection metricDataQueries) { if (metricDataQueries == null) { this.metricDataQueries = null; return; } this.metricDataQueries = new com.amazonaws.internal.SdkInternalList(metricDataQueries); } /** *

* The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, a * Metrics Insights query, or a math expression to perform on retrieved data. *

*

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

* * @param metricDataQueries * The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, * a Metrics Insights query, or a math expression to perform on retrieved data. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricDataRequest withMetricDataQueries(MetricDataQuery... metricDataQueries) { if (this.metricDataQueries == null) { setMetricDataQueries(new com.amazonaws.internal.SdkInternalList(metricDataQueries.length)); } for (MetricDataQuery ele : metricDataQueries) { this.metricDataQueries.add(ele); } return this; } /** *

* The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, a * Metrics Insights query, or a math expression to perform on retrieved data. *

* * @param metricDataQueries * The metric queries to be returned. A single GetMetricData call can include as many as 500 * MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, * a Metrics Insights query, or a math expression to perform on retrieved data. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricDataRequest withMetricDataQueries(java.util.Collection metricDataQueries) { setMetricDataQueries(metricDataQueries); return this; } /** *

* The time stamp indicating the earliest data to be returned. *

*

* The value specified is inclusive; results include data points with the specified time stamp. *

*

* CloudWatch rounds the specified time stamp as follows: *

*
    *
  • *

    * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is rounded down * to 12:32:00. *

    *
  • *
  • *

    * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, 12:32:34 * is rounded down to 12:30:00. *

    *
  • *
  • *

    * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, 12:32:34 is * rounded down to 12:00:00. *

    *
  • *
*

* If you set Period to 5, 10, or 30, the start time of your request is rounded down to the nearest * time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at * (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you * receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using * a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get a * faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime. *

* * @param startTime * The time stamp indicating the earliest data to be returned.

*

* The value specified is inclusive; results include data points with the specified time stamp. *

*

* CloudWatch rounds the specified time stamp as follows: *

*
    *
  • *

    * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is * rounded down to 12:32:00. *

    *
  • *
  • *

    * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, * 12:32:34 is rounded down to 12:30:00. *

    *
  • *
  • *

    * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, * 12:32:34 is rounded down to 12:00:00. *

    *
  • *
*

* If you set Period to 5, 10, or 30, the start time of your request is rounded down to the * nearest time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you * make a query at (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is * rounded down and you receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the * previous 5 minutes of data, using a period of 5 seconds, you receive data timestamped between 15:02:15 and * 15:07:15. *

*

* For better performance, specify StartTime and EndTime values that align with the * value of the metric's Period and sync up with the beginning and end of an hour. For example, * if the Period of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime * can get a faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The time stamp indicating the earliest data to be returned. *

*

* The value specified is inclusive; results include data points with the specified time stamp. *

*

* CloudWatch rounds the specified time stamp as follows: *

*
    *
  • *

    * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is rounded down * to 12:32:00. *

    *
  • *
  • *

    * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, 12:32:34 * is rounded down to 12:30:00. *

    *
  • *
  • *

    * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, 12:32:34 is * rounded down to 12:00:00. *

    *
  • *
*

* If you set Period to 5, 10, or 30, the start time of your request is rounded down to the nearest * time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at * (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you * receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using * a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get a * faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime. *

* * @return The time stamp indicating the earliest data to be returned.

*

* The value specified is inclusive; results include data points with the specified time stamp. *

*

* CloudWatch rounds the specified time stamp as follows: *

*
    *
  • *

    * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is * rounded down to 12:32:00. *

    *
  • *
  • *

    * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, * 12:32:34 is rounded down to 12:30:00. *

    *
  • *
  • *

    * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, * 12:32:34 is rounded down to 12:00:00. *

    *
  • *
*

* If you set Period to 5, 10, or 30, the start time of your request is rounded down to the * nearest time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you * make a query at (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is * rounded down and you receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the * previous 5 minutes of data, using a period of 5 seconds, you receive data timestamped between 15:02:15 * and 15:07:15. *

*

* For better performance, specify StartTime and EndTime values that align with * the value of the metric's Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 or 12:30 as * StartTime can get a faster response from CloudWatch than setting 12:07 or 12:29 as the * StartTime. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The time stamp indicating the earliest data to be returned. *

*

* The value specified is inclusive; results include data points with the specified time stamp. *

*

* CloudWatch rounds the specified time stamp as follows: *

*
    *
  • *

    * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is rounded down * to 12:32:00. *

    *
  • *
  • *

    * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, 12:32:34 * is rounded down to 12:30:00. *

    *
  • *
  • *

    * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, 12:32:34 is * rounded down to 12:00:00. *

    *
  • *
*

* If you set Period to 5, 10, or 30, the start time of your request is rounded down to the nearest * time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at * (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you * receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using * a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime can get a * faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime. *

* * @param startTime * The time stamp indicating the earliest data to be returned.

*

* The value specified is inclusive; results include data points with the specified time stamp. *

*

* CloudWatch rounds the specified time stamp as follows: *

*
    *
  • *

    * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is * rounded down to 12:32:00. *

    *
  • *
  • *

    * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, * 12:32:34 is rounded down to 12:30:00. *

    *
  • *
  • *

    * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, * 12:32:34 is rounded down to 12:00:00. *

    *
  • *
*

* If you set Period to 5, 10, or 30, the start time of your request is rounded down to the * nearest time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you * make a query at (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is * rounded down and you receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the * previous 5 minutes of data, using a period of 5 seconds, you receive data timestamped between 15:02:15 and * 15:07:15. *

*

* For better performance, specify StartTime and EndTime values that align with the * value of the metric's Period and sync up with the beginning and end of an hour. For example, * if the Period of a metric is 5 minutes, specifying 12:05 or 12:30 as StartTime * can get a faster response from CloudWatch than setting 12:07 or 12:29 as the StartTime. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricDataRequest withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The time stamp indicating the latest data to be returned. *

*

* The value specified is exclusive; results include data points up to the specified time stamp. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime can get a faster * response from CloudWatch than setting 12:07 or 12:29 as the EndTime. *

* * @param endTime * The time stamp indicating the latest data to be returned.

*

* The value specified is exclusive; results include data points up to the specified time stamp. *

*

* For better performance, specify StartTime and EndTime values that align with the * value of the metric's Period and sync up with the beginning and end of an hour. For example, * if the Period of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime can * get a faster response from CloudWatch than setting 12:07 or 12:29 as the EndTime. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The time stamp indicating the latest data to be returned. *

*

* The value specified is exclusive; results include data points up to the specified time stamp. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime can get a faster * response from CloudWatch than setting 12:07 or 12:29 as the EndTime. *

* * @return The time stamp indicating the latest data to be returned.

*

* The value specified is exclusive; results include data points up to the specified time stamp. *

*

* For better performance, specify StartTime and EndTime values that align with * the value of the metric's Period and sync up with the beginning and end of an hour. For * example, if the Period of a metric is 5 minutes, specifying 12:05 or 12:30 as * EndTime can get a faster response from CloudWatch than setting 12:07 or 12:29 as the * EndTime. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The time stamp indicating the latest data to be returned. *

*

* The value specified is exclusive; results include data points up to the specified time stamp. *

*

* For better performance, specify StartTime and EndTime values that align with the value * of the metric's Period and sync up with the beginning and end of an hour. For example, if the * Period of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime can get a faster * response from CloudWatch than setting 12:07 or 12:29 as the EndTime. *

* * @param endTime * The time stamp indicating the latest data to be returned.

*

* The value specified is exclusive; results include data points up to the specified time stamp. *

*

* For better performance, specify StartTime and EndTime values that align with the * value of the metric's Period and sync up with the beginning and end of an hour. For example, * if the Period of a metric is 5 minutes, specifying 12:05 or 12:30 as EndTime can * get a faster response from CloudWatch than setting 12:07 or 12:29 as the EndTime. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricDataRequest withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* Include this value, if it was returned by the previous GetMetricData operation, to get the next set * of data points. *

* * @param nextToken * Include this value, if it was returned by the previous GetMetricData operation, to get the * next set of data points. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* Include this value, if it was returned by the previous GetMetricData operation, to get the next set * of data points. *

* * @return Include this value, if it was returned by the previous GetMetricData operation, to get the * next set of data points. */ public String getNextToken() { return this.nextToken; } /** *

* Include this value, if it was returned by the previous GetMetricData operation, to get the next set * of data points. *

* * @param nextToken * Include this value, if it was returned by the previous GetMetricData operation, to get the * next set of data points. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricDataRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* The order in which data points should be returned. TimestampDescending returns the newest data first * and paginates when the MaxDatapoints limit is reached. TimestampAscending returns the * oldest data first and paginates when the MaxDatapoints limit is reached. *

*

* If you omit this parameter, the default of TimestampDescending is used. *

* * @param scanBy * The order in which data points should be returned. TimestampDescending returns the newest * data first and paginates when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when the * MaxDatapoints limit is reached.

*

* If you omit this parameter, the default of TimestampDescending is used. * @see ScanBy */ public void setScanBy(String scanBy) { this.scanBy = scanBy; } /** *

* The order in which data points should be returned. TimestampDescending returns the newest data first * and paginates when the MaxDatapoints limit is reached. TimestampAscending returns the * oldest data first and paginates when the MaxDatapoints limit is reached. *

*

* If you omit this parameter, the default of TimestampDescending is used. *

* * @return The order in which data points should be returned. TimestampDescending returns the newest * data first and paginates when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when the * MaxDatapoints limit is reached.

*

* If you omit this parameter, the default of TimestampDescending is used. * @see ScanBy */ public String getScanBy() { return this.scanBy; } /** *

* The order in which data points should be returned. TimestampDescending returns the newest data first * and paginates when the MaxDatapoints limit is reached. TimestampAscending returns the * oldest data first and paginates when the MaxDatapoints limit is reached. *

*

* If you omit this parameter, the default of TimestampDescending is used. *

* * @param scanBy * The order in which data points should be returned. TimestampDescending returns the newest * data first and paginates when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when the * MaxDatapoints limit is reached.

*

* If you omit this parameter, the default of TimestampDescending is used. * @return Returns a reference to this object so that method calls can be chained together. * @see ScanBy */ public GetMetricDataRequest withScanBy(String scanBy) { setScanBy(scanBy); return this; } /** *

* The order in which data points should be returned. TimestampDescending returns the newest data first * and paginates when the MaxDatapoints limit is reached. TimestampAscending returns the * oldest data first and paginates when the MaxDatapoints limit is reached. *

*

* If you omit this parameter, the default of TimestampDescending is used. *

* * @param scanBy * The order in which data points should be returned. TimestampDescending returns the newest * data first and paginates when the MaxDatapoints limit is reached. * TimestampAscending returns the oldest data first and paginates when the * MaxDatapoints limit is reached.

*

* If you omit this parameter, the default of TimestampDescending is used. * @return Returns a reference to this object so that method calls can be chained together. * @see ScanBy */ public GetMetricDataRequest withScanBy(ScanBy scanBy) { this.scanBy = scanBy.toString(); return this; } /** *

* The maximum number of data points the request should return before paginating. If you omit this, the default of * 100,800 is used. *

* * @param maxDatapoints * The maximum number of data points the request should return before paginating. If you omit this, the * default of 100,800 is used. */ public void setMaxDatapoints(Integer maxDatapoints) { this.maxDatapoints = maxDatapoints; } /** *

* The maximum number of data points the request should return before paginating. If you omit this, the default of * 100,800 is used. *

* * @return The maximum number of data points the request should return before paginating. If you omit this, the * default of 100,800 is used. */ public Integer getMaxDatapoints() { return this.maxDatapoints; } /** *

* The maximum number of data points the request should return before paginating. If you omit this, the default of * 100,800 is used. *

* * @param maxDatapoints * The maximum number of data points the request should return before paginating. If you omit this, the * default of 100,800 is used. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricDataRequest withMaxDatapoints(Integer maxDatapoints) { setMaxDatapoints(maxDatapoints); return this; } /** *

* This structure includes the Timezone parameter, which you can use to specify your time zone so that * the labels of returned data display the correct time for your time zone. *

* * @param labelOptions * This structure includes the Timezone parameter, which you can use to specify your time zone * so that the labels of returned data display the correct time for your time zone. */ public void setLabelOptions(LabelOptions labelOptions) { this.labelOptions = labelOptions; } /** *

* This structure includes the Timezone parameter, which you can use to specify your time zone so that * the labels of returned data display the correct time for your time zone. *

* * @return This structure includes the Timezone parameter, which you can use to specify your time zone * so that the labels of returned data display the correct time for your time zone. */ public LabelOptions getLabelOptions() { return this.labelOptions; } /** *

* This structure includes the Timezone parameter, which you can use to specify your time zone so that * the labels of returned data display the correct time for your time zone. *

* * @param labelOptions * This structure includes the Timezone parameter, which you can use to specify your time zone * so that the labels of returned data display the correct time for your time zone. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricDataRequest withLabelOptions(LabelOptions labelOptions) { setLabelOptions(labelOptions); 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 (getMetricDataQueries() != null) sb.append("MetricDataQueries: ").append(getMetricDataQueries()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getScanBy() != null) sb.append("ScanBy: ").append(getScanBy()).append(","); if (getMaxDatapoints() != null) sb.append("MaxDatapoints: ").append(getMaxDatapoints()).append(","); if (getLabelOptions() != null) sb.append("LabelOptions: ").append(getLabelOptions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetMetricDataRequest == false) return false; GetMetricDataRequest other = (GetMetricDataRequest) obj; if (other.getMetricDataQueries() == null ^ this.getMetricDataQueries() == null) return false; if (other.getMetricDataQueries() != null && other.getMetricDataQueries().equals(this.getMetricDataQueries()) == 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.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getScanBy() == null ^ this.getScanBy() == null) return false; if (other.getScanBy() != null && other.getScanBy().equals(this.getScanBy()) == false) return false; if (other.getMaxDatapoints() == null ^ this.getMaxDatapoints() == null) return false; if (other.getMaxDatapoints() != null && other.getMaxDatapoints().equals(this.getMaxDatapoints()) == false) return false; if (other.getLabelOptions() == null ^ this.getLabelOptions() == null) return false; if (other.getLabelOptions() != null && other.getLabelOptions().equals(this.getLabelOptions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMetricDataQueries() == null) ? 0 : getMetricDataQueries().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getScanBy() == null) ? 0 : getScanBy().hashCode()); hashCode = prime * hashCode + ((getMaxDatapoints() == null) ? 0 : getMaxDatapoints().hashCode()); hashCode = prime * hashCode + ((getLabelOptions() == null) ? 0 : getLabelOptions().hashCode()); return hashCode; } @Override public GetMetricDataRequest clone() { return (GetMetricDataRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy