commonMain.aws.sdk.kotlin.services.qldb.model.GetRevisionResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qldb-jvm Show documentation
Show all versions of qldb-jvm Show documentation
The AWS SDK for Kotlin client for QLDB
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qldb.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetRevisionResponse private constructor(builder: Builder) {
/**
* The proof object in Amazon Ion format returned by a `GetRevision` request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.
*/
public val proof: aws.sdk.kotlin.services.qldb.model.ValueHolder? = builder.proof
/**
* The document revision data object in Amazon Ion format.
*/
public val revision: aws.sdk.kotlin.services.qldb.model.ValueHolder? = builder.revision
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldb.model.GetRevisionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetRevisionResponse(")
append("proof=*** Sensitive Data Redacted ***,")
append("revision=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = proof?.hashCode() ?: 0
result = 31 * result + (revision?.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 GetRevisionResponse
if (proof != other.proof) return false
if (revision != other.revision) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldb.model.GetRevisionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The proof object in Amazon Ion format returned by a `GetRevision` request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.
*/
public var proof: aws.sdk.kotlin.services.qldb.model.ValueHolder? = null
/**
* The document revision data object in Amazon Ion format.
*/
public var revision: aws.sdk.kotlin.services.qldb.model.ValueHolder? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qldb.model.GetRevisionResponse) : this() {
this.proof = x.proof
this.revision = x.revision
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qldb.model.GetRevisionResponse = GetRevisionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.qldb.model.ValueHolder] inside the given [block]
*/
public fun proof(block: aws.sdk.kotlin.services.qldb.model.ValueHolder.Builder.() -> kotlin.Unit) {
this.proof = aws.sdk.kotlin.services.qldb.model.ValueHolder.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.qldb.model.ValueHolder] inside the given [block]
*/
public fun revision(block: aws.sdk.kotlin.services.qldb.model.ValueHolder.Builder.() -> kotlin.Unit) {
this.revision = aws.sdk.kotlin.services.qldb.model.ValueHolder.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}