
commonMain.aws.sdk.kotlin.services.honeycode.model.UpdateRowData.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.honeycode.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Data needed to create a single row in a table as part of the BatchCreateTableRows request.
*/
public class UpdateRowData private constructor(builder: Builder) {
/**
* A map representing the cells to update in the given row. The key is the column id of the cell and the value is the CellInput object that represents the data to set in that cell.
*/
public val cellsToUpdate: Map = requireNotNull(builder.cellsToUpdate) { "A non-null value must be provided for cellsToUpdate" }
/**
* The id of the row that needs to be updated.
*/
public val rowId: kotlin.String = requireNotNull(builder.rowId) { "A non-null value must be provided for rowId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.honeycode.model.UpdateRowData = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateRowData(")
append("cellsToUpdate=$cellsToUpdate,")
append("rowId=$rowId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cellsToUpdate.hashCode()
result = 31 * result + (rowId.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 UpdateRowData
if (cellsToUpdate != other.cellsToUpdate) return false
if (rowId != other.rowId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.honeycode.model.UpdateRowData = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A map representing the cells to update in the given row. The key is the column id of the cell and the value is the CellInput object that represents the data to set in that cell.
*/
public var cellsToUpdate: Map? = null
/**
* The id of the row that needs to be updated.
*/
public var rowId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.honeycode.model.UpdateRowData) : this() {
this.cellsToUpdate = x.cellsToUpdate
this.rowId = x.rowId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.honeycode.model.UpdateRowData = UpdateRowData(this)
internal fun correctErrors(): Builder {
if (cellsToUpdate == null) cellsToUpdate = emptyMap()
if (rowId == null) rowId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy