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

commonMain.aws.sdk.kotlin.services.mgn.model.ErrorDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.mgn.model



/**
 * Error details.
 */
class ErrorDetails private constructor(builder: Builder) {
    /**
     * Error details code.
     */
    val code: kotlin.String? = builder.code
    /**
     * Error details message.
     */
    val message: kotlin.String? = builder.message
    /**
     * Error details resourceId.
     */
    val resourceId: kotlin.String? = builder.resourceId
    /**
     * Error details resourceType.
     */
    val resourceType: kotlin.String? = builder.resourceType

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

    override fun toString(): kotlin.String = buildString {
        append("ErrorDetails(")
        append("code=$code,")
        append("message=$message,")
        append("resourceId=$resourceId,")
        append("resourceType=$resourceType)")
    }

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

        if (code != other.code) return false
        if (message != other.message) return false
        if (resourceId != other.resourceId) return false
        if (resourceType != other.resourceType) return false

        return true
    }

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

    class Builder {
        /**
         * Error details code.
         */
        var code: kotlin.String? = null
        /**
         * Error details message.
         */
        var message: kotlin.String? = null
        /**
         * Error details resourceId.
         */
        var resourceId: kotlin.String? = null
        /**
         * Error details resourceType.
         */
        var resourceType: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mgn.model.ErrorDetails) : this() {
            this.code = x.code
            this.message = x.message
            this.resourceId = x.resourceId
            this.resourceType = x.resourceType
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.mgn.model.ErrorDetails = ErrorDetails(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy