commonMain.aws.sdk.kotlin.services.qldb.model.LedgerSummary.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Information about a ledger, including its name, state, and when it was created.
*/
public class LedgerSummary private constructor(builder: Builder) {
/**
* The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)
*/
public val creationDateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDateTime
/**
* The name of the ledger.
*/
public val name: kotlin.String? = builder.name
/**
* The current status of the ledger.
*/
public val state: aws.sdk.kotlin.services.qldb.model.LedgerState? = builder.state
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldb.model.LedgerSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LedgerSummary(")
append("creationDateTime=$creationDateTime,")
append("name=$name,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationDateTime?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (state?.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 LedgerSummary
if (creationDateTime != other.creationDateTime) return false
if (name != other.name) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldb.model.LedgerSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)
*/
public var creationDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The name of the ledger.
*/
public var name: kotlin.String? = null
/**
* The current status of the ledger.
*/
public var state: aws.sdk.kotlin.services.qldb.model.LedgerState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qldb.model.LedgerSummary) : this() {
this.creationDateTime = x.creationDateTime
this.name = x.name
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qldb.model.LedgerSummary = LedgerSummary(this)
internal fun correctErrors(): Builder {
return this
}
}
}