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

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

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

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



public class GetDeviceResponse private constructor(builder: Builder) {
    /**
     * The ARN of the device.
     */
    public val deviceArn: kotlin.String = requireNotNull(builder.deviceArn) { "A non-null value must be provided for deviceArn" }
    /**
     * Details about the capabilities of the device.
     */
    public val deviceCapabilities: kotlin.String = requireNotNull(builder.deviceCapabilities) { "A non-null value must be provided for deviceCapabilities" }
    /**
     * The name of the device.
     */
    public val deviceName: kotlin.String = requireNotNull(builder.deviceName) { "A non-null value must be provided for deviceName" }
    /**
     * List of information about tasks and jobs queued on a device.
     */
    public val deviceQueueInfo: List? = builder.deviceQueueInfo
    /**
     * The status of the device.
     */
    public val deviceStatus: aws.sdk.kotlin.services.braket.model.DeviceStatus = requireNotNull(builder.deviceStatus) { "A non-null value must be provided for deviceStatus" }
    /**
     * The type of the device.
     */
    public val deviceType: aws.sdk.kotlin.services.braket.model.DeviceType = requireNotNull(builder.deviceType) { "A non-null value must be provided for deviceType" }
    /**
     * The name of the partner company for the device.
     */
    public val providerName: kotlin.String = requireNotNull(builder.providerName) { "A non-null value must be provided for providerName" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetDeviceResponse(")
        append("deviceArn=$deviceArn,")
        append("deviceCapabilities=$deviceCapabilities,")
        append("deviceName=$deviceName,")
        append("deviceQueueInfo=$deviceQueueInfo,")
        append("deviceStatus=$deviceStatus,")
        append("deviceType=$deviceType,")
        append("providerName=$providerName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deviceArn.hashCode()
        result = 31 * result + (deviceCapabilities.hashCode())
        result = 31 * result + (deviceName.hashCode())
        result = 31 * result + (deviceQueueInfo?.hashCode() ?: 0)
        result = 31 * result + (deviceStatus.hashCode())
        result = 31 * result + (deviceType.hashCode())
        result = 31 * result + (providerName.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 GetDeviceResponse

        if (deviceArn != other.deviceArn) return false
        if (deviceCapabilities != other.deviceCapabilities) return false
        if (deviceName != other.deviceName) return false
        if (deviceQueueInfo != other.deviceQueueInfo) return false
        if (deviceStatus != other.deviceStatus) return false
        if (deviceType != other.deviceType) return false
        if (providerName != other.providerName) return false

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the device.
         */
        public var deviceArn: kotlin.String? = null
        /**
         * Details about the capabilities of the device.
         */
        public var deviceCapabilities: kotlin.String? = null
        /**
         * The name of the device.
         */
        public var deviceName: kotlin.String? = null
        /**
         * List of information about tasks and jobs queued on a device.
         */
        public var deviceQueueInfo: List? = null
        /**
         * The status of the device.
         */
        public var deviceStatus: aws.sdk.kotlin.services.braket.model.DeviceStatus? = null
        /**
         * The type of the device.
         */
        public var deviceType: aws.sdk.kotlin.services.braket.model.DeviceType? = null
        /**
         * The name of the partner company for the device.
         */
        public var providerName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.braket.model.GetDeviceResponse) : this() {
            this.deviceArn = x.deviceArn
            this.deviceCapabilities = x.deviceCapabilities
            this.deviceName = x.deviceName
            this.deviceQueueInfo = x.deviceQueueInfo
            this.deviceStatus = x.deviceStatus
            this.deviceType = x.deviceType
            this.providerName = x.providerName
        }

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

        internal fun correctErrors(): Builder {
            if (deviceArn == null) deviceArn = ""
            if (deviceCapabilities == null) deviceCapabilities = ""
            if (deviceName == null) deviceName = ""
            if (deviceStatus == null) deviceStatus = DeviceStatus.SdkUnknown("no value provided")
            if (deviceType == null) deviceType = DeviceType.SdkUnknown("no value provided")
            if (providerName == null) providerName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy