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

commonMain.aws.sdk.kotlin.services.iottwinmaker.model.Status.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iottwinmaker.model



/**
 * An object that represents the status of an entity, component, component type, or workspace.
 */
public class Status private constructor(builder: Builder) {
    /**
     * The error message.
     */
    public val error: aws.sdk.kotlin.services.iottwinmaker.model.ErrorDetails? = builder.error
    /**
     * The current state of the entity, component, component type, or workspace.
     */
    public val state: aws.sdk.kotlin.services.iottwinmaker.model.State? = builder.state

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * The error message.
         */
        public var error: aws.sdk.kotlin.services.iottwinmaker.model.ErrorDetails? = null
        /**
         * The current state of the entity, component, component type, or workspace.
         */
        public var state: aws.sdk.kotlin.services.iottwinmaker.model.State? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.Status) : this() {
            this.error = x.error
            this.state = x.state
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy