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

commonMain.aws.sdk.kotlin.services.lexruntimev2.model.PutSessionResponse.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
import aws.smithy.kotlin.runtime.content.ByteStream

public class PutSessionResponse private constructor(builder: Builder) {
    /**
     * If the requested content type was audio, the audio version of the message to convey to the user.
     */
    public val audioStream: aws.smithy.kotlin.runtime.content.ByteStream? = builder.audioStream
    /**
     * The type of response. Same as the type specified in the `responseContentType` field in the request.
     */
    public val contentType: kotlin.String? = builder.contentType
    /**
     * A list of messages that were last sent to the user. The messages are ordered based on how you return the messages from you Lambda function or the order that the messages are defined in the bot.
     */
    public val messages: kotlin.String? = builder.messages
    /**
     * A base-64-encoded gzipped field that provides request-specific information passed between the client application and Amazon Lex V2. These are the same as the `requestAttribute` parameter in the call to the `PutSession` operation.
     */
    public val requestAttributes: kotlin.String? = builder.requestAttributes
    /**
     * The identifier of the session that received the data.
     */
    public val sessionId: kotlin.String? = builder.sessionId
    /**
     * A base-64-encoded gzipped field that represents the current state of the dialog between the user and the bot. Use this to determine the progress of the conversation and what the next action may be.
     */
    public val sessionState: kotlin.String? = builder.sessionState

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

    override fun toString(): kotlin.String = buildString {
        append("PutSessionResponse(")
        append("audioStream=$audioStream,")
        append("contentType=$contentType,")
        append("messages=$messages,")
        append("requestAttributes=$requestAttributes,")
        append("sessionId=$sessionId,")
        append("sessionState=$sessionState")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = audioStream?.hashCode() ?: 0
        result = 31 * result + (contentType?.hashCode() ?: 0)
        result = 31 * result + (messages?.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 PutSessionResponse

        if (audioStream != other.audioStream) return false
        if (contentType != other.contentType) return false
        if (messages != other.messages) 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.PutSessionResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * If the requested content type was audio, the audio version of the message to convey to the user.
         */
        public var audioStream: aws.smithy.kotlin.runtime.content.ByteStream? = null
        /**
         * The type of response. Same as the type specified in the `responseContentType` field in the request.
         */
        public var contentType: kotlin.String? = null
        /**
         * A list of messages that were last sent to the user. The messages are ordered based on how you return the messages from you Lambda function or the order that the messages are defined in the bot.
         */
        public var messages: kotlin.String? = null
        /**
         * A base-64-encoded gzipped field that provides request-specific information passed between the client application and Amazon Lex V2. These are the same as the `requestAttribute` parameter in the call to the `PutSession` operation.
         */
        public var requestAttributes: kotlin.String? = null
        /**
         * The identifier of the session that received the data.
         */
        public var sessionId: kotlin.String? = null
        /**
         * A base-64-encoded gzipped field that represents the current state of the dialog between the user and the bot. Use this to determine the progress of the conversation and what the next action may be.
         */
        public var sessionState: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.PutSessionResponse) : this() {
            this.audioStream = x.audioStream
            this.contentType = x.contentType
            this.messages = x.messages
            this.requestAttributes = x.requestAttributes
            this.sessionId = x.sessionId
            this.sessionState = x.sessionState
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy