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

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

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

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



public class BatchUpsertTableRowsResponse private constructor(builder: Builder) {
    /**
     * The list of batch items in the request that could not be updated or appended in the table. Each element in this list contains one item from the request that could not be updated in the table along with the reason why that item could not be updated or appended.
     */
    public val failedBatchItems: List? = builder.failedBatchItems
    /**
     * A map with the batch item id as the key and the result of the upsert operation as the value. The result of the upsert operation specifies whether existing rows were updated or a new row was appended, along with the list of row ids that were affected.
     */
    public val rows: Map = requireNotNull(builder.rows) { "A non-null value must be provided for rows" }
    /**
     * The updated workbook cursor after updating or appending rows in the table.
     */
    public val workbookCursor: kotlin.Long = builder.workbookCursor

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

    override fun toString(): kotlin.String = buildString {
        append("BatchUpsertTableRowsResponse(")
        append("failedBatchItems=$failedBatchItems,")
        append("rows=$rows,")
        append("workbookCursor=$workbookCursor")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = failedBatchItems?.hashCode() ?: 0
        result = 31 * result + (rows.hashCode())
        result = 31 * result + (workbookCursor.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 BatchUpsertTableRowsResponse

        if (failedBatchItems != other.failedBatchItems) return false
        if (rows != other.rows) return false
        if (workbookCursor != other.workbookCursor) return false

        return true
    }

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

    public class Builder {
        /**
         * The list of batch items in the request that could not be updated or appended in the table. Each element in this list contains one item from the request that could not be updated in the table along with the reason why that item could not be updated or appended.
         */
        public var failedBatchItems: List? = null
        /**
         * A map with the batch item id as the key and the result of the upsert operation as the value. The result of the upsert operation specifies whether existing rows were updated or a new row was appended, along with the list of row ids that were affected.
         */
        public var rows: Map? = null
        /**
         * The updated workbook cursor after updating or appending rows in the table.
         */
        public var workbookCursor: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.honeycode.model.BatchUpsertTableRowsResponse) : this() {
            this.failedBatchItems = x.failedBatchItems
            this.rows = x.rows
            this.workbookCursor = x.workbookCursor
        }

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

        internal fun correctErrors(): Builder {
            if (rows == null) rows = emptyMap()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy