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

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

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

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



/**
 * A list of errors that can occur when registering partition indexes for an existing table.
 *
 * These errors give the details about why an index registration failed and provide a limited number of partitions in the response, so that you can fix the partitions at fault and try registering the index again. The most common set of errors that can occur are categorized as follows:
 * + EncryptedPartitionError: The partitions are encrypted.
 * + InvalidPartitionTypeDataError: The partition value doesn't match the data type for that partition column.
 * + MissingPartitionValueError: The partitions are encrypted.
 * + UnsupportedPartitionCharacterError: Characters inside the partition value are not supported. For example: U+0000 , U+0001, U+0002.
 * + InternalError: Any error which does not belong to other error codes.
 */
public class BackfillError private constructor(builder: Builder) {
    /**
     * The error code for an error that occurred when registering partition indexes for an existing table.
     */
    public val code: aws.sdk.kotlin.services.glue.model.BackfillErrorCode? = builder.code
    /**
     * A list of a limited number of partitions in the response.
     */
    public val partitions: List? = builder.partitions

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

    override fun toString(): kotlin.String = buildString {
        append("BackfillError(")
        append("code=$code,")
        append("partitions=$partitions")
        append(")")
    }

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

        if (code != other.code) return false
        if (partitions != other.partitions) return false

        return true
    }

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

    public class Builder {
        /**
         * The error code for an error that occurred when registering partition indexes for an existing table.
         */
        public var code: aws.sdk.kotlin.services.glue.model.BackfillErrorCode? = null
        /**
         * A list of a limited number of partitions in the response.
         */
        public var partitions: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.BackfillError) : this() {
            this.code = x.code
            this.partitions = x.partitions
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy