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

commonMain.aws.sdk.kotlin.services.elasticinference.model.ElasticInferenceAccelerator.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elasticinference.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The details of an Elastic Inference Accelerator.
 */
public class ElasticInferenceAccelerator private constructor(builder: Builder) {
    /**
     * The health of the Elastic Inference Accelerator.
     */
    public val acceleratorHealth: aws.sdk.kotlin.services.elasticinference.model.ElasticInferenceAcceleratorHealth? = builder.acceleratorHealth
    /**
     * The ID of the Elastic Inference Accelerator.
     */
    public val acceleratorId: kotlin.String? = builder.acceleratorId
    /**
     * The type of the Elastic Inference Accelerator.
     */
    public val acceleratorType: kotlin.String? = builder.acceleratorType
    /**
     * The ARN of the resource that the Elastic Inference Accelerator is attached to.
     */
    public val attachedResource: kotlin.String? = builder.attachedResource
    /**
     * The availability zone where the Elastic Inference Accelerator is present.
     */
    public val availabilityZone: kotlin.String? = builder.availabilityZone

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

    override fun toString(): kotlin.String = buildString {
        append("ElasticInferenceAccelerator(")
        append("acceleratorHealth=$acceleratorHealth,")
        append("acceleratorId=$acceleratorId,")
        append("acceleratorType=$acceleratorType,")
        append("attachedResource=$attachedResource,")
        append("availabilityZone=$availabilityZone")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = acceleratorHealth?.hashCode() ?: 0
        result = 31 * result + (acceleratorId?.hashCode() ?: 0)
        result = 31 * result + (acceleratorType?.hashCode() ?: 0)
        result = 31 * result + (attachedResource?.hashCode() ?: 0)
        result = 31 * result + (availabilityZone?.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 ElasticInferenceAccelerator

        if (acceleratorHealth != other.acceleratorHealth) return false
        if (acceleratorId != other.acceleratorId) return false
        if (acceleratorType != other.acceleratorType) return false
        if (attachedResource != other.attachedResource) return false
        if (availabilityZone != other.availabilityZone) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The health of the Elastic Inference Accelerator.
         */
        public var acceleratorHealth: aws.sdk.kotlin.services.elasticinference.model.ElasticInferenceAcceleratorHealth? = null
        /**
         * The ID of the Elastic Inference Accelerator.
         */
        public var acceleratorId: kotlin.String? = null
        /**
         * The type of the Elastic Inference Accelerator.
         */
        public var acceleratorType: kotlin.String? = null
        /**
         * The ARN of the resource that the Elastic Inference Accelerator is attached to.
         */
        public var attachedResource: kotlin.String? = null
        /**
         * The availability zone where the Elastic Inference Accelerator is present.
         */
        public var availabilityZone: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticinference.model.ElasticInferenceAccelerator) : this() {
            this.acceleratorHealth = x.acceleratorHealth
            this.acceleratorId = x.acceleratorId
            this.acceleratorType = x.acceleratorType
            this.attachedResource = x.attachedResource
            this.availabilityZone = x.availabilityZone
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy