/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.cloudwatch.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* A GetMetricData
call returns an array of MetricDataResult
structures. Each of these
* structures includes the data points for that metric, along with the timestamps of those data points and other
* identifying information.
*
* The short name you specified to represent this metric. *
*/ private String id; /** ** The human-readable label associated with the data. *
*/ private String label; /** ** The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always matches * the number of values and the value for Timestamps[x] is Values[x]. *
*/ private com.amazonaws.internal.SdkInternalList
* The data points for the metric corresponding to Timestamps
. The number of values always matches the
* number of timestamps and the timestamp for Values[x] is Timestamps[x].
*
* The status of the returned data. Complete
indicates that all data points in the requested time range
* were returned. PartialData
means that an incomplete set of data points were returned. You can use
* the NextToken
value that was returned and repeat your request to get more data points.
* NextToken
is not returned if you are performing a math expression. InternalError
* indicates that an error occurred. Retry your request using NextToken
, if present.
*
* A list of messages with additional information about the data returned. *
*/ private com.amazonaws.internal.SdkInternalList* The short name you specified to represent this metric. *
* * @param id * The short name you specified to represent this metric. */ public void setId(String id) { this.id = id; } /** ** The short name you specified to represent this metric. *
* * @return The short name you specified to represent this metric. */ public String getId() { return this.id; } /** ** The short name you specified to represent this metric. *
* * @param id * The short name you specified to represent this metric. * @return Returns a reference to this object so that method calls can be chained together. */ public MetricDataResult withId(String id) { setId(id); return this; } /** ** The human-readable label associated with the data. *
* * @param label * The human-readable label associated with the data. */ public void setLabel(String label) { this.label = label; } /** ** The human-readable label associated with the data. *
* * @return The human-readable label associated with the data. */ public String getLabel() { return this.label; } /** ** The human-readable label associated with the data. *
* * @param label * The human-readable label associated with the data. * @return Returns a reference to this object so that method calls can be chained together. */ public MetricDataResult withLabel(String label) { setLabel(label); return this; } /** ** The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always matches * the number of values and the value for Timestamps[x] is Values[x]. *
* * @return The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always * matches the number of values and the value for Timestamps[x] is Values[x]. */ public java.util.List* The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always matches * the number of values and the value for Timestamps[x] is Values[x]. *
* * @param timestamps * The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always * matches the number of values and the value for Timestamps[x] is Values[x]. */ public void setTimestamps(java.util.Collection* The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always matches * the number of values and the value for Timestamps[x] is Values[x]. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTimestamps(java.util.Collection)} or {@link #withTimestamps(java.util.Collection)} if you want to * override the existing values. *
* * @param timestamps * The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always * matches the number of values and the value for Timestamps[x] is Values[x]. * @return Returns a reference to this object so that method calls can be chained together. */ public MetricDataResult withTimestamps(java.util.Date... timestamps) { if (this.timestamps == null) { setTimestamps(new com.amazonaws.internal.SdkInternalList* The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always matches * the number of values and the value for Timestamps[x] is Values[x]. *
* * @param timestamps * The timestamps for the data points, formatted in Unix timestamp format. The number of timestamps always * matches the number of values and the value for Timestamps[x] is Values[x]. * @return Returns a reference to this object so that method calls can be chained together. */ public MetricDataResult withTimestamps(java.util.Collection
* The data points for the metric corresponding to Timestamps
. The number of values always matches the
* number of timestamps and the timestamp for Values[x] is Timestamps[x].
*
Timestamps
. The number of values always
* matches the number of timestamps and the timestamp for Values[x] is Timestamps[x].
*/
public java.util.List
* The data points for the metric corresponding to Timestamps
. The number of values always matches the
* number of timestamps and the timestamp for Values[x] is Timestamps[x].
*
Timestamps
. The number of values always
* matches the number of timestamps and the timestamp for Values[x] is Timestamps[x].
*/
public void setValues(java.util.Collection
* The data points for the metric corresponding to Timestamps
. The number of values always matches the
* number of timestamps and the timestamp for Values[x] is Timestamps[x].
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setValues(java.util.Collection)} or {@link #withValues(java.util.Collection)} if you want to override the * existing values. *
* * @param values * The data points for the metric corresponding toTimestamps
. The number of values always
* matches the number of timestamps and the timestamp for Values[x] is Timestamps[x].
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricDataResult withValues(Double... values) {
if (this.values == null) {
setValues(new com.amazonaws.internal.SdkInternalList
* The data points for the metric corresponding to Timestamps
. The number of values always matches the
* number of timestamps and the timestamp for Values[x] is Timestamps[x].
*
Timestamps
. The number of values always
* matches the number of timestamps and the timestamp for Values[x] is Timestamps[x].
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricDataResult withValues(java.util.Collection
* The status of the returned data. Complete
indicates that all data points in the requested time range
* were returned. PartialData
means that an incomplete set of data points were returned. You can use
* the NextToken
value that was returned and repeat your request to get more data points.
* NextToken
is not returned if you are performing a math expression. InternalError
* indicates that an error occurred. Retry your request using NextToken
, if present.
*
Complete
indicates that all data points in the requested
* time range were returned. PartialData
means that an incomplete set of data points were
* returned. You can use the NextToken
value that was returned and repeat your request to get
* more data points. NextToken
is not returned if you are performing a math expression.
* InternalError
indicates that an error occurred. Retry your request using
* NextToken
, if present.
* @see StatusCode
*/
public void setStatusCode(String statusCode) {
this.statusCode = statusCode;
}
/**
*
* The status of the returned data. Complete
indicates that all data points in the requested time range
* were returned. PartialData
means that an incomplete set of data points were returned. You can use
* the NextToken
value that was returned and repeat your request to get more data points.
* NextToken
is not returned if you are performing a math expression. InternalError
* indicates that an error occurred. Retry your request using NextToken
, if present.
*
Complete
indicates that all data points in the requested
* time range were returned. PartialData
means that an incomplete set of data points were
* returned. You can use the NextToken
value that was returned and repeat your request to get
* more data points. NextToken
is not returned if you are performing a math expression.
* InternalError
indicates that an error occurred. Retry your request using
* NextToken
, if present.
* @see StatusCode
*/
public String getStatusCode() {
return this.statusCode;
}
/**
*
* The status of the returned data. Complete
indicates that all data points in the requested time range
* were returned. PartialData
means that an incomplete set of data points were returned. You can use
* the NextToken
value that was returned and repeat your request to get more data points.
* NextToken
is not returned if you are performing a math expression. InternalError
* indicates that an error occurred. Retry your request using NextToken
, if present.
*
Complete
indicates that all data points in the requested
* time range were returned. PartialData
means that an incomplete set of data points were
* returned. You can use the NextToken
value that was returned and repeat your request to get
* more data points. NextToken
is not returned if you are performing a math expression.
* InternalError
indicates that an error occurred. Retry your request using
* NextToken
, if present.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StatusCode
*/
public MetricDataResult withStatusCode(String statusCode) {
setStatusCode(statusCode);
return this;
}
/**
*
* The status of the returned data. Complete
indicates that all data points in the requested time range
* were returned. PartialData
means that an incomplete set of data points were returned. You can use
* the NextToken
value that was returned and repeat your request to get more data points.
* NextToken
is not returned if you are performing a math expression. InternalError
* indicates that an error occurred. Retry your request using NextToken
, if present.
*
Complete
indicates that all data points in the requested
* time range were returned. PartialData
means that an incomplete set of data points were
* returned. You can use the NextToken
value that was returned and repeat your request to get
* more data points. NextToken
is not returned if you are performing a math expression.
* InternalError
indicates that an error occurred. Retry your request using
* NextToken
, if present.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StatusCode
*/
public MetricDataResult withStatusCode(StatusCode statusCode) {
this.statusCode = statusCode.toString();
return this;
}
/**
* * A list of messages with additional information about the data returned. *
* * @return A list of messages with additional information about the data returned. */ public java.util.List* A list of messages with additional information about the data returned. *
* * @param messages * A list of messages with additional information about the data returned. */ public void setMessages(java.util.Collection* A list of messages with additional information about the data returned. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMessages(java.util.Collection)} or {@link #withMessages(java.util.Collection)} if you want to override * the existing values. *
* * @param messages * A list of messages with additional information about the data returned. * @return Returns a reference to this object so that method calls can be chained together. */ public MetricDataResult withMessages(MessageData... messages) { if (this.messages == null) { setMessages(new com.amazonaws.internal.SdkInternalList* A list of messages with additional information about the data returned. *
* * @param messages * A list of messages with additional information about the data returned. * @return Returns a reference to this object so that method calls can be chained together. */ public MetricDataResult withMessages(java.util.Collection