/* * 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; /** *

* Contains the individual types of column statistics data. Only one data object should be set and indicated by the * Type attribute. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ColumnStatisticsData implements Serializable, Cloneable, StructuredPojo { /** *

* The type of column statistics data. *

*/ private String type; /** *

* Boolean column statistics data. *

*/ private BooleanColumnStatisticsData booleanColumnStatisticsData; /** *

* Date column statistics data. *

*/ private DateColumnStatisticsData dateColumnStatisticsData; /** *

* Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing big-endian, two's * complement representations of the decimal's unscaled value. *

*/ private DecimalColumnStatisticsData decimalColumnStatisticsData; /** *

* Double column statistics data. *

*/ private DoubleColumnStatisticsData doubleColumnStatisticsData; /** *

* Long column statistics data. *

*/ private LongColumnStatisticsData longColumnStatisticsData; /** *

* String column statistics data. *

*/ private StringColumnStatisticsData stringColumnStatisticsData; /** *

* Binary column statistics data. *

*/ private BinaryColumnStatisticsData binaryColumnStatisticsData; /** *

* The type of column statistics data. *

* * @param type * The type of column statistics data. * @see ColumnStatisticsType */ public void setType(String type) { this.type = type; } /** *

* The type of column statistics data. *

* * @return The type of column statistics data. * @see ColumnStatisticsType */ public String getType() { return this.type; } /** *

* The type of column statistics data. *

* * @param type * The type of column statistics data. * @return Returns a reference to this object so that method calls can be chained together. * @see ColumnStatisticsType */ public ColumnStatisticsData withType(String type) { setType(type); return this; } /** *

* The type of column statistics data. *

* * @param type * The type of column statistics data. * @return Returns a reference to this object so that method calls can be chained together. * @see ColumnStatisticsType */ public ColumnStatisticsData withType(ColumnStatisticsType type) { this.type = type.toString(); return this; } /** *

* Boolean column statistics data. *

* * @param booleanColumnStatisticsData * Boolean column statistics data. */ public void setBooleanColumnStatisticsData(BooleanColumnStatisticsData booleanColumnStatisticsData) { this.booleanColumnStatisticsData = booleanColumnStatisticsData; } /** *

* Boolean column statistics data. *

* * @return Boolean column statistics data. */ public BooleanColumnStatisticsData getBooleanColumnStatisticsData() { return this.booleanColumnStatisticsData; } /** *

* Boolean column statistics data. *

* * @param booleanColumnStatisticsData * Boolean column statistics data. * @return Returns a reference to this object so that method calls can be chained together. */ public ColumnStatisticsData withBooleanColumnStatisticsData(BooleanColumnStatisticsData booleanColumnStatisticsData) { setBooleanColumnStatisticsData(booleanColumnStatisticsData); return this; } /** *

* Date column statistics data. *

* * @param dateColumnStatisticsData * Date column statistics data. */ public void setDateColumnStatisticsData(DateColumnStatisticsData dateColumnStatisticsData) { this.dateColumnStatisticsData = dateColumnStatisticsData; } /** *

* Date column statistics data. *

* * @return Date column statistics data. */ public DateColumnStatisticsData getDateColumnStatisticsData() { return this.dateColumnStatisticsData; } /** *

* Date column statistics data. *

* * @param dateColumnStatisticsData * Date column statistics data. * @return Returns a reference to this object so that method calls can be chained together. */ public ColumnStatisticsData withDateColumnStatisticsData(DateColumnStatisticsData dateColumnStatisticsData) { setDateColumnStatisticsData(dateColumnStatisticsData); return this; } /** *

* Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing big-endian, two's * complement representations of the decimal's unscaled value. *

* * @param decimalColumnStatisticsData * Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing * big-endian, two's complement representations of the decimal's unscaled value. */ public void setDecimalColumnStatisticsData(DecimalColumnStatisticsData decimalColumnStatisticsData) { this.decimalColumnStatisticsData = decimalColumnStatisticsData; } /** *

* Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing big-endian, two's * complement representations of the decimal's unscaled value. *

* * @return Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing * big-endian, two's complement representations of the decimal's unscaled value. */ public DecimalColumnStatisticsData getDecimalColumnStatisticsData() { return this.decimalColumnStatisticsData; } /** *

* Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing big-endian, two's * complement representations of the decimal's unscaled value. *

* * @param decimalColumnStatisticsData * Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing * big-endian, two's complement representations of the decimal's unscaled value. * @return Returns a reference to this object so that method calls can be chained together. */ public ColumnStatisticsData withDecimalColumnStatisticsData(DecimalColumnStatisticsData decimalColumnStatisticsData) { setDecimalColumnStatisticsData(decimalColumnStatisticsData); return this; } /** *

* Double column statistics data. *

* * @param doubleColumnStatisticsData * Double column statistics data. */ public void setDoubleColumnStatisticsData(DoubleColumnStatisticsData doubleColumnStatisticsData) { this.doubleColumnStatisticsData = doubleColumnStatisticsData; } /** *

* Double column statistics data. *

* * @return Double column statistics data. */ public DoubleColumnStatisticsData getDoubleColumnStatisticsData() { return this.doubleColumnStatisticsData; } /** *

* Double column statistics data. *

* * @param doubleColumnStatisticsData * Double column statistics data. * @return Returns a reference to this object so that method calls can be chained together. */ public ColumnStatisticsData withDoubleColumnStatisticsData(DoubleColumnStatisticsData doubleColumnStatisticsData) { setDoubleColumnStatisticsData(doubleColumnStatisticsData); return this; } /** *

* Long column statistics data. *

* * @param longColumnStatisticsData * Long column statistics data. */ public void setLongColumnStatisticsData(LongColumnStatisticsData longColumnStatisticsData) { this.longColumnStatisticsData = longColumnStatisticsData; } /** *

* Long column statistics data. *

* * @return Long column statistics data. */ public LongColumnStatisticsData getLongColumnStatisticsData() { return this.longColumnStatisticsData; } /** *

* Long column statistics data. *

* * @param longColumnStatisticsData * Long column statistics data. * @return Returns a reference to this object so that method calls can be chained together. */ public ColumnStatisticsData withLongColumnStatisticsData(LongColumnStatisticsData longColumnStatisticsData) { setLongColumnStatisticsData(longColumnStatisticsData); return this; } /** *

* String column statistics data. *

* * @param stringColumnStatisticsData * String column statistics data. */ public void setStringColumnStatisticsData(StringColumnStatisticsData stringColumnStatisticsData) { this.stringColumnStatisticsData = stringColumnStatisticsData; } /** *

* String column statistics data. *

* * @return String column statistics data. */ public StringColumnStatisticsData getStringColumnStatisticsData() { return this.stringColumnStatisticsData; } /** *

* String column statistics data. *

* * @param stringColumnStatisticsData * String column statistics data. * @return Returns a reference to this object so that method calls can be chained together. */ public ColumnStatisticsData withStringColumnStatisticsData(StringColumnStatisticsData stringColumnStatisticsData) { setStringColumnStatisticsData(stringColumnStatisticsData); return this; } /** *

* Binary column statistics data. *

* * @param binaryColumnStatisticsData * Binary column statistics data. */ public void setBinaryColumnStatisticsData(BinaryColumnStatisticsData binaryColumnStatisticsData) { this.binaryColumnStatisticsData = binaryColumnStatisticsData; } /** *

* Binary column statistics data. *

* * @return Binary column statistics data. */ public BinaryColumnStatisticsData getBinaryColumnStatisticsData() { return this.binaryColumnStatisticsData; } /** *

* Binary column statistics data. *

* * @param binaryColumnStatisticsData * Binary column statistics data. * @return Returns a reference to this object so that method calls can be chained together. */ public ColumnStatisticsData withBinaryColumnStatisticsData(BinaryColumnStatisticsData binaryColumnStatisticsData) { setBinaryColumnStatisticsData(binaryColumnStatisticsData); 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getBooleanColumnStatisticsData() != null) sb.append("BooleanColumnStatisticsData: ").append(getBooleanColumnStatisticsData()).append(","); if (getDateColumnStatisticsData() != null) sb.append("DateColumnStatisticsData: ").append(getDateColumnStatisticsData()).append(","); if (getDecimalColumnStatisticsData() != null) sb.append("DecimalColumnStatisticsData: ").append(getDecimalColumnStatisticsData()).append(","); if (getDoubleColumnStatisticsData() != null) sb.append("DoubleColumnStatisticsData: ").append(getDoubleColumnStatisticsData()).append(","); if (getLongColumnStatisticsData() != null) sb.append("LongColumnStatisticsData: ").append(getLongColumnStatisticsData()).append(","); if (getStringColumnStatisticsData() != null) sb.append("StringColumnStatisticsData: ").append(getStringColumnStatisticsData()).append(","); if (getBinaryColumnStatisticsData() != null) sb.append("BinaryColumnStatisticsData: ").append(getBinaryColumnStatisticsData()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ColumnStatisticsData == false) return false; ColumnStatisticsData other = (ColumnStatisticsData) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getBooleanColumnStatisticsData() == null ^ this.getBooleanColumnStatisticsData() == null) return false; if (other.getBooleanColumnStatisticsData() != null && other.getBooleanColumnStatisticsData().equals(this.getBooleanColumnStatisticsData()) == false) return false; if (other.getDateColumnStatisticsData() == null ^ this.getDateColumnStatisticsData() == null) return false; if (other.getDateColumnStatisticsData() != null && other.getDateColumnStatisticsData().equals(this.getDateColumnStatisticsData()) == false) return false; if (other.getDecimalColumnStatisticsData() == null ^ this.getDecimalColumnStatisticsData() == null) return false; if (other.getDecimalColumnStatisticsData() != null && other.getDecimalColumnStatisticsData().equals(this.getDecimalColumnStatisticsData()) == false) return false; if (other.getDoubleColumnStatisticsData() == null ^ this.getDoubleColumnStatisticsData() == null) return false; if (other.getDoubleColumnStatisticsData() != null && other.getDoubleColumnStatisticsData().equals(this.getDoubleColumnStatisticsData()) == false) return false; if (other.getLongColumnStatisticsData() == null ^ this.getLongColumnStatisticsData() == null) return false; if (other.getLongColumnStatisticsData() != null && other.getLongColumnStatisticsData().equals(this.getLongColumnStatisticsData()) == false) return false; if (other.getStringColumnStatisticsData() == null ^ this.getStringColumnStatisticsData() == null) return false; if (other.getStringColumnStatisticsData() != null && other.getStringColumnStatisticsData().equals(this.getStringColumnStatisticsData()) == false) return false; if (other.getBinaryColumnStatisticsData() == null ^ this.getBinaryColumnStatisticsData() == null) return false; if (other.getBinaryColumnStatisticsData() != null && other.getBinaryColumnStatisticsData().equals(this.getBinaryColumnStatisticsData()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getBooleanColumnStatisticsData() == null) ? 0 : getBooleanColumnStatisticsData().hashCode()); hashCode = prime * hashCode + ((getDateColumnStatisticsData() == null) ? 0 : getDateColumnStatisticsData().hashCode()); hashCode = prime * hashCode + ((getDecimalColumnStatisticsData() == null) ? 0 : getDecimalColumnStatisticsData().hashCode()); hashCode = prime * hashCode + ((getDoubleColumnStatisticsData() == null) ? 0 : getDoubleColumnStatisticsData().hashCode()); hashCode = prime * hashCode + ((getLongColumnStatisticsData() == null) ? 0 : getLongColumnStatisticsData().hashCode()); hashCode = prime * hashCode + ((getStringColumnStatisticsData() == null) ? 0 : getStringColumnStatisticsData().hashCode()); hashCode = prime * hashCode + ((getBinaryColumnStatisticsData() == null) ? 0 : getBinaryColumnStatisticsData().hashCode()); return hashCode; } @Override public ColumnStatisticsData clone() { try { return (ColumnStatisticsData) 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.ColumnStatisticsDataMarshaller.getInstance().marshall(this, protocolMarshaller); } }