
commonMain.aws.sdk.kotlin.services.dynamodb.model.BatchStatementError.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dynamodb.model
/**
* An error associated with a statement in a PartiQL batch that was run.
*/
public class BatchStatementError private constructor(builder: Builder) {
/**
* The error code associated with the failed PartiQL batch statement.
*/
public val code: aws.sdk.kotlin.services.dynamodb.model.BatchStatementErrorCodeEnum? = builder.code
/**
* The item which caused the condition check to fail. This will be set if ReturnValuesOnConditionCheckFailure is specified as `ALL_OLD`.
*/
public val item: Map? = builder.item
/**
* The error message associated with the PartiQL batch response.
*/
public val message: kotlin.String? = builder.message
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dynamodb.model.BatchStatementError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchStatementError(")
append("code=$code,")
append("item=$item,")
append("message=$message")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (item?.hashCode() ?: 0)
result = 31 * result + (message?.hashCode() ?: 0)
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 BatchStatementError
if (code != other.code) return false
if (item != other.item) return false
if (message != other.message) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dynamodb.model.BatchStatementError = Builder(this).apply(block).build()
public class Builder {
/**
* The error code associated with the failed PartiQL batch statement.
*/
public var code: aws.sdk.kotlin.services.dynamodb.model.BatchStatementErrorCodeEnum? = null
/**
* The item which caused the condition check to fail. This will be set if ReturnValuesOnConditionCheckFailure is specified as `ALL_OLD`.
*/
public var item: Map? = null
/**
* The error message associated with the PartiQL batch response.
*/
public var message: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.BatchStatementError) : this() {
this.code = x.code
this.item = x.item
this.message = x.message
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dynamodb.model.BatchStatementError = BatchStatementError(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy