commonMain.aws.sdk.kotlin.services.qldbsession.model.SendCommandResponse.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
public class SendCommandResponse private constructor(builder: Builder) {
/**
* Contains the details of the aborted transaction.
*/
public val abortTransaction: aws.sdk.kotlin.services.qldbsession.model.AbortTransactionResult? = builder.abortTransaction
/**
* Contains the details of the committed transaction.
*/
public val commitTransaction: aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult? = builder.commitTransaction
/**
* Contains the details of the ended session.
*/
public val endSession: aws.sdk.kotlin.services.qldbsession.model.EndSessionResult? = builder.endSession
/**
* Contains the details of the executed statement.
*/
public val executeStatement: aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementResult? = builder.executeStatement
/**
* Contains the details of the fetched page.
*/
public val fetchPage: aws.sdk.kotlin.services.qldbsession.model.FetchPageResult? = builder.fetchPage
/**
* Contains the details of the started session that includes a session token. This `SessionToken` is required for every subsequent command that is issued during the current session.
*/
public val startSession: aws.sdk.kotlin.services.qldbsession.model.StartSessionResult? = builder.startSession
/**
* Contains the details of the started transaction.
*/
public val startTransaction: aws.sdk.kotlin.services.qldbsession.model.StartTransactionResult? = builder.startTransaction
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldbsession.model.SendCommandResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SendCommandResponse(")
append("abortTransaction=$abortTransaction,")
append("commitTransaction=$commitTransaction,")
append("endSession=$endSession,")
append("executeStatement=$executeStatement,")
append("fetchPage=$fetchPage,")
append("startSession=$startSession,")
append("startTransaction=$startTransaction")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = abortTransaction?.hashCode() ?: 0
result = 31 * result + (commitTransaction?.hashCode() ?: 0)
result = 31 * result + (endSession?.hashCode() ?: 0)
result = 31 * result + (executeStatement?.hashCode() ?: 0)
result = 31 * result + (fetchPage?.hashCode() ?: 0)
result = 31 * result + (startSession?.hashCode() ?: 0)
result = 31 * result + (startTransaction?.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 SendCommandResponse
if (abortTransaction != other.abortTransaction) return false
if (commitTransaction != other.commitTransaction) return false
if (endSession != other.endSession) return false
if (executeStatement != other.executeStatement) return false
if (fetchPage != other.fetchPage) return false
if (startSession != other.startSession) return false
if (startTransaction != other.startTransaction) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldbsession.model.SendCommandResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains the details of the aborted transaction.
*/
public var abortTransaction: aws.sdk.kotlin.services.qldbsession.model.AbortTransactionResult? = null
/**
* Contains the details of the committed transaction.
*/
public var commitTransaction: aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult? = null
/**
* Contains the details of the ended session.
*/
public var endSession: aws.sdk.kotlin.services.qldbsession.model.EndSessionResult? = null
/**
* Contains the details of the executed statement.
*/
public var executeStatement: aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementResult? = null
/**
* Contains the details of the fetched page.
*/
public var fetchPage: aws.sdk.kotlin.services.qldbsession.model.FetchPageResult? = null
/**
* Contains the details of the started session that includes a session token. This `SessionToken` is required for every subsequent command that is issued during the current session.
*/
public var startSession: aws.sdk.kotlin.services.qldbsession.model.StartSessionResult? = null
/**
* Contains the details of the started transaction.
*/
public var startTransaction: aws.sdk.kotlin.services.qldbsession.model.StartTransactionResult? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qldbsession.model.SendCommandResponse) : this() {
this.abortTransaction = x.abortTransaction
this.commitTransaction = x.commitTransaction
this.endSession = x.endSession
this.executeStatement = x.executeStatement
this.fetchPage = x.fetchPage
this.startSession = x.startSession
this.startTransaction = x.startTransaction
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qldbsession.model.SendCommandResponse = SendCommandResponse(this)
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.AbortTransactionResult] inside the given [block]
*/
public fun abortTransaction(block: aws.sdk.kotlin.services.qldbsession.model.AbortTransactionResult.Builder.() -> kotlin.Unit) {
this.abortTransaction = aws.sdk.kotlin.services.qldbsession.model.AbortTransactionResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult] inside the given [block]
*/
public fun commitTransaction(block: aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult.Builder.() -> kotlin.Unit) {
this.commitTransaction = aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.EndSessionResult] inside the given [block]
*/
public fun endSession(block: aws.sdk.kotlin.services.qldbsession.model.EndSessionResult.Builder.() -> kotlin.Unit) {
this.endSession = aws.sdk.kotlin.services.qldbsession.model.EndSessionResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementResult] inside the given [block]
*/
public fun executeStatement(block: aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementResult.Builder.() -> kotlin.Unit) {
this.executeStatement = aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.FetchPageResult] inside the given [block]
*/
public fun fetchPage(block: aws.sdk.kotlin.services.qldbsession.model.FetchPageResult.Builder.() -> kotlin.Unit) {
this.fetchPage = aws.sdk.kotlin.services.qldbsession.model.FetchPageResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.StartSessionResult] inside the given [block]
*/
public fun startSession(block: aws.sdk.kotlin.services.qldbsession.model.StartSessionResult.Builder.() -> kotlin.Unit) {
this.startSession = aws.sdk.kotlin.services.qldbsession.model.StartSessionResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.StartTransactionResult] inside the given [block]
*/
public fun startTransaction(block: aws.sdk.kotlin.services.qldbsession.model.StartTransactionResult.Builder.() -> kotlin.Unit) {
this.startTransaction = aws.sdk.kotlin.services.qldbsession.model.StartTransactionResult.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}