/* * 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.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Defines column statistics supported for fixed-point number data columns. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DecimalColumnStatisticsData implements Serializable, Cloneable, StructuredPojo { /** ** The lowest value in the column. *
*/ private DecimalNumber minimumValue; /** ** The highest value in the column. *
*/ private DecimalNumber maximumValue; /** ** The number of null values in the column. *
*/ private Long numberOfNulls; /** ** The number of distinct values in a column. *
*/ private Long numberOfDistinctValues; /** ** The lowest value in the column. *
* * @param minimumValue * The lowest value in the column. */ public void setMinimumValue(DecimalNumber minimumValue) { this.minimumValue = minimumValue; } /** ** The lowest value in the column. *
* * @return The lowest value in the column. */ public DecimalNumber getMinimumValue() { return this.minimumValue; } /** ** The lowest value in the column. *
* * @param minimumValue * The lowest value in the column. * @return Returns a reference to this object so that method calls can be chained together. */ public DecimalColumnStatisticsData withMinimumValue(DecimalNumber minimumValue) { setMinimumValue(minimumValue); return this; } /** ** The highest value in the column. *
* * @param maximumValue * The highest value in the column. */ public void setMaximumValue(DecimalNumber maximumValue) { this.maximumValue = maximumValue; } /** ** The highest value in the column. *
* * @return The highest value in the column. */ public DecimalNumber getMaximumValue() { return this.maximumValue; } /** ** The highest value in the column. *
* * @param maximumValue * The highest value in the column. * @return Returns a reference to this object so that method calls can be chained together. */ public DecimalColumnStatisticsData withMaximumValue(DecimalNumber maximumValue) { setMaximumValue(maximumValue); return this; } /** ** The number of null values in the column. *
* * @param numberOfNulls * The number of null values in the column. */ public void setNumberOfNulls(Long numberOfNulls) { this.numberOfNulls = numberOfNulls; } /** ** The number of null values in the column. *
* * @return The number of null values in the column. */ public Long getNumberOfNulls() { return this.numberOfNulls; } /** ** The number of null values in the column. *
* * @param numberOfNulls * The number of null values in the column. * @return Returns a reference to this object so that method calls can be chained together. */ public DecimalColumnStatisticsData withNumberOfNulls(Long numberOfNulls) { setNumberOfNulls(numberOfNulls); return this; } /** ** The number of distinct values in a column. *
* * @param numberOfDistinctValues * The number of distinct values in a column. */ public void setNumberOfDistinctValues(Long numberOfDistinctValues) { this.numberOfDistinctValues = numberOfDistinctValues; } /** ** The number of distinct values in a column. *
* * @return The number of distinct values in a column. */ public Long getNumberOfDistinctValues() { return this.numberOfDistinctValues; } /** ** The number of distinct values in a column. *
* * @param numberOfDistinctValues * The number of distinct values in a column. * @return Returns a reference to this object so that method calls can be chained together. */ public DecimalColumnStatisticsData withNumberOfDistinctValues(Long numberOfDistinctValues) { setNumberOfDistinctValues(numberOfDistinctValues); 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 (getMinimumValue() != null) sb.append("MinimumValue: ").append(getMinimumValue()).append(","); if (getMaximumValue() != null) sb.append("MaximumValue: ").append(getMaximumValue()).append(","); if (getNumberOfNulls() != null) sb.append("NumberOfNulls: ").append(getNumberOfNulls()).append(","); if (getNumberOfDistinctValues() != null) sb.append("NumberOfDistinctValues: ").append(getNumberOfDistinctValues()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DecimalColumnStatisticsData == false) return false; DecimalColumnStatisticsData other = (DecimalColumnStatisticsData) obj; if (other.getMinimumValue() == null ^ this.getMinimumValue() == null) return false; if (other.getMinimumValue() != null && other.getMinimumValue().equals(this.getMinimumValue()) == false) return false; if (other.getMaximumValue() == null ^ this.getMaximumValue() == null) return false; if (other.getMaximumValue() != null && other.getMaximumValue().equals(this.getMaximumValue()) == false) return false; if (other.getNumberOfNulls() == null ^ this.getNumberOfNulls() == null) return false; if (other.getNumberOfNulls() != null && other.getNumberOfNulls().equals(this.getNumberOfNulls()) == false) return false; if (other.getNumberOfDistinctValues() == null ^ this.getNumberOfDistinctValues() == null) return false; if (other.getNumberOfDistinctValues() != null && other.getNumberOfDistinctValues().equals(this.getNumberOfDistinctValues()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMinimumValue() == null) ? 0 : getMinimumValue().hashCode()); hashCode = prime * hashCode + ((getMaximumValue() == null) ? 0 : getMaximumValue().hashCode()); hashCode = prime * hashCode + ((getNumberOfNulls() == null) ? 0 : getNumberOfNulls().hashCode()); hashCode = prime * hashCode + ((getNumberOfDistinctValues() == null) ? 0 : getNumberOfDistinctValues().hashCode()); return hashCode; } @Override public DecimalColumnStatisticsData clone() { try { return (DecimalColumnStatisticsData) 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.glue.model.transform.DecimalColumnStatisticsDataMarshaller.getInstance().marshall(this, protocolMarshaller); } }