commonMain.aws.sdk.kotlin.services.glue.model.ColumnStatisticsData.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains the individual types of column statistics data. Only one data object should be set and indicated by the `Type` attribute.
*/
public class ColumnStatisticsData private constructor(builder: Builder) {
/**
* Binary column statistics data.
*/
public val binaryColumnStatisticsData: aws.sdk.kotlin.services.glue.model.BinaryColumnStatisticsData? = builder.binaryColumnStatisticsData
/**
* Boolean column statistics data.
*/
public val booleanColumnStatisticsData: aws.sdk.kotlin.services.glue.model.BooleanColumnStatisticsData? = builder.booleanColumnStatisticsData
/**
* Date column statistics data.
*/
public val dateColumnStatisticsData: aws.sdk.kotlin.services.glue.model.DateColumnStatisticsData? = builder.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.
*/
public val decimalColumnStatisticsData: aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData? = builder.decimalColumnStatisticsData
/**
* Double column statistics data.
*/
public val doubleColumnStatisticsData: aws.sdk.kotlin.services.glue.model.DoubleColumnStatisticsData? = builder.doubleColumnStatisticsData
/**
* Long column statistics data.
*/
public val longColumnStatisticsData: aws.sdk.kotlin.services.glue.model.LongColumnStatisticsData? = builder.longColumnStatisticsData
/**
* String column statistics data.
*/
public val stringColumnStatisticsData: aws.sdk.kotlin.services.glue.model.StringColumnStatisticsData? = builder.stringColumnStatisticsData
/**
* The type of column statistics data.
*/
public val type: aws.sdk.kotlin.services.glue.model.ColumnStatisticsType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.ColumnStatisticsData = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ColumnStatisticsData(")
append("binaryColumnStatisticsData=$binaryColumnStatisticsData,")
append("booleanColumnStatisticsData=$booleanColumnStatisticsData,")
append("dateColumnStatisticsData=$dateColumnStatisticsData,")
append("decimalColumnStatisticsData=$decimalColumnStatisticsData,")
append("doubleColumnStatisticsData=$doubleColumnStatisticsData,")
append("longColumnStatisticsData=$longColumnStatisticsData,")
append("stringColumnStatisticsData=$stringColumnStatisticsData,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = binaryColumnStatisticsData?.hashCode() ?: 0
result = 31 * result + (booleanColumnStatisticsData?.hashCode() ?: 0)
result = 31 * result + (dateColumnStatisticsData?.hashCode() ?: 0)
result = 31 * result + (decimalColumnStatisticsData?.hashCode() ?: 0)
result = 31 * result + (doubleColumnStatisticsData?.hashCode() ?: 0)
result = 31 * result + (longColumnStatisticsData?.hashCode() ?: 0)
result = 31 * result + (stringColumnStatisticsData?.hashCode() ?: 0)
result = 31 * result + (type.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as ColumnStatisticsData
if (binaryColumnStatisticsData != other.binaryColumnStatisticsData) return false
if (booleanColumnStatisticsData != other.booleanColumnStatisticsData) return false
if (dateColumnStatisticsData != other.dateColumnStatisticsData) return false
if (decimalColumnStatisticsData != other.decimalColumnStatisticsData) return false
if (doubleColumnStatisticsData != other.doubleColumnStatisticsData) return false
if (longColumnStatisticsData != other.longColumnStatisticsData) return false
if (stringColumnStatisticsData != other.stringColumnStatisticsData) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ColumnStatisticsData = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Binary column statistics data.
*/
public var binaryColumnStatisticsData: aws.sdk.kotlin.services.glue.model.BinaryColumnStatisticsData? = null
/**
* Boolean column statistics data.
*/
public var booleanColumnStatisticsData: aws.sdk.kotlin.services.glue.model.BooleanColumnStatisticsData? = null
/**
* Date column statistics data.
*/
public var dateColumnStatisticsData: aws.sdk.kotlin.services.glue.model.DateColumnStatisticsData? = null
/**
* 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 var decimalColumnStatisticsData: aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData? = null
/**
* Double column statistics data.
*/
public var doubleColumnStatisticsData: aws.sdk.kotlin.services.glue.model.DoubleColumnStatisticsData? = null
/**
* Long column statistics data.
*/
public var longColumnStatisticsData: aws.sdk.kotlin.services.glue.model.LongColumnStatisticsData? = null
/**
* String column statistics data.
*/
public var stringColumnStatisticsData: aws.sdk.kotlin.services.glue.model.StringColumnStatisticsData? = null
/**
* The type of column statistics data.
*/
public var type: aws.sdk.kotlin.services.glue.model.ColumnStatisticsType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.ColumnStatisticsData) : this() {
this.binaryColumnStatisticsData = x.binaryColumnStatisticsData
this.booleanColumnStatisticsData = x.booleanColumnStatisticsData
this.dateColumnStatisticsData = x.dateColumnStatisticsData
this.decimalColumnStatisticsData = x.decimalColumnStatisticsData
this.doubleColumnStatisticsData = x.doubleColumnStatisticsData
this.longColumnStatisticsData = x.longColumnStatisticsData
this.stringColumnStatisticsData = x.stringColumnStatisticsData
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.ColumnStatisticsData = ColumnStatisticsData(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.BinaryColumnStatisticsData] inside the given [block]
*/
public fun binaryColumnStatisticsData(block: aws.sdk.kotlin.services.glue.model.BinaryColumnStatisticsData.Builder.() -> kotlin.Unit) {
this.binaryColumnStatisticsData = aws.sdk.kotlin.services.glue.model.BinaryColumnStatisticsData.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.BooleanColumnStatisticsData] inside the given [block]
*/
public fun booleanColumnStatisticsData(block: aws.sdk.kotlin.services.glue.model.BooleanColumnStatisticsData.Builder.() -> kotlin.Unit) {
this.booleanColumnStatisticsData = aws.sdk.kotlin.services.glue.model.BooleanColumnStatisticsData.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.DateColumnStatisticsData] inside the given [block]
*/
public fun dateColumnStatisticsData(block: aws.sdk.kotlin.services.glue.model.DateColumnStatisticsData.Builder.() -> kotlin.Unit) {
this.dateColumnStatisticsData = aws.sdk.kotlin.services.glue.model.DateColumnStatisticsData.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData] inside the given [block]
*/
public fun decimalColumnStatisticsData(block: aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData.Builder.() -> kotlin.Unit) {
this.decimalColumnStatisticsData = aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.DoubleColumnStatisticsData] inside the given [block]
*/
public fun doubleColumnStatisticsData(block: aws.sdk.kotlin.services.glue.model.DoubleColumnStatisticsData.Builder.() -> kotlin.Unit) {
this.doubleColumnStatisticsData = aws.sdk.kotlin.services.glue.model.DoubleColumnStatisticsData.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.LongColumnStatisticsData] inside the given [block]
*/
public fun longColumnStatisticsData(block: aws.sdk.kotlin.services.glue.model.LongColumnStatisticsData.Builder.() -> kotlin.Unit) {
this.longColumnStatisticsData = aws.sdk.kotlin.services.glue.model.LongColumnStatisticsData.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.StringColumnStatisticsData] inside the given [block]
*/
public fun stringColumnStatisticsData(block: aws.sdk.kotlin.services.glue.model.StringColumnStatisticsData.Builder.() -> kotlin.Unit) {
this.stringColumnStatisticsData = aws.sdk.kotlin.services.glue.model.StringColumnStatisticsData.invoke(block)
}
internal fun correctErrors(): Builder {
if (type == null) type = ColumnStatisticsType.SdkUnknown("no value provided")
return this
}
}
}