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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyAggregatesResponse.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 BatchGetAssetPropertyAggregatesResponse private constructor(builder: Builder) {
    /**
     * A list of the errors (if any) associated with the batch request. Each error entry contains the `entryId` of the entry that failed.
     */
    public val errorEntries: List = requireNotNull(builder.errorEntries) { "A non-null value must be provided for errorEntries" }
    /**
     * The token for the next set of results, or null if there are no additional results.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * A list of entries that were not processed by this batch request. because these entries had been completely processed by previous paginated requests. Each skipped entry contains the `entryId` of the entry that skipped.
     */
    public val skippedEntries: List = requireNotNull(builder.skippedEntries) { "A non-null value must be provided for skippedEntries" }
    /**
     * A list of entries that were processed successfully by this batch request. Each success entry contains the `entryId` of the entry that succeeded and the latest query result.
     */
    public val successEntries: List = requireNotNull(builder.successEntries) { "A non-null value must be provided for successEntries" }

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

    override fun toString(): kotlin.String = buildString {
        append("BatchGetAssetPropertyAggregatesResponse(")
        append("errorEntries=$errorEntries,")
        append("nextToken=$nextToken,")
        append("skippedEntries=$skippedEntries,")
        append("successEntries=$successEntries")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errorEntries.hashCode()
        result = 31 * result + (nextToken?.hashCode() ?: 0)
        result = 31 * result + (skippedEntries.hashCode())
        result = 31 * result + (successEntries.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 BatchGetAssetPropertyAggregatesResponse

        if (errorEntries != other.errorEntries) return false
        if (nextToken != other.nextToken) return false
        if (skippedEntries != other.skippedEntries) return false
        if (successEntries != other.successEntries) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of the errors (if any) associated with the batch request. Each error entry contains the `entryId` of the entry that failed.
         */
        public var errorEntries: List? = null
        /**
         * The token for the next set of results, or null if there are no additional results.
         */
        public var nextToken: kotlin.String? = null
        /**
         * A list of entries that were not processed by this batch request. because these entries had been completely processed by previous paginated requests. Each skipped entry contains the `entryId` of the entry that skipped.
         */
        public var skippedEntries: List? = null
        /**
         * A list of entries that were processed successfully by this batch request. Each success entry contains the `entryId` of the entry that succeeded and the latest query result.
         */
        public var successEntries: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyAggregatesResponse) : this() {
            this.errorEntries = x.errorEntries
            this.nextToken = x.nextToken
            this.skippedEntries = x.skippedEntries
            this.successEntries = x.successEntries
        }

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

        internal fun correctErrors(): Builder {
            if (errorEntries == null) errorEntries = emptyList()
            if (skippedEntries == null) skippedEntries = emptyList()
            if (successEntries == null) successEntries = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy