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

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

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

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



/**
 * The metadata transfer job status.
 */
public class MetadataTransferJobStatus private constructor(builder: Builder) {
    /**
     * The metadata transfer job error.
     */
    public val error: aws.sdk.kotlin.services.iottwinmaker.model.ErrorDetails? = builder.error
    /**
     * The queued position.
     */
    public val queuedPosition: kotlin.Int? = builder.queuedPosition
    /**
     * The metadata transfer job state.
     */
    public val state: aws.sdk.kotlin.services.iottwinmaker.model.MetadataTransferJobState? = builder.state

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * The metadata transfer job error.
         */
        public var error: aws.sdk.kotlin.services.iottwinmaker.model.ErrorDetails? = null
        /**
         * The queued position.
         */
        public var queuedPosition: kotlin.Int? = null
        /**
         * The metadata transfer job state.
         */
        public var state: aws.sdk.kotlin.services.iottwinmaker.model.MetadataTransferJobState? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.MetadataTransferJobStatus = MetadataTransferJobStatus(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