/* * 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; /** *
* Encapsulates the statistical data that CloudWatch computes from metric data. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Datapoint implements Serializable, Cloneable { /** ** The time stamp used for the data point. *
*/ private java.util.Date timestamp; /** ** The number of metric values that contributed to the aggregate value of this data point. *
*/ private Double sampleCount; /** ** The average of the metric values that correspond to the data point. *
*/ private Double average; /** ** The sum of the metric values for the data point. *
*/ private Double sum; /** ** The minimum metric value for the data point. *
*/ private Double minimum; /** ** The maximum metric value for the data point. *
*/ private Double maximum; /** ** The standard unit for the data point. *
*/ private String unit; /** ** The percentile statistic for the data point. *
*/ private java.util.Map* The time stamp used for the data point. *
* * @param timestamp * The time stamp used for the data point. */ public void setTimestamp(java.util.Date timestamp) { this.timestamp = timestamp; } /** ** The time stamp used for the data point. *
* * @return The time stamp used for the data point. */ public java.util.Date getTimestamp() { return this.timestamp; } /** ** The time stamp used for the data point. *
* * @param timestamp * The time stamp used for the data point. * @return Returns a reference to this object so that method calls can be chained together. */ public Datapoint withTimestamp(java.util.Date timestamp) { setTimestamp(timestamp); return this; } /** ** The number of metric values that contributed to the aggregate value of this data point. *
* * @param sampleCount * The number of metric values that contributed to the aggregate value of this data point. */ public void setSampleCount(Double sampleCount) { this.sampleCount = sampleCount; } /** ** The number of metric values that contributed to the aggregate value of this data point. *
* * @return The number of metric values that contributed to the aggregate value of this data point. */ public Double getSampleCount() { return this.sampleCount; } /** ** The number of metric values that contributed to the aggregate value of this data point. *
* * @param sampleCount * The number of metric values that contributed to the aggregate value of this data point. * @return Returns a reference to this object so that method calls can be chained together. */ public Datapoint withSampleCount(Double sampleCount) { setSampleCount(sampleCount); return this; } /** ** The average of the metric values that correspond to the data point. *
* * @param average * The average of the metric values that correspond to the data point. */ public void setAverage(Double average) { this.average = average; } /** ** The average of the metric values that correspond to the data point. *
* * @return The average of the metric values that correspond to the data point. */ public Double getAverage() { return this.average; } /** ** The average of the metric values that correspond to the data point. *
* * @param average * The average of the metric values that correspond to the data point. * @return Returns a reference to this object so that method calls can be chained together. */ public Datapoint withAverage(Double average) { setAverage(average); return this; } /** ** The sum of the metric values for the data point. *
* * @param sum * The sum of the metric values for the data point. */ public void setSum(Double sum) { this.sum = sum; } /** ** The sum of the metric values for the data point. *
* * @return The sum of the metric values for the data point. */ public Double getSum() { return this.sum; } /** ** The sum of the metric values for the data point. *
* * @param sum * The sum of the metric values for the data point. * @return Returns a reference to this object so that method calls can be chained together. */ public Datapoint withSum(Double sum) { setSum(sum); return this; } /** ** The minimum metric value for the data point. *
* * @param minimum * The minimum metric value for the data point. */ public void setMinimum(Double minimum) { this.minimum = minimum; } /** ** The minimum metric value for the data point. *
* * @return The minimum metric value for the data point. */ public Double getMinimum() { return this.minimum; } /** ** The minimum metric value for the data point. *
* * @param minimum * The minimum metric value for the data point. * @return Returns a reference to this object so that method calls can be chained together. */ public Datapoint withMinimum(Double minimum) { setMinimum(minimum); return this; } /** ** The maximum metric value for the data point. *
* * @param maximum * The maximum metric value for the data point. */ public void setMaximum(Double maximum) { this.maximum = maximum; } /** ** The maximum metric value for the data point. *
* * @return The maximum metric value for the data point. */ public Double getMaximum() { return this.maximum; } /** ** The maximum metric value for the data point. *
* * @param maximum * The maximum metric value for the data point. * @return Returns a reference to this object so that method calls can be chained together. */ public Datapoint withMaximum(Double maximum) { setMaximum(maximum); return this; } /** ** The standard unit for the data point. *
* * @param unit * The standard unit for the data point. * @see StandardUnit */ public void setUnit(String unit) { this.unit = unit; } /** ** The standard unit for the data point. *
* * @return The standard unit for the data point. * @see StandardUnit */ public String getUnit() { return this.unit; } /** ** The standard unit for the data point. *
* * @param unit * The standard unit for the data point. * @return Returns a reference to this object so that method calls can be chained together. * @see StandardUnit */ public Datapoint withUnit(String unit) { setUnit(unit); return this; } /** ** The standard unit for the data point. *
* * @param unit * The standard unit for the data point. * @see StandardUnit */ public void setUnit(StandardUnit unit) { withUnit(unit); } /** ** The standard unit for the data point. *
* * @param unit * The standard unit for the data point. * @return Returns a reference to this object so that method calls can be chained together. * @see StandardUnit */ public Datapoint withUnit(StandardUnit unit) { this.unit = unit.toString(); return this; } /** ** The percentile statistic for the data point. *
* * @return The percentile statistic for the data point. */ public java.util.Map* The percentile statistic for the data point. *
* * @param extendedStatistics * The percentile statistic for the data point. */ public void setExtendedStatistics(java.util.Map* The percentile statistic for the data point. *
* * @param extendedStatistics * The percentile statistic for the data point. * @return Returns a reference to this object so that method calls can be chained together. */ public Datapoint withExtendedStatistics(java.util.Map