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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.BatchPutAssetPropertyErrorEntry.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 error information for asset property value entries that are associated with the [BatchPutAssetPropertyValue](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchPutAssetPropertyValue.html) API.
 */
public class BatchPutAssetPropertyErrorEntry private constructor(builder: Builder) {
    /**
     * The ID of the failed entry.
     */
    public val entryId: kotlin.String = requireNotNull(builder.entryId) { "A non-null value must be provided for entryId" }
    /**
     * The list of update property value errors.
     */
    public val errors: List = requireNotNull(builder.errors) { "A non-null value must be provided for errors" }

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

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the failed entry.
         */
        public var entryId: kotlin.String? = null
        /**
         * The list of update property value errors.
         */
        public var errors: List? = null

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy