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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.UpdateAssetModelCompositeModelResponse.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.iotsitewise.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateAssetModelCompositeModelResponse private constructor(builder: Builder) {
    /**
     * The path to the composite model listing the parent composite models.
     */
    public val assetModelCompositeModelPath: List = requireNotNull(builder.assetModelCompositeModelPath) { "A non-null value must be provided for assetModelCompositeModelPath" }
    /**
     * Contains current status information for an asset model. For more information, see [Asset and model states](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-and-model-states.html) in the *IoT SiteWise User Guide*.
     */
    public val assetModelStatus: aws.sdk.kotlin.services.iotsitewise.model.AssetModelStatus? = builder.assetModelStatus

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateAssetModelCompositeModelResponse(")
        append("assetModelCompositeModelPath=$assetModelCompositeModelPath,")
        append("assetModelStatus=$assetModelStatus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetModelCompositeModelPath.hashCode()
        result = 31 * result + (assetModelStatus?.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 UpdateAssetModelCompositeModelResponse

        if (assetModelCompositeModelPath != other.assetModelCompositeModelPath) return false
        if (assetModelStatus != other.assetModelStatus) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The path to the composite model listing the parent composite models.
         */
        public var assetModelCompositeModelPath: List? = null
        /**
         * Contains current status information for an asset model. For more information, see [Asset and model states](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-and-model-states.html) in the *IoT SiteWise User Guide*.
         */
        public var assetModelStatus: aws.sdk.kotlin.services.iotsitewise.model.AssetModelStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.UpdateAssetModelCompositeModelResponse) : this() {
            this.assetModelCompositeModelPath = x.assetModelCompositeModelPath
            this.assetModelStatus = x.assetModelStatus
        }

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

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

        internal fun correctErrors(): Builder {
            if (assetModelCompositeModelPath == null) assetModelCompositeModelPath = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy