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

commonMain.aws.sdk.kotlin.services.honeycode.model.UpsertRowsResult.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.honeycode.model



/**
 * An object that represents the result of a single upsert row request.
 */
public class UpsertRowsResult private constructor(builder: Builder) {
    /**
     * The list of row ids that were changed as part of an upsert row operation. If the upsert resulted in an update, this list could potentially contain multiple rows that matched the filter and hence got updated. If the upsert resulted in an append, this list would only have the single row that was appended.
     */
    public val rowIds: List = requireNotNull(builder.rowIds) { "A non-null value must be provided for rowIds" }
    /**
     * The result of the upsert action.
     */
    public val upsertAction: aws.sdk.kotlin.services.honeycode.model.UpsertAction = requireNotNull(builder.upsertAction) { "A non-null value must be provided for upsertAction" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpsertRowsResult(")
        append("rowIds=$rowIds,")
        append("upsertAction=$upsertAction")
        append(")")
    }

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

        if (rowIds != other.rowIds) return false
        if (upsertAction != other.upsertAction) return false

        return true
    }

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

    public class Builder {
        /**
         * The list of row ids that were changed as part of an upsert row operation. If the upsert resulted in an update, this list could potentially contain multiple rows that matched the filter and hence got updated. If the upsert resulted in an append, this list would only have the single row that was appended.
         */
        public var rowIds: List? = null
        /**
         * The result of the upsert action.
         */
        public var upsertAction: aws.sdk.kotlin.services.honeycode.model.UpsertAction? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.honeycode.model.UpsertRowsResult) : this() {
            this.rowIds = x.rowIds
            this.upsertAction = x.upsertAction
        }

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

        internal fun correctErrors(): Builder {
            if (rowIds == null) rowIds = emptyList()
            if (upsertAction == null) upsertAction = UpsertAction.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy