commonMain.aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult.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
/**
* Contains the details of the committed transaction.
*/
public class CommitTransactionResult private constructor(builder: Builder) {
/**
* The commit digest of the committed transaction.
*/
public val commitDigest: kotlin.ByteArray? = builder.commitDigest
/**
* Contains metrics about the number of I/O requests that were consumed.
*/
public val consumedIos: aws.sdk.kotlin.services.qldbsession.model.IoUsage? = builder.consumedIos
/**
* Contains server-side performance information for the command.
*/
public val timingInformation: aws.sdk.kotlin.services.qldbsession.model.TimingInformation? = builder.timingInformation
/**
* The transaction ID of the committed transaction.
*/
public val transactionId: kotlin.String? = builder.transactionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CommitTransactionResult(")
append("commitDigest=$commitDigest,")
append("consumedIos=$consumedIos,")
append("timingInformation=$timingInformation,")
append("transactionId=$transactionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = commitDigest?.contentHashCode() ?: 0
result = 31 * result + (consumedIos?.hashCode() ?: 0)
result = 31 * result + (timingInformation?.hashCode() ?: 0)
result = 31 * result + (transactionId?.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 CommitTransactionResult
if (commitDigest != null) {
if (other.commitDigest == null) return false
if (!commitDigest.contentEquals(other.commitDigest)) return false
} else if (other.commitDigest != null) return false
if (consumedIos != other.consumedIos) return false
if (timingInformation != other.timingInformation) return false
if (transactionId != other.transactionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The commit digest of the committed transaction.
*/
public var commitDigest: kotlin.ByteArray? = null
/**
* Contains metrics about the number of I/O requests that were consumed.
*/
public var consumedIos: aws.sdk.kotlin.services.qldbsession.model.IoUsage? = null
/**
* Contains server-side performance information for the command.
*/
public var timingInformation: aws.sdk.kotlin.services.qldbsession.model.TimingInformation? = null
/**
* The transaction ID of the committed transaction.
*/
public var transactionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult) : this() {
this.commitDigest = x.commitDigest
this.consumedIos = x.consumedIos
this.timingInformation = x.timingInformation
this.transactionId = x.transactionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qldbsession.model.CommitTransactionResult = CommitTransactionResult(this)
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.IoUsage] inside the given [block]
*/
public fun consumedIos(block: aws.sdk.kotlin.services.qldbsession.model.IoUsage.Builder.() -> kotlin.Unit) {
this.consumedIos = aws.sdk.kotlin.services.qldbsession.model.IoUsage.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldbsession.model.TimingInformation] inside the given [block]
*/
public fun timingInformation(block: aws.sdk.kotlin.services.qldbsession.model.TimingInformation.Builder.() -> kotlin.Unit) {
this.timingInformation = aws.sdk.kotlin.services.qldbsession.model.TimingInformation.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}