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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueHistorySkippedEntry.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 information for an entry that has been processed by the previous [BatchGetAssetPropertyValueHistory](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValue.html) request.
 */
public class BatchGetAssetPropertyValueHistorySkippedEntry private constructor(builder: Builder) {
    /**
     * The completion status of each entry that is associated with the [BatchGetAssetPropertyValueHistory](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValueHistory.html) API.
     */
    public val completionStatus: aws.sdk.kotlin.services.iotsitewise.model.BatchEntryCompletionStatus = requireNotNull(builder.completionStatus) { "A non-null value must be provided for completionStatus" }
    /**
     * The ID of the entry.
     */
    public val entryId: kotlin.String = requireNotNull(builder.entryId) { "A non-null value must be provided for entryId" }
    /**
     * The error information, such as the error code and the timestamp.
     */
    public val errorInfo: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueHistoryErrorInfo? = builder.errorInfo

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

    override fun toString(): kotlin.String = buildString {
        append("BatchGetAssetPropertyValueHistorySkippedEntry(")
        append("completionStatus=$completionStatus,")
        append("entryId=$entryId,")
        append("errorInfo=$errorInfo")
        append(")")
    }

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

        if (completionStatus != other.completionStatus) return false
        if (entryId != other.entryId) return false
        if (errorInfo != other.errorInfo) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The completion status of each entry that is associated with the [BatchGetAssetPropertyValueHistory](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyValueHistory.html) API.
         */
        public var completionStatus: aws.sdk.kotlin.services.iotsitewise.model.BatchEntryCompletionStatus? = null
        /**
         * The ID of the entry.
         */
        public var entryId: kotlin.String? = null
        /**
         * The error information, such as the error code and the timestamp.
         */
        public var errorInfo: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueHistoryErrorInfo? = null

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

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

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

        internal fun correctErrors(): Builder {
            if (completionStatus == null) completionStatus = BatchEntryCompletionStatus.SdkUnknown("no value provided")
            if (entryId == null) entryId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy