commonMain.aws.sdk.kotlin.services.wisdom.model.SessionSummary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wisdom-jvm Show documentation
Show all versions of wisdom-jvm Show documentation
The AWS SDK for Kotlin client for Wisdom
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wisdom.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Summary information about the session.
*/
public class SessionSummary private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the Wisdom assistant.
*/
public val assistantArn: kotlin.String = requireNotNull(builder.assistantArn) { "A non-null value must be provided for assistantArn" }
/**
* The identifier of the Wisdom assistant.
*/
public val assistantId: kotlin.String = requireNotNull(builder.assistantId) { "A non-null value must be provided for assistantId" }
/**
* The Amazon Resource Name (ARN) of the session.
*/
public val sessionArn: kotlin.String = requireNotNull(builder.sessionArn) { "A non-null value must be provided for sessionArn" }
/**
* The identifier of the session.
*/
public val sessionId: kotlin.String = requireNotNull(builder.sessionId) { "A non-null value must be provided for sessionId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wisdom.model.SessionSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SessionSummary(")
append("assistantArn=$assistantArn,")
append("assistantId=$assistantId,")
append("sessionArn=$sessionArn,")
append("sessionId=$sessionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = assistantArn.hashCode()
result = 31 * result + (assistantId.hashCode())
result = 31 * result + (sessionArn.hashCode())
result = 31 * result + (sessionId.hashCode())
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 SessionSummary
if (assistantArn != other.assistantArn) return false
if (assistantId != other.assistantId) return false
if (sessionArn != other.sessionArn) return false
if (sessionId != other.sessionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wisdom.model.SessionSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the Wisdom assistant.
*/
public var assistantArn: kotlin.String? = null
/**
* The identifier of the Wisdom assistant.
*/
public var assistantId: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the session.
*/
public var sessionArn: kotlin.String? = null
/**
* The identifier of the session.
*/
public var sessionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wisdom.model.SessionSummary) : this() {
this.assistantArn = x.assistantArn
this.assistantId = x.assistantId
this.sessionArn = x.sessionArn
this.sessionId = x.sessionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wisdom.model.SessionSummary = SessionSummary(this)
internal fun correctErrors(): Builder {
if (assistantArn == null) assistantArn = ""
if (assistantId == null) assistantId = ""
if (sessionArn == null) sessionArn = ""
if (sessionId == null) sessionId = ""
return this
}
}
}