All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.lexruntimev2.model.GetSessionResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.lexruntimev2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class GetSessionResponse private constructor(builder: Builder) {
    /**
     * A list of intents that Amazon Lex V2 determined might satisfy the user's utterance.
     *
     * Each interpretation includes the intent, a score that indicates how confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.
     */
    public val interpretations: List? = builder.interpretations
    /**
     * A list of messages that were last sent to the user. The messages are ordered based on the order that your returned the messages from your Lambda function or the order that messages are defined in the bot.
     */
    public val messages: List? = builder.messages
    /**
     * The identifier of the returned session.
     */
    public val sessionId: kotlin.String? = builder.sessionId
    /**
     * Represents the current state of the dialog between the user and the bot.
     *
     * You can use this to determine the progress of the conversation and what the next action might be.
     */
    public val sessionState: aws.sdk.kotlin.services.lexruntimev2.model.SessionState? = builder.sessionState

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.GetSessionResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetSessionResponse(")
        append("interpretations=$interpretations,")
        append("messages=$messages,")
        append("sessionId=$sessionId,")
        append("sessionState=$sessionState")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = interpretations?.hashCode() ?: 0
        result = 31 * result + (messages?.hashCode() ?: 0)
        result = 31 * result + (sessionId?.hashCode() ?: 0)
        result = 31 * result + (sessionState?.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 GetSessionResponse

        if (interpretations != other.interpretations) return false
        if (messages != other.messages) return false
        if (sessionId != other.sessionId) return false
        if (sessionState != other.sessionState) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.GetSessionResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A list of intents that Amazon Lex V2 determined might satisfy the user's utterance.
         *
         * Each interpretation includes the intent, a score that indicates how confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.
         */
        public var interpretations: List? = null
        /**
         * A list of messages that were last sent to the user. The messages are ordered based on the order that your returned the messages from your Lambda function or the order that messages are defined in the bot.
         */
        public var messages: List? = null
        /**
         * The identifier of the returned session.
         */
        public var sessionId: kotlin.String? = null
        /**
         * Represents the current state of the dialog between the user and the bot.
         *
         * You can use this to determine the progress of the conversation and what the next action might be.
         */
        public var sessionState: aws.sdk.kotlin.services.lexruntimev2.model.SessionState? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.GetSessionResponse) : this() {
            this.interpretations = x.interpretations
            this.messages = x.messages
            this.sessionId = x.sessionId
            this.sessionState = x.sessionState
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.GetSessionResponse = GetSessionResponse(this)

        /**
         * construct an [aws.sdk.kotlin.services.lexruntimev2.model.SessionState] inside the given [block]
         */
        public fun sessionState(block: aws.sdk.kotlin.services.lexruntimev2.model.SessionState.Builder.() -> kotlin.Unit) {
            this.sessionState = aws.sdk.kotlin.services.lexruntimev2.model.SessionState.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy