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

commonMain.aws.sdk.kotlin.services.braket.model.HybridJobQueueInfo.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.braket.model



/**
 * Information about the queue for a specified job.
 */
public class HybridJobQueueInfo private constructor(builder: Builder) {
    /**
     * Optional. Provides more information about the queue position. For example, if the job is complete and no longer in the queue, the message field contains that information.
     */
    public val message: kotlin.String? = builder.message
    /**
     * Current position of the job in the jobs queue.
     */
    public val position: kotlin.String = requireNotNull(builder.position) { "A non-null value must be provided for position" }
    /**
     * The name of the queue.
     */
    public val queue: aws.sdk.kotlin.services.braket.model.QueueName = requireNotNull(builder.queue) { "A non-null value must be provided for queue" }

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

    override fun toString(): kotlin.String = buildString {
        append("HybridJobQueueInfo(")
        append("message=$message,")
        append("position=$position,")
        append("queue=$queue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = message?.hashCode() ?: 0
        result = 31 * result + (position.hashCode())
        result = 31 * result + (queue.hashCode())
        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 HybridJobQueueInfo

        if (message != other.message) return false
        if (position != other.position) return false
        if (queue != other.queue) return false

        return true
    }

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

    public class Builder {
        /**
         * Optional. Provides more information about the queue position. For example, if the job is complete and no longer in the queue, the message field contains that information.
         */
        public var message: kotlin.String? = null
        /**
         * Current position of the job in the jobs queue.
         */
        public var position: kotlin.String? = null
        /**
         * The name of the queue.
         */
        public var queue: aws.sdk.kotlin.services.braket.model.QueueName? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.braket.model.HybridJobQueueInfo) : this() {
            this.message = x.message
            this.position = x.position
            this.queue = x.queue
        }

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

        internal fun correctErrors(): Builder {
            if (position == null) position = ""
            if (queue == null) queue = QueueName.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy