commonMain.aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Defines column statistics supported for fixed-point number data columns.
*/
public class DecimalColumnStatisticsData private constructor(builder: Builder) {
/**
* The highest value in the column.
*/
public val maximumValue: aws.sdk.kotlin.services.glue.model.DecimalNumber? = builder.maximumValue
/**
* The lowest value in the column.
*/
public val minimumValue: aws.sdk.kotlin.services.glue.model.DecimalNumber? = builder.minimumValue
/**
* The number of distinct values in a column.
*/
public val numberOfDistinctValues: kotlin.Long = builder.numberOfDistinctValues
/**
* The number of null values in the column.
*/
public val numberOfNulls: kotlin.Long = builder.numberOfNulls
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DecimalColumnStatisticsData(")
append("maximumValue=$maximumValue,")
append("minimumValue=$minimumValue,")
append("numberOfDistinctValues=$numberOfDistinctValues,")
append("numberOfNulls=$numberOfNulls")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maximumValue?.hashCode() ?: 0
result = 31 * result + (minimumValue?.hashCode() ?: 0)
result = 31 * result + (numberOfDistinctValues.hashCode())
result = 31 * result + (numberOfNulls.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 DecimalColumnStatisticsData
if (maximumValue != other.maximumValue) return false
if (minimumValue != other.minimumValue) return false
if (numberOfDistinctValues != other.numberOfDistinctValues) return false
if (numberOfNulls != other.numberOfNulls) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The highest value in the column.
*/
public var maximumValue: aws.sdk.kotlin.services.glue.model.DecimalNumber? = null
/**
* The lowest value in the column.
*/
public var minimumValue: aws.sdk.kotlin.services.glue.model.DecimalNumber? = null
/**
* The number of distinct values in a column.
*/
public var numberOfDistinctValues: kotlin.Long = 0L
/**
* The number of null values in the column.
*/
public var numberOfNulls: kotlin.Long = 0L
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData) : this() {
this.maximumValue = x.maximumValue
this.minimumValue = x.minimumValue
this.numberOfDistinctValues = x.numberOfDistinctValues
this.numberOfNulls = x.numberOfNulls
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.DecimalColumnStatisticsData = DecimalColumnStatisticsData(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.DecimalNumber] inside the given [block]
*/
public fun maximumValue(block: aws.sdk.kotlin.services.glue.model.DecimalNumber.Builder.() -> kotlin.Unit) {
this.maximumValue = aws.sdk.kotlin.services.glue.model.DecimalNumber.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.DecimalNumber] inside the given [block]
*/
public fun minimumValue(block: aws.sdk.kotlin.services.glue.model.DecimalNumber.Builder.() -> kotlin.Unit) {
this.minimumValue = aws.sdk.kotlin.services.glue.model.DecimalNumber.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}