com.amazonaws.services.forecast.model.Statistics Maven / Gradle / Ivy
Show all versions of aws-java-sdk-forecast 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.forecast.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides statistics for each data field imported into to an Amazon Forecast dataset with the CreateDatasetImportJob
* operation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Statistics implements Serializable, Cloneable, StructuredPojo {
/**
*
* The number of values in the field. If the response value is -1, refer to CountLong
.
*
*/
private Integer count;
/**
*
* The number of distinct values in the field. If the response value is -1, refer to CountDistinctLong
.
*
*/
private Integer countDistinct;
/**
*
* The number of null values in the field. If the response value is -1, refer to CountNullLong
.
*
*/
private Integer countNull;
/**
*
* The number of NAN (not a number) values in the field. If the response value is -1, refer to
* CountNanLong
.
*
*/
private Integer countNan;
/**
*
* For a numeric field, the minimum value in the field.
*
*/
private String min;
/**
*
* For a numeric field, the maximum value in the field.
*
*/
private String max;
/**
*
* For a numeric field, the average value in the field.
*
*/
private Double avg;
/**
*
* For a numeric field, the standard deviation.
*
*/
private Double stddev;
/**
*
* The number of values in the field. CountLong
is used instead of Count
if the value is
* greater than 2,147,483,647.
*
*/
private Long countLong;
/**
*
* The number of distinct values in the field. CountDistinctLong
is used instead of
* CountDistinct
if the value is greater than 2,147,483,647.
*
*/
private Long countDistinctLong;
/**
*
* The number of null values in the field. CountNullLong
is used instead of CountNull
if
* the value is greater than 2,147,483,647.
*
*/
private Long countNullLong;
/**
*
* The number of NAN (not a number) values in the field. CountNanLong
is used instead of
* CountNan
if the value is greater than 2,147,483,647.
*
*/
private Long countNanLong;
/**
*
* The number of values in the field. If the response value is -1, refer to CountLong
.
*
*
* @param count
* The number of values in the field. If the response value is -1, refer to CountLong
.
*/
public void setCount(Integer count) {
this.count = count;
}
/**
*
* The number of values in the field. If the response value is -1, refer to CountLong
.
*
*
* @return The number of values in the field. If the response value is -1, refer to CountLong
.
*/
public Integer getCount() {
return this.count;
}
/**
*
* The number of values in the field. If the response value is -1, refer to CountLong
.
*
*
* @param count
* The number of values in the field. If the response value is -1, refer to CountLong
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCount(Integer count) {
setCount(count);
return this;
}
/**
*
* The number of distinct values in the field. If the response value is -1, refer to CountDistinctLong
.
*
*
* @param countDistinct
* The number of distinct values in the field. If the response value is -1, refer to
* CountDistinctLong
.
*/
public void setCountDistinct(Integer countDistinct) {
this.countDistinct = countDistinct;
}
/**
*
* The number of distinct values in the field. If the response value is -1, refer to CountDistinctLong
.
*
*
* @return The number of distinct values in the field. If the response value is -1, refer to
* CountDistinctLong
.
*/
public Integer getCountDistinct() {
return this.countDistinct;
}
/**
*
* The number of distinct values in the field. If the response value is -1, refer to CountDistinctLong
.
*
*
* @param countDistinct
* The number of distinct values in the field. If the response value is -1, refer to
* CountDistinctLong
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCountDistinct(Integer countDistinct) {
setCountDistinct(countDistinct);
return this;
}
/**
*
* The number of null values in the field. If the response value is -1, refer to CountNullLong
.
*
*
* @param countNull
* The number of null values in the field. If the response value is -1, refer to CountNullLong
.
*/
public void setCountNull(Integer countNull) {
this.countNull = countNull;
}
/**
*
* The number of null values in the field. If the response value is -1, refer to CountNullLong
.
*
*
* @return The number of null values in the field. If the response value is -1, refer to CountNullLong
.
*/
public Integer getCountNull() {
return this.countNull;
}
/**
*
* The number of null values in the field. If the response value is -1, refer to CountNullLong
.
*
*
* @param countNull
* The number of null values in the field. If the response value is -1, refer to CountNullLong
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCountNull(Integer countNull) {
setCountNull(countNull);
return this;
}
/**
*
* The number of NAN (not a number) values in the field. If the response value is -1, refer to
* CountNanLong
.
*
*
* @param countNan
* The number of NAN (not a number) values in the field. If the response value is -1, refer to
* CountNanLong
.
*/
public void setCountNan(Integer countNan) {
this.countNan = countNan;
}
/**
*
* The number of NAN (not a number) values in the field. If the response value is -1, refer to
* CountNanLong
.
*
*
* @return The number of NAN (not a number) values in the field. If the response value is -1, refer to
* CountNanLong
.
*/
public Integer getCountNan() {
return this.countNan;
}
/**
*
* The number of NAN (not a number) values in the field. If the response value is -1, refer to
* CountNanLong
.
*
*
* @param countNan
* The number of NAN (not a number) values in the field. If the response value is -1, refer to
* CountNanLong
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCountNan(Integer countNan) {
setCountNan(countNan);
return this;
}
/**
*
* For a numeric field, the minimum value in the field.
*
*
* @param min
* For a numeric field, the minimum value in the field.
*/
public void setMin(String min) {
this.min = min;
}
/**
*
* For a numeric field, the minimum value in the field.
*
*
* @return For a numeric field, the minimum value in the field.
*/
public String getMin() {
return this.min;
}
/**
*
* For a numeric field, the minimum value in the field.
*
*
* @param min
* For a numeric field, the minimum value in the field.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withMin(String min) {
setMin(min);
return this;
}
/**
*
* For a numeric field, the maximum value in the field.
*
*
* @param max
* For a numeric field, the maximum value in the field.
*/
public void setMax(String max) {
this.max = max;
}
/**
*
* For a numeric field, the maximum value in the field.
*
*
* @return For a numeric field, the maximum value in the field.
*/
public String getMax() {
return this.max;
}
/**
*
* For a numeric field, the maximum value in the field.
*
*
* @param max
* For a numeric field, the maximum value in the field.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withMax(String max) {
setMax(max);
return this;
}
/**
*
* For a numeric field, the average value in the field.
*
*
* @param avg
* For a numeric field, the average value in the field.
*/
public void setAvg(Double avg) {
this.avg = avg;
}
/**
*
* For a numeric field, the average value in the field.
*
*
* @return For a numeric field, the average value in the field.
*/
public Double getAvg() {
return this.avg;
}
/**
*
* For a numeric field, the average value in the field.
*
*
* @param avg
* For a numeric field, the average value in the field.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withAvg(Double avg) {
setAvg(avg);
return this;
}
/**
*
* For a numeric field, the standard deviation.
*
*
* @param stddev
* For a numeric field, the standard deviation.
*/
public void setStddev(Double stddev) {
this.stddev = stddev;
}
/**
*
* For a numeric field, the standard deviation.
*
*
* @return For a numeric field, the standard deviation.
*/
public Double getStddev() {
return this.stddev;
}
/**
*
* For a numeric field, the standard deviation.
*
*
* @param stddev
* For a numeric field, the standard deviation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withStddev(Double stddev) {
setStddev(stddev);
return this;
}
/**
*
* The number of values in the field. CountLong
is used instead of Count
if the value is
* greater than 2,147,483,647.
*
*
* @param countLong
* The number of values in the field. CountLong
is used instead of Count
if the
* value is greater than 2,147,483,647.
*/
public void setCountLong(Long countLong) {
this.countLong = countLong;
}
/**
*
* The number of values in the field. CountLong
is used instead of Count
if the value is
* greater than 2,147,483,647.
*
*
* @return The number of values in the field. CountLong
is used instead of Count
if the
* value is greater than 2,147,483,647.
*/
public Long getCountLong() {
return this.countLong;
}
/**
*
* The number of values in the field. CountLong
is used instead of Count
if the value is
* greater than 2,147,483,647.
*
*
* @param countLong
* The number of values in the field. CountLong
is used instead of Count
if the
* value is greater than 2,147,483,647.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCountLong(Long countLong) {
setCountLong(countLong);
return this;
}
/**
*
* The number of distinct values in the field. CountDistinctLong
is used instead of
* CountDistinct
if the value is greater than 2,147,483,647.
*
*
* @param countDistinctLong
* The number of distinct values in the field. CountDistinctLong
is used instead of
* CountDistinct
if the value is greater than 2,147,483,647.
*/
public void setCountDistinctLong(Long countDistinctLong) {
this.countDistinctLong = countDistinctLong;
}
/**
*
* The number of distinct values in the field. CountDistinctLong
is used instead of
* CountDistinct
if the value is greater than 2,147,483,647.
*
*
* @return The number of distinct values in the field. CountDistinctLong
is used instead of
* CountDistinct
if the value is greater than 2,147,483,647.
*/
public Long getCountDistinctLong() {
return this.countDistinctLong;
}
/**
*
* The number of distinct values in the field. CountDistinctLong
is used instead of
* CountDistinct
if the value is greater than 2,147,483,647.
*
*
* @param countDistinctLong
* The number of distinct values in the field. CountDistinctLong
is used instead of
* CountDistinct
if the value is greater than 2,147,483,647.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCountDistinctLong(Long countDistinctLong) {
setCountDistinctLong(countDistinctLong);
return this;
}
/**
*
* The number of null values in the field. CountNullLong
is used instead of CountNull
if
* the value is greater than 2,147,483,647.
*
*
* @param countNullLong
* The number of null values in the field. CountNullLong
is used instead of
* CountNull
if the value is greater than 2,147,483,647.
*/
public void setCountNullLong(Long countNullLong) {
this.countNullLong = countNullLong;
}
/**
*
* The number of null values in the field. CountNullLong
is used instead of CountNull
if
* the value is greater than 2,147,483,647.
*
*
* @return The number of null values in the field. CountNullLong
is used instead of
* CountNull
if the value is greater than 2,147,483,647.
*/
public Long getCountNullLong() {
return this.countNullLong;
}
/**
*
* The number of null values in the field. CountNullLong
is used instead of CountNull
if
* the value is greater than 2,147,483,647.
*
*
* @param countNullLong
* The number of null values in the field. CountNullLong
is used instead of
* CountNull
if the value is greater than 2,147,483,647.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCountNullLong(Long countNullLong) {
setCountNullLong(countNullLong);
return this;
}
/**
*
* The number of NAN (not a number) values in the field. CountNanLong
is used instead of
* CountNan
if the value is greater than 2,147,483,647.
*
*
* @param countNanLong
* The number of NAN (not a number) values in the field. CountNanLong
is used instead of
* CountNan
if the value is greater than 2,147,483,647.
*/
public void setCountNanLong(Long countNanLong) {
this.countNanLong = countNanLong;
}
/**
*
* The number of NAN (not a number) values in the field. CountNanLong
is used instead of
* CountNan
if the value is greater than 2,147,483,647.
*
*
* @return The number of NAN (not a number) values in the field. CountNanLong
is used instead of
* CountNan
if the value is greater than 2,147,483,647.
*/
public Long getCountNanLong() {
return this.countNanLong;
}
/**
*
* The number of NAN (not a number) values in the field. CountNanLong
is used instead of
* CountNan
if the value is greater than 2,147,483,647.
*
*
* @param countNanLong
* The number of NAN (not a number) values in the field. CountNanLong
is used instead of
* CountNan
if the value is greater than 2,147,483,647.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Statistics withCountNanLong(Long countNanLong) {
setCountNanLong(countNanLong);
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 (getCount() != null)
sb.append("Count: ").append(getCount()).append(",");
if (getCountDistinct() != null)
sb.append("CountDistinct: ").append(getCountDistinct()).append(",");
if (getCountNull() != null)
sb.append("CountNull: ").append(getCountNull()).append(",");
if (getCountNan() != null)
sb.append("CountNan: ").append(getCountNan()).append(",");
if (getMin() != null)
sb.append("Min: ").append(getMin()).append(",");
if (getMax() != null)
sb.append("Max: ").append(getMax()).append(",");
if (getAvg() != null)
sb.append("Avg: ").append(getAvg()).append(",");
if (getStddev() != null)
sb.append("Stddev: ").append(getStddev()).append(",");
if (getCountLong() != null)
sb.append("CountLong: ").append(getCountLong()).append(",");
if (getCountDistinctLong() != null)
sb.append("CountDistinctLong: ").append(getCountDistinctLong()).append(",");
if (getCountNullLong() != null)
sb.append("CountNullLong: ").append(getCountNullLong()).append(",");
if (getCountNanLong() != null)
sb.append("CountNanLong: ").append(getCountNanLong());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Statistics == false)
return false;
Statistics other = (Statistics) obj;
if (other.getCount() == null ^ this.getCount() == null)
return false;
if (other.getCount() != null && other.getCount().equals(this.getCount()) == false)
return false;
if (other.getCountDistinct() == null ^ this.getCountDistinct() == null)
return false;
if (other.getCountDistinct() != null && other.getCountDistinct().equals(this.getCountDistinct()) == false)
return false;
if (other.getCountNull() == null ^ this.getCountNull() == null)
return false;
if (other.getCountNull() != null && other.getCountNull().equals(this.getCountNull()) == false)
return false;
if (other.getCountNan() == null ^ this.getCountNan() == null)
return false;
if (other.getCountNan() != null && other.getCountNan().equals(this.getCountNan()) == false)
return false;
if (other.getMin() == null ^ this.getMin() == null)
return false;
if (other.getMin() != null && other.getMin().equals(this.getMin()) == false)
return false;
if (other.getMax() == null ^ this.getMax() == null)
return false;
if (other.getMax() != null && other.getMax().equals(this.getMax()) == false)
return false;
if (other.getAvg() == null ^ this.getAvg() == null)
return false;
if (other.getAvg() != null && other.getAvg().equals(this.getAvg()) == false)
return false;
if (other.getStddev() == null ^ this.getStddev() == null)
return false;
if (other.getStddev() != null && other.getStddev().equals(this.getStddev()) == false)
return false;
if (other.getCountLong() == null ^ this.getCountLong() == null)
return false;
if (other.getCountLong() != null && other.getCountLong().equals(this.getCountLong()) == false)
return false;
if (other.getCountDistinctLong() == null ^ this.getCountDistinctLong() == null)
return false;
if (other.getCountDistinctLong() != null && other.getCountDistinctLong().equals(this.getCountDistinctLong()) == false)
return false;
if (other.getCountNullLong() == null ^ this.getCountNullLong() == null)
return false;
if (other.getCountNullLong() != null && other.getCountNullLong().equals(this.getCountNullLong()) == false)
return false;
if (other.getCountNanLong() == null ^ this.getCountNanLong() == null)
return false;
if (other.getCountNanLong() != null && other.getCountNanLong().equals(this.getCountNanLong()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCount() == null) ? 0 : getCount().hashCode());
hashCode = prime * hashCode + ((getCountDistinct() == null) ? 0 : getCountDistinct().hashCode());
hashCode = prime * hashCode + ((getCountNull() == null) ? 0 : getCountNull().hashCode());
hashCode = prime * hashCode + ((getCountNan() == null) ? 0 : getCountNan().hashCode());
hashCode = prime * hashCode + ((getMin() == null) ? 0 : getMin().hashCode());
hashCode = prime * hashCode + ((getMax() == null) ? 0 : getMax().hashCode());
hashCode = prime * hashCode + ((getAvg() == null) ? 0 : getAvg().hashCode());
hashCode = prime * hashCode + ((getStddev() == null) ? 0 : getStddev().hashCode());
hashCode = prime * hashCode + ((getCountLong() == null) ? 0 : getCountLong().hashCode());
hashCode = prime * hashCode + ((getCountDistinctLong() == null) ? 0 : getCountDistinctLong().hashCode());
hashCode = prime * hashCode + ((getCountNullLong() == null) ? 0 : getCountNullLong().hashCode());
hashCode = prime * hashCode + ((getCountNanLong() == null) ? 0 : getCountNanLong().hashCode());
return hashCode;
}
@Override
public Statistics clone() {
try {
return (Statistics) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.forecast.model.transform.StatisticsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}