com.amazonaws.services.cloudwatch.model.InsightRuleMetricDatapoint Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudwatch 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.cloudwatch.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* One data point from the metric time series returned in a Contributor Insights rule report.
*
*
* For more information, see GetInsightRuleReport.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class InsightRuleMetricDatapoint implements Serializable, Cloneable {
/**
*
* The timestamp of the data point.
*
*/
private java.util.Date timestamp;
/**
*
* The number of unique contributors who published data during this timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*/
private Double uniqueContributors;
/**
*
* The maximum value provided by one contributor during this timestamp. Each timestamp is evaluated separately, so
* the identity of the max contributor could be different for each timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*/
private Double maxContributorValue;
/**
*
* The number of occurrences that matched the rule during this data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*/
private Double sampleCount;
/**
*
* The average value from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*/
private Double average;
/**
*
* The sum of the values from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*/
private Double sum;
/**
*
* The minimum value from a single contributor during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*/
private Double minimum;
/**
*
* The maximum value from a single occurence from a single contributor during the time period represented by that
* data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*/
private Double maximum;
/**
*
* The timestamp of the data point.
*
*
* @param timestamp
* The timestamp of the data point.
*/
public void setTimestamp(java.util.Date timestamp) {
this.timestamp = timestamp;
}
/**
*
* The timestamp of the data point.
*
*
* @return The timestamp of the data point.
*/
public java.util.Date getTimestamp() {
return this.timestamp;
}
/**
*
* The timestamp of the data point.
*
*
* @param timestamp
* The timestamp of the data point.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withTimestamp(java.util.Date timestamp) {
setTimestamp(timestamp);
return this;
}
/**
*
* The number of unique contributors who published data during this timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param uniqueContributors
* The number of unique contributors who published data during this timestamp.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public void setUniqueContributors(Double uniqueContributors) {
this.uniqueContributors = uniqueContributors;
}
/**
*
* The number of unique contributors who published data during this timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @return The number of unique contributors who published data during this timestamp.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public Double getUniqueContributors() {
return this.uniqueContributors;
}
/**
*
* The number of unique contributors who published data during this timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param uniqueContributors
* The number of unique contributors who published data during this timestamp.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withUniqueContributors(Double uniqueContributors) {
setUniqueContributors(uniqueContributors);
return this;
}
/**
*
* The maximum value provided by one contributor during this timestamp. Each timestamp is evaluated separately, so
* the identity of the max contributor could be different for each timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param maxContributorValue
* The maximum value provided by one contributor during this timestamp. Each timestamp is evaluated
* separately, so the identity of the max contributor could be different for each timestamp.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public void setMaxContributorValue(Double maxContributorValue) {
this.maxContributorValue = maxContributorValue;
}
/**
*
* The maximum value provided by one contributor during this timestamp. Each timestamp is evaluated separately, so
* the identity of the max contributor could be different for each timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @return The maximum value provided by one contributor during this timestamp. Each timestamp is evaluated
* separately, so the identity of the max contributor could be different for each timestamp.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public Double getMaxContributorValue() {
return this.maxContributorValue;
}
/**
*
* The maximum value provided by one contributor during this timestamp. Each timestamp is evaluated separately, so
* the identity of the max contributor could be different for each timestamp.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param maxContributorValue
* The maximum value provided by one contributor during this timestamp. Each timestamp is evaluated
* separately, so the identity of the max contributor could be different for each timestamp.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withMaxContributorValue(Double maxContributorValue) {
setMaxContributorValue(maxContributorValue);
return this;
}
/**
*
* The number of occurrences that matched the rule during this data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param sampleCount
* The number of occurrences that matched the rule during this data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public void setSampleCount(Double sampleCount) {
this.sampleCount = sampleCount;
}
/**
*
* The number of occurrences that matched the rule during this data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @return The number of occurrences that matched the rule during this data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public Double getSampleCount() {
return this.sampleCount;
}
/**
*
* The number of occurrences that matched the rule during this data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param sampleCount
* The number of occurrences that matched the rule during this data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withSampleCount(Double sampleCount) {
setSampleCount(sampleCount);
return this;
}
/**
*
* The average value from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param average
* The average value from all contributors during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public void setAverage(Double average) {
this.average = average;
}
/**
*
* The average value from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @return The average value from all contributors during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public Double getAverage() {
return this.average;
}
/**
*
* The average value from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param average
* The average value from all contributors during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withAverage(Double average) {
setAverage(average);
return this;
}
/**
*
* The sum of the values from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param sum
* The sum of the values from all contributors during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public void setSum(Double sum) {
this.sum = sum;
}
/**
*
* The sum of the values from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @return The sum of the values from all contributors during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public Double getSum() {
return this.sum;
}
/**
*
* The sum of the values from all contributors during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param sum
* The sum of the values from all contributors during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withSum(Double sum) {
setSum(sum);
return this;
}
/**
*
* The minimum value from a single contributor during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param minimum
* The minimum value from a single contributor during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public void setMinimum(Double minimum) {
this.minimum = minimum;
}
/**
*
* The minimum value from a single contributor during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @return The minimum value from a single contributor during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public Double getMinimum() {
return this.minimum;
}
/**
*
* The minimum value from a single contributor during the time period represented by that data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param minimum
* The minimum value from a single contributor during the time period represented by that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withMinimum(Double minimum) {
setMinimum(minimum);
return this;
}
/**
*
* The maximum value from a single occurence from a single contributor during the time period represented by that
* data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param maximum
* The maximum value from a single occurence from a single contributor during the time period represented by
* that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public void setMaximum(Double maximum) {
this.maximum = maximum;
}
/**
*
* The maximum value from a single occurence from a single contributor during the time period represented by that
* data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @return The maximum value from a single occurence from a single contributor during the time period represented by
* that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*/
public Double getMaximum() {
return this.maximum;
}
/**
*
* The maximum value from a single occurence from a single contributor during the time period represented by that
* data point.
*
*
* This statistic is returned only if you included it in the Metrics
array in your request.
*
*
* @param maximum
* The maximum value from a single occurence from a single contributor during the time period represented by
* that data point.
*
* This statistic is returned only if you included it in the Metrics
array in your request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightRuleMetricDatapoint withMaximum(Double maximum) {
setMaximum(maximum);
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 (getTimestamp() != null)
sb.append("Timestamp: ").append(getTimestamp()).append(",");
if (getUniqueContributors() != null)
sb.append("UniqueContributors: ").append(getUniqueContributors()).append(",");
if (getMaxContributorValue() != null)
sb.append("MaxContributorValue: ").append(getMaxContributorValue()).append(",");
if (getSampleCount() != null)
sb.append("SampleCount: ").append(getSampleCount()).append(",");
if (getAverage() != null)
sb.append("Average: ").append(getAverage()).append(",");
if (getSum() != null)
sb.append("Sum: ").append(getSum()).append(",");
if (getMinimum() != null)
sb.append("Minimum: ").append(getMinimum()).append(",");
if (getMaximum() != null)
sb.append("Maximum: ").append(getMaximum());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof InsightRuleMetricDatapoint == false)
return false;
InsightRuleMetricDatapoint other = (InsightRuleMetricDatapoint) obj;
if (other.getTimestamp() == null ^ this.getTimestamp() == null)
return false;
if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false)
return false;
if (other.getUniqueContributors() == null ^ this.getUniqueContributors() == null)
return false;
if (other.getUniqueContributors() != null && other.getUniqueContributors().equals(this.getUniqueContributors()) == false)
return false;
if (other.getMaxContributorValue() == null ^ this.getMaxContributorValue() == null)
return false;
if (other.getMaxContributorValue() != null && other.getMaxContributorValue().equals(this.getMaxContributorValue()) == false)
return false;
if (other.getSampleCount() == null ^ this.getSampleCount() == null)
return false;
if (other.getSampleCount() != null && other.getSampleCount().equals(this.getSampleCount()) == false)
return false;
if (other.getAverage() == null ^ this.getAverage() == null)
return false;
if (other.getAverage() != null && other.getAverage().equals(this.getAverage()) == false)
return false;
if (other.getSum() == null ^ this.getSum() == null)
return false;
if (other.getSum() != null && other.getSum().equals(this.getSum()) == false)
return false;
if (other.getMinimum() == null ^ this.getMinimum() == null)
return false;
if (other.getMinimum() != null && other.getMinimum().equals(this.getMinimum()) == false)
return false;
if (other.getMaximum() == null ^ this.getMaximum() == null)
return false;
if (other.getMaximum() != null && other.getMaximum().equals(this.getMaximum()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode());
hashCode = prime * hashCode + ((getUniqueContributors() == null) ? 0 : getUniqueContributors().hashCode());
hashCode = prime * hashCode + ((getMaxContributorValue() == null) ? 0 : getMaxContributorValue().hashCode());
hashCode = prime * hashCode + ((getSampleCount() == null) ? 0 : getSampleCount().hashCode());
hashCode = prime * hashCode + ((getAverage() == null) ? 0 : getAverage().hashCode());
hashCode = prime * hashCode + ((getSum() == null) ? 0 : getSum().hashCode());
hashCode = prime * hashCode + ((getMinimum() == null) ? 0 : getMinimum().hashCode());
hashCode = prime * hashCode + ((getMaximum() == null) ? 0 : getMaximum().hashCode());
return hashCode;
}
@Override
public InsightRuleMetricDatapoint clone() {
try {
return (InsightRuleMetricDatapoint) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}