commonMain.aws.sdk.kotlin.services.qldbsession.model.StartSessionResult.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 started session.
*/
public class StartSessionResult private constructor(builder: Builder) {
/**
* Session token of the started session. This `SessionToken` is required for every subsequent command that is issued during the current session.
*/
public val sessionToken: kotlin.String? = builder.sessionToken
/**
* Contains server-side performance information for the command.
*/
public val timingInformation: aws.sdk.kotlin.services.qldbsession.model.TimingInformation? = builder.timingInformation
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldbsession.model.StartSessionResult = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StartSessionResult(")
append("sessionToken=$sessionToken,")
append("timingInformation=$timingInformation")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = sessionToken?.hashCode() ?: 0
result = 31 * result + (timingInformation?.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 StartSessionResult
if (sessionToken != other.sessionToken) return false
if (timingInformation != other.timingInformation) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldbsession.model.StartSessionResult = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Session token of the started session. This `SessionToken` is required for every subsequent command that is issued during the current session.
*/
public var sessionToken: kotlin.String? = null
/**
* Contains server-side performance information for the command.
*/
public var timingInformation: aws.sdk.kotlin.services.qldbsession.model.TimingInformation? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qldbsession.model.StartSessionResult) : this() {
this.sessionToken = x.sessionToken
this.timingInformation = x.timingInformation
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qldbsession.model.StartSessionResult = StartSessionResult(this)
/**
* 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
}
}
}