commonMain.aws.sdk.kotlin.services.glue.model.DateColumnStatisticsData.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Defines column statistics supported for timestamp data columns.
*/
public class DateColumnStatisticsData private constructor(builder: Builder) {
/**
* The highest value in the column.
*/
public val maximumValue: aws.smithy.kotlin.runtime.time.Instant? = builder.maximumValue
/**
* The lowest value in the column.
*/
public val minimumValue: aws.smithy.kotlin.runtime.time.Instant? = 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.DateColumnStatisticsData = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DateColumnStatisticsData(")
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 DateColumnStatisticsData
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.DateColumnStatisticsData = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The highest value in the column.
*/
public var maximumValue: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The lowest value in the column.
*/
public var minimumValue: aws.smithy.kotlin.runtime.time.Instant? = 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.DateColumnStatisticsData) : 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.DateColumnStatisticsData = DateColumnStatisticsData(this)
internal fun correctErrors(): Builder {
return this
}
}
}