
commonMain.aws.sdk.kotlin.services.honeycode.model.FailedBatchItem.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
/**
* A single item in a batch that failed to perform the intended action because of an error preventing it from succeeding.
*/
public class FailedBatchItem private constructor(builder: Builder) {
/**
* The error message that indicates why the batch item failed.
*/
public val errorMessage: kotlin.String = requireNotNull(builder.errorMessage) { "A non-null value must be provided for errorMessage" }
/**
* The id of the batch item that failed. This is the batch item id for the BatchCreateTableRows and BatchUpsertTableRows operations and the row id for the BatchUpdateTableRows and BatchDeleteTableRows operations.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.honeycode.model.FailedBatchItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FailedBatchItem(")
append("errorMessage=$errorMessage,")
append("id=$id")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorMessage.hashCode()
result = 31 * result + (id.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 FailedBatchItem
if (errorMessage != other.errorMessage) return false
if (id != other.id) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.honeycode.model.FailedBatchItem = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The error message that indicates why the batch item failed.
*/
public var errorMessage: kotlin.String? = null
/**
* The id of the batch item that failed. This is the batch item id for the BatchCreateTableRows and BatchUpsertTableRows operations and the row id for the BatchUpdateTableRows and BatchDeleteTableRows operations.
*/
public var id: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.honeycode.model.FailedBatchItem) : this() {
this.errorMessage = x.errorMessage
this.id = x.id
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.honeycode.model.FailedBatchItem = FailedBatchItem(this)
internal fun correctErrors(): Builder {
if (errorMessage == null) errorMessage = ""
if (id == null) id = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy