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

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

/**
 * Contains a summary of the composite model.
 */
public class AssetModelCompositeModelSummary private constructor(builder: Builder) {
    /**
     * The description of the composite model that this summary describes..
     */
    public val description: kotlin.String? = builder.description
    /**
     * The external ID of a composite model on this asset model. For more information, see [Using external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids) in the *IoT SiteWise User Guide*.
     */
    public val externalId: kotlin.String? = builder.externalId
    /**
     * The ID of the composite model that this summary describes..
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The name of the composite model that this summary describes..
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The path that includes all the pieces that make up the composite model.
     */
    public val path: List? = builder.path
    /**
     * The composite model type. Valid values are `AWS/ALARM`, `CUSTOM`, or ` AWS/L4E_ANOMALY`.
     */
    public val type: kotlin.String = requireNotNull(builder.type) { "A non-null value must be provided for type" }

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

    override fun toString(): kotlin.String = buildString {
        append("AssetModelCompositeModelSummary(")
        append("description=$description,")
        append("externalId=$externalId,")
        append("id=$id,")
        append("name=$name,")
        append("path=$path,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (externalId?.hashCode() ?: 0)
        result = 31 * result + (id.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (path?.hashCode() ?: 0)
        result = 31 * result + (type.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 AssetModelCompositeModelSummary

        if (description != other.description) return false
        if (externalId != other.externalId) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (path != other.path) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The description of the composite model that this summary describes..
         */
        public var description: kotlin.String? = null
        /**
         * The external ID of a composite model on this asset model. For more information, see [Using external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids) in the *IoT SiteWise User Guide*.
         */
        public var externalId: kotlin.String? = null
        /**
         * The ID of the composite model that this summary describes..
         */
        public var id: kotlin.String? = null
        /**
         * The name of the composite model that this summary describes..
         */
        public var name: kotlin.String? = null
        /**
         * The path that includes all the pieces that make up the composite model.
         */
        public var path: List? = null
        /**
         * The composite model type. Valid values are `AWS/ALARM`, `CUSTOM`, or ` AWS/L4E_ANOMALY`.
         */
        public var type: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.AssetModelCompositeModelSummary) : this() {
            this.description = x.description
            this.externalId = x.externalId
            this.id = x.id
            this.name = x.name
            this.path = x.path
            this.type = x.type
        }

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

        internal fun correctErrors(): Builder {
            if (id == null) id = ""
            if (name == null) name = ""
            if (type == null) type = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy