commonMain.aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qldbsession-jvm Show documentation
Show all versions of qldbsession-jvm Show documentation
The AWS SDK for Kotlin client for QLDB Session
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qldbsession.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies a request to execute a statement.
*/
public class ExecuteStatementRequest private constructor(builder: Builder) {
/**
* Specifies the parameters for the parameterized statement in the request.
*/
public val parameters: List? = builder.parameters
/**
* Specifies the statement of the request.
*/
public val statement: kotlin.String = requireNotNull(builder.statement) { "A non-null value must be provided for statement" }
/**
* Specifies the transaction ID of the request.
*/
public val transactionId: kotlin.String = requireNotNull(builder.transactionId) { "A non-null value must be provided for transactionId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExecuteStatementRequest(")
append("parameters=$parameters,")
append("statement=$statement,")
append("transactionId=$transactionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = parameters?.hashCode() ?: 0
result = 31 * result + (statement.hashCode())
result = 31 * result + (transactionId.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 ExecuteStatementRequest
if (parameters != other.parameters) return false
if (statement != other.statement) return false
if (transactionId != other.transactionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the parameters for the parameterized statement in the request.
*/
public var parameters: List? = null
/**
* Specifies the statement of the request.
*/
public var statement: kotlin.String? = null
/**
* Specifies the transaction ID of the request.
*/
public var transactionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementRequest) : this() {
this.parameters = x.parameters
this.statement = x.statement
this.transactionId = x.transactionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementRequest = ExecuteStatementRequest(this)
internal fun correctErrors(): Builder {
if (statement == null) statement = ""
if (transactionId == null) transactionId = ""
return this
}
}
}