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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.DescribeAssetModelCompositeModelResponse.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 DescribeAssetModelCompositeModelResponse private constructor(builder: Builder) {
    /**
     * The available actions for a composite model on this asset model.
     */
    public val actionDefinitions: List? = builder.actionDefinitions
    /**
     * The description for the composite model.
     */
    public val assetModelCompositeModelDescription: kotlin.String = requireNotNull(builder.assetModelCompositeModelDescription) { "A non-null value must be provided for assetModelCompositeModelDescription" }
    /**
     * The external ID of a composite model on this asset model.
     */
    public val assetModelCompositeModelExternalId: kotlin.String? = builder.assetModelCompositeModelExternalId
    /**
     * The ID of a composite model on this asset model.
     */
    public val assetModelCompositeModelId: kotlin.String = requireNotNull(builder.assetModelCompositeModelId) { "A non-null value must be provided for assetModelCompositeModelId" }
    /**
     * The unique, friendly name for the composite model.
     */
    public val assetModelCompositeModelName: kotlin.String = requireNotNull(builder.assetModelCompositeModelName) { "A non-null value must be provided for assetModelCompositeModelName" }
    /**
     * 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" }
    /**
     * The property definitions of the composite model.
     */
    public val assetModelCompositeModelProperties: List = requireNotNull(builder.assetModelCompositeModelProperties) { "A non-null value must be provided for assetModelCompositeModelProperties" }
    /**
     * The list of composite model summaries for the composite model.
     */
    public val assetModelCompositeModelSummaries: List = requireNotNull(builder.assetModelCompositeModelSummaries) { "A non-null value must be provided for assetModelCompositeModelSummaries" }
    /**
     * The composite model type. Valid values are `AWS/ALARM`, `CUSTOM`, or ` AWS/L4E_ANOMALY`.
     */
    public val assetModelCompositeModelType: kotlin.String = requireNotNull(builder.assetModelCompositeModelType) { "A non-null value must be provided for assetModelCompositeModelType" }
    /**
     * The ID of the asset model, in UUID format.
     */
    public val assetModelId: kotlin.String = requireNotNull(builder.assetModelId) { "A non-null value must be provided for assetModelId" }
    /**
     * Metadata for the composition relationship established by using `composedAssetModelId` in `CreateAssetModelCompositeModel`[](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateAssetModelCompositeModel.html). For instance, an array detailing the path of the composition relationship for this composite model.
     */
    public val compositionDetails: aws.sdk.kotlin.services.iotsitewise.model.CompositionDetails? = builder.compositionDetails

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeAssetModelCompositeModelResponse(")
        append("actionDefinitions=$actionDefinitions,")
        append("assetModelCompositeModelDescription=$assetModelCompositeModelDescription,")
        append("assetModelCompositeModelExternalId=$assetModelCompositeModelExternalId,")
        append("assetModelCompositeModelId=$assetModelCompositeModelId,")
        append("assetModelCompositeModelName=$assetModelCompositeModelName,")
        append("assetModelCompositeModelPath=$assetModelCompositeModelPath,")
        append("assetModelCompositeModelProperties=$assetModelCompositeModelProperties,")
        append("assetModelCompositeModelSummaries=$assetModelCompositeModelSummaries,")
        append("assetModelCompositeModelType=$assetModelCompositeModelType,")
        append("assetModelId=$assetModelId,")
        append("compositionDetails=$compositionDetails")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionDefinitions?.hashCode() ?: 0
        result = 31 * result + (assetModelCompositeModelDescription.hashCode())
        result = 31 * result + (assetModelCompositeModelExternalId?.hashCode() ?: 0)
        result = 31 * result + (assetModelCompositeModelId.hashCode())
        result = 31 * result + (assetModelCompositeModelName.hashCode())
        result = 31 * result + (assetModelCompositeModelPath.hashCode())
        result = 31 * result + (assetModelCompositeModelProperties.hashCode())
        result = 31 * result + (assetModelCompositeModelSummaries.hashCode())
        result = 31 * result + (assetModelCompositeModelType.hashCode())
        result = 31 * result + (assetModelId.hashCode())
        result = 31 * result + (compositionDetails?.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 DescribeAssetModelCompositeModelResponse

        if (actionDefinitions != other.actionDefinitions) return false
        if (assetModelCompositeModelDescription != other.assetModelCompositeModelDescription) return false
        if (assetModelCompositeModelExternalId != other.assetModelCompositeModelExternalId) return false
        if (assetModelCompositeModelId != other.assetModelCompositeModelId) return false
        if (assetModelCompositeModelName != other.assetModelCompositeModelName) return false
        if (assetModelCompositeModelPath != other.assetModelCompositeModelPath) return false
        if (assetModelCompositeModelProperties != other.assetModelCompositeModelProperties) return false
        if (assetModelCompositeModelSummaries != other.assetModelCompositeModelSummaries) return false
        if (assetModelCompositeModelType != other.assetModelCompositeModelType) return false
        if (assetModelId != other.assetModelId) return false
        if (compositionDetails != other.compositionDetails) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The available actions for a composite model on this asset model.
         */
        public var actionDefinitions: List? = null
        /**
         * The description for the composite model.
         */
        public var assetModelCompositeModelDescription: kotlin.String? = null
        /**
         * The external ID of a composite model on this asset model.
         */
        public var assetModelCompositeModelExternalId: kotlin.String? = null
        /**
         * The ID of a composite model on this asset model.
         */
        public var assetModelCompositeModelId: kotlin.String? = null
        /**
         * The unique, friendly name for the composite model.
         */
        public var assetModelCompositeModelName: kotlin.String? = null
        /**
         * The path to the composite model listing the parent composite models.
         */
        public var assetModelCompositeModelPath: List? = null
        /**
         * The property definitions of the composite model.
         */
        public var assetModelCompositeModelProperties: List? = null
        /**
         * The list of composite model summaries for the composite model.
         */
        public var assetModelCompositeModelSummaries: List? = null
        /**
         * The composite model type. Valid values are `AWS/ALARM`, `CUSTOM`, or ` AWS/L4E_ANOMALY`.
         */
        public var assetModelCompositeModelType: kotlin.String? = null
        /**
         * The ID of the asset model, in UUID format.
         */
        public var assetModelId: kotlin.String? = null
        /**
         * Metadata for the composition relationship established by using `composedAssetModelId` in `CreateAssetModelCompositeModel`[](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_CreateAssetModelCompositeModel.html). For instance, an array detailing the path of the composition relationship for this composite model.
         */
        public var compositionDetails: aws.sdk.kotlin.services.iotsitewise.model.CompositionDetails? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.DescribeAssetModelCompositeModelResponse) : this() {
            this.actionDefinitions = x.actionDefinitions
            this.assetModelCompositeModelDescription = x.assetModelCompositeModelDescription
            this.assetModelCompositeModelExternalId = x.assetModelCompositeModelExternalId
            this.assetModelCompositeModelId = x.assetModelCompositeModelId
            this.assetModelCompositeModelName = x.assetModelCompositeModelName
            this.assetModelCompositeModelPath = x.assetModelCompositeModelPath
            this.assetModelCompositeModelProperties = x.assetModelCompositeModelProperties
            this.assetModelCompositeModelSummaries = x.assetModelCompositeModelSummaries
            this.assetModelCompositeModelType = x.assetModelCompositeModelType
            this.assetModelId = x.assetModelId
            this.compositionDetails = x.compositionDetails
        }

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

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

        internal fun correctErrors(): Builder {
            if (assetModelCompositeModelDescription == null) assetModelCompositeModelDescription = ""
            if (assetModelCompositeModelId == null) assetModelCompositeModelId = ""
            if (assetModelCompositeModelName == null) assetModelCompositeModelName = ""
            if (assetModelCompositeModelPath == null) assetModelCompositeModelPath = emptyList()
            if (assetModelCompositeModelProperties == null) assetModelCompositeModelProperties = emptyList()
            if (assetModelCompositeModelSummaries == null) assetModelCompositeModelSummaries = emptyList()
            if (assetModelCompositeModelType == null) assetModelCompositeModelType = ""
            if (assetModelId == null) assetModelId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy