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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueHistorySuccessEntry.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 success information for an entry that is associated with the [BatchGetAssetPropertyValueHistory](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValue.html) API.
 */
public class BatchGetAssetPropertyValueHistorySuccessEntry private constructor(builder: Builder) {
    /**
     * The requested historical values for the specified asset property.
     */
    public val assetPropertyValueHistory: List = requireNotNull(builder.assetPropertyValueHistory) { "A non-null value must be provided for assetPropertyValueHistory" }
    /**
     * The ID of the entry.
     */
    public val entryId: kotlin.String = requireNotNull(builder.entryId) { "A non-null value must be provided for entryId" }

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

    override fun toString(): kotlin.String = buildString {
        append("BatchGetAssetPropertyValueHistorySuccessEntry(")
        append("assetPropertyValueHistory=$assetPropertyValueHistory,")
        append("entryId=$entryId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetPropertyValueHistory.hashCode()
        result = 31 * result + (entryId.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 BatchGetAssetPropertyValueHistorySuccessEntry

        if (assetPropertyValueHistory != other.assetPropertyValueHistory) return false
        if (entryId != other.entryId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The requested historical values for the specified asset property.
         */
        public var assetPropertyValueHistory: List? = null
        /**
         * The ID of the entry.
         */
        public var entryId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueHistorySuccessEntry) : this() {
            this.assetPropertyValueHistory = x.assetPropertyValueHistory
            this.entryId = x.entryId
        }

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

        internal fun correctErrors(): Builder {
            if (assetPropertyValueHistory == null) assetPropertyValueHistory = emptyList()
            if (entryId == null) entryId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy