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

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

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

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



/**
 * Configures the quantum processing units (QPUs) or simulator used to create and run an Amazon Braket job.
 */
public class DeviceConfig private constructor(builder: Builder) {
    /**
     * The primary quantum processing unit (QPU) or simulator used to create and run an Amazon Braket job.
     */
    public val device: kotlin.String = requireNotNull(builder.device) { "A non-null value must be provided for device" }

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

    override fun toString(): kotlin.String = buildString {
        append("DeviceConfig(")
        append("device=$device")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = device.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 DeviceConfig

        if (device != other.device) return false

        return true
    }

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

    public class Builder {
        /**
         * The primary quantum processing unit (QPU) or simulator used to create and run an Amazon Braket job.
         */
        public var device: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.braket.model.DeviceConfig) : this() {
            this.device = x.device
        }

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

        internal fun correctErrors(): Builder {
            if (device == null) device = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy