All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.ColumnStatisticsError.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Encapsulates a `ColumnStatistics` object that failed and the reason for failure.
 */
public class ColumnStatisticsError private constructor(builder: Builder) {
    /**
     * The `ColumnStatistics` of the column.
     */
    public val columnStatistics: aws.sdk.kotlin.services.glue.model.ColumnStatistics? = builder.columnStatistics
    /**
     * An error message with the reason for the failure of an operation.
     */
    public val error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = builder.error

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.ColumnStatisticsError = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ColumnStatisticsError(")
        append("columnStatistics=$columnStatistics,")
        append("error=$error")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = columnStatistics?.hashCode() ?: 0
        result = 31 * result + (error?.hashCode() ?: 0)
        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 ColumnStatisticsError

        if (columnStatistics != other.columnStatistics) return false
        if (error != other.error) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ColumnStatisticsError = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The `ColumnStatistics` of the column.
         */
        public var columnStatistics: aws.sdk.kotlin.services.glue.model.ColumnStatistics? = null
        /**
         * An error message with the reason for the failure of an operation.
         */
        public var error: aws.sdk.kotlin.services.glue.model.ErrorDetail? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.ColumnStatisticsError) : this() {
            this.columnStatistics = x.columnStatistics
            this.error = x.error
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.ColumnStatisticsError = ColumnStatisticsError(this)

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.ColumnStatistics] inside the given [block]
         */
        public fun columnStatistics(block: aws.sdk.kotlin.services.glue.model.ColumnStatistics.Builder.() -> kotlin.Unit) {
            this.columnStatistics = aws.sdk.kotlin.services.glue.model.ColumnStatistics.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.ErrorDetail] inside the given [block]
         */
        public fun error(block: aws.sdk.kotlin.services.glue.model.ErrorDetail.Builder.() -> kotlin.Unit) {
            this.error = aws.sdk.kotlin.services.glue.model.ErrorDetail.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy