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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyAggregatesSkippedEntry.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 [BatchGetAssetPropertyAggregates](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyAggregates.html) request.
 */
public class BatchGetAssetPropertyAggregatesSkippedEntry private constructor(builder: Builder) {
    /**
     * The completion status of each entry that is associated with the [BatchGetAssetPropertyAggregates](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyAggregates.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.BatchGetAssetPropertyAggregatesErrorInfo? = builder.errorInfo

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

    override fun toString(): kotlin.String = buildString {
        append("BatchGetAssetPropertyAggregatesSkippedEntry(")
        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 BatchGetAssetPropertyAggregatesSkippedEntry

        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.BatchGetAssetPropertyAggregatesSkippedEntry = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The completion status of each entry that is associated with the [BatchGetAssetPropertyAggregates](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchGetAssetPropertyAggregates.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.BatchGetAssetPropertyAggregatesErrorInfo? = null

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

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

        /**
         * construct an [aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyAggregatesErrorInfo] inside the given [block]
         */
        public fun errorInfo(block: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyAggregatesErrorInfo.Builder.() -> kotlin.Unit) {
            this.errorInfo = aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyAggregatesErrorInfo.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