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

commonMain.aws.sdk.kotlin.services.lexruntimev2.model.IntentResultEvent.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

/**
 * Contains the current state of the conversation between the client application and Amazon Lex V2.
 */
public class IntentResultEvent private constructor(builder: Builder) {
    /**
     * A unique identifier of the event sent by Amazon Lex V2. The identifier is in the form `RESPONSE-N`, where N is a number starting with one and incremented for each event sent by Amazon Lex V2 in the current session.
     */
    public val eventId: kotlin.String? = builder.eventId
    /**
     * Indicates whether the input to the operation was text, speech, or from a touch-tone keypad.
     */
    public val inputMode: aws.sdk.kotlin.services.lexruntimev2.model.InputMode? = builder.inputMode
    /**
     * 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
    /**
     * The bot member that is processing the intent.
     */
    public val recognizedBotMember: aws.sdk.kotlin.services.lexruntimev2.model.RecognizedBotMember? = builder.recognizedBotMember
    /**
     * The attributes sent in the request.
     */
    public val requestAttributes: Map? = builder.requestAttributes
    /**
     * The identifier of the session in use.
     */
    public val sessionId: kotlin.String? = builder.sessionId
    /**
     * The state of the user's session with Amazon Lex V2.
     */
    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.IntentResultEvent = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("IntentResultEvent(")
        append("eventId=$eventId,")
        append("inputMode=$inputMode,")
        append("interpretations=$interpretations,")
        append("recognizedBotMember=$recognizedBotMember,")
        append("requestAttributes=$requestAttributes,")
        append("sessionId=$sessionId,")
        append("sessionState=$sessionState")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = eventId?.hashCode() ?: 0
        result = 31 * result + (inputMode?.hashCode() ?: 0)
        result = 31 * result + (interpretations?.hashCode() ?: 0)
        result = 31 * result + (recognizedBotMember?.hashCode() ?: 0)
        result = 31 * result + (requestAttributes?.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 IntentResultEvent

        if (eventId != other.eventId) return false
        if (inputMode != other.inputMode) return false
        if (interpretations != other.interpretations) return false
        if (recognizedBotMember != other.recognizedBotMember) return false
        if (requestAttributes != other.requestAttributes) 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.IntentResultEvent = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A unique identifier of the event sent by Amazon Lex V2. The identifier is in the form `RESPONSE-N`, where N is a number starting with one and incremented for each event sent by Amazon Lex V2 in the current session.
         */
        public var eventId: kotlin.String? = null
        /**
         * Indicates whether the input to the operation was text, speech, or from a touch-tone keypad.
         */
        public var inputMode: aws.sdk.kotlin.services.lexruntimev2.model.InputMode? = null
        /**
         * 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
        /**
         * The bot member that is processing the intent.
         */
        public var recognizedBotMember: aws.sdk.kotlin.services.lexruntimev2.model.RecognizedBotMember? = null
        /**
         * The attributes sent in the request.
         */
        public var requestAttributes: Map? = null
        /**
         * The identifier of the session in use.
         */
        public var sessionId: kotlin.String? = null
        /**
         * The state of the user's session with Amazon Lex V2.
         */
        public var sessionState: aws.sdk.kotlin.services.lexruntimev2.model.SessionState? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.IntentResultEvent) : this() {
            this.eventId = x.eventId
            this.inputMode = x.inputMode
            this.interpretations = x.interpretations
            this.recognizedBotMember = x.recognizedBotMember
            this.requestAttributes = x.requestAttributes
            this.sessionId = x.sessionId
            this.sessionState = x.sessionState
        }

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

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

        /**
         * 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