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

commonMain.aws.sdk.kotlin.services.kafka.model.ErrorInfo.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kafka.model



/**
 * Returns information about an error state of the cluster.
 */
public class ErrorInfo private constructor(builder: Builder) {
    /**
     * A number describing the error programmatically.
     */
    public val errorCode: kotlin.String? = builder.errorCode
    /**
     * An optional field to provide more details about the error.
     */
    public val errorString: kotlin.String? = builder.errorString

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

    override fun toString(): kotlin.String = buildString {
        append("ErrorInfo(")
        append("errorCode=$errorCode,")
        append("errorString=$errorString")
        append(")")
    }

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

        if (errorCode != other.errorCode) return false
        if (errorString != other.errorString) return false

        return true
    }

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

    public class Builder {
        /**
         * A number describing the error programmatically.
         */
        public var errorCode: kotlin.String? = null
        /**
         * An optional field to provide more details about the error.
         */
        public var errorString: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafka.model.ErrorInfo) : this() {
            this.errorCode = x.errorCode
            this.errorString = x.errorString
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy