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

commonMain.aws.sdk.kotlin.services.outposts.model.AssetInfo.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.outposts.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about hardware assets.
 */
public class AssetInfo private constructor(builder: Builder) {
    /**
     * The ID of the asset.
     */
    public val assetId: kotlin.String? = builder.assetId
    /**
     * The position of an asset in a rack.
     */
    public val assetLocation: aws.sdk.kotlin.services.outposts.model.AssetLocation? = builder.assetLocation
    /**
     * The type of the asset.
     */
    public val assetType: aws.sdk.kotlin.services.outposts.model.AssetType? = builder.assetType
    /**
     * Information about compute hardware assets.
     */
    public val computeAttributes: aws.sdk.kotlin.services.outposts.model.ComputeAttributes? = builder.computeAttributes
    /**
     * The rack ID of the asset.
     */
    public val rackId: kotlin.String? = builder.rackId

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

    override fun toString(): kotlin.String = buildString {
        append("AssetInfo(")
        append("assetId=$assetId,")
        append("assetLocation=$assetLocation,")
        append("assetType=$assetType,")
        append("computeAttributes=$computeAttributes,")
        append("rackId=$rackId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetId?.hashCode() ?: 0
        result = 31 * result + (assetLocation?.hashCode() ?: 0)
        result = 31 * result + (assetType?.hashCode() ?: 0)
        result = 31 * result + (computeAttributes?.hashCode() ?: 0)
        result = 31 * result + (rackId?.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 AssetInfo

        if (assetId != other.assetId) return false
        if (assetLocation != other.assetLocation) return false
        if (assetType != other.assetType) return false
        if (computeAttributes != other.computeAttributes) return false
        if (rackId != other.rackId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the asset.
         */
        public var assetId: kotlin.String? = null
        /**
         * The position of an asset in a rack.
         */
        public var assetLocation: aws.sdk.kotlin.services.outposts.model.AssetLocation? = null
        /**
         * The type of the asset.
         */
        public var assetType: aws.sdk.kotlin.services.outposts.model.AssetType? = null
        /**
         * Information about compute hardware assets.
         */
        public var computeAttributes: aws.sdk.kotlin.services.outposts.model.ComputeAttributes? = null
        /**
         * The rack ID of the asset.
         */
        public var rackId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.outposts.model.AssetInfo) : this() {
            this.assetId = x.assetId
            this.assetLocation = x.assetLocation
            this.assetType = x.assetType
            this.computeAttributes = x.computeAttributes
            this.rackId = x.rackId
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy