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

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

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

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



/**
 * Represents a stream of events between your application and Amazon Lex V2.
 */
public sealed class StartConversationRequestEventStream {
    /**
     * Speech audio sent from your client application to Amazon Lex V2. Audio starts accumulating when Amazon Lex V2 identifies a voice and continues until a natural pause in the speech is found before processing.
     */
    public data class AudioInputEvent(val value: aws.sdk.kotlin.services.lexruntimev2.model.AudioInputEvent) : aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequestEventStream() {
    }

    /**
     * Configuration information sent from your client application to Amazon Lex V2
     */
    public data class ConfigurationEvent(val value: aws.sdk.kotlin.services.lexruntimev2.model.ConfigurationEvent) : aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequestEventStream() {
    }

    /**
     * DTMF information sent to Amazon Lex V2 by your application. Amazon Lex V2 accumulates the DMTF information from when the user sends the first character and ends
     * + when there's a pause longer that the value configured for the end timeout.
     * + when there's a digit that is the configured end character.
     * + when Amazon Lex V2 accumulates characters equal to the maximum DTMF character configuration.
     */
    public data class DtmfInputEvent(val value: aws.sdk.kotlin.services.lexruntimev2.model.DtmfInputEvent) : aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequestEventStream() {
    }

    /**
     * Event sent from the client application to indicate to Amazon Lex V2 that the conversation is over.
     */
    public data class DisconnectionEvent(val value: aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent) : aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequestEventStream() {
    }

    /**
     * Event sent from the client application to Amazon Lex V2 to indicate that it has finished playing audio and that Amazon Lex V2 should start listening for user input.
     */
    public data class PlaybackCompletionEvent(val value: aws.sdk.kotlin.services.lexruntimev2.model.PlaybackCompletionEvent) : aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequestEventStream() {
    }

    /**
     * Text sent from your client application to Amazon Lex V2. Each `TextInputEvent` is processed individually.
     */
    public data class TextInputEvent(val value: aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent) : aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequestEventStream() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequestEventStream() {
    }

    /**
     * Casts this [StartConversationRequestEventStream] as a [AudioInputEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.AudioInputEvent] value. Throws an exception if the [StartConversationRequestEventStream] is not a
     * [AudioInputEvent].
     */
    public fun asAudioInputEvent(): aws.sdk.kotlin.services.lexruntimev2.model.AudioInputEvent = (this as StartConversationRequestEventStream.AudioInputEvent).value

    /**
     * Casts this [StartConversationRequestEventStream] as a [AudioInputEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.AudioInputEvent] value. Returns null if the [StartConversationRequestEventStream] is not a [AudioInputEvent].
     */
    public fun asAudioInputEventOrNull(): aws.sdk.kotlin.services.lexruntimev2.model.AudioInputEvent? = (this as? StartConversationRequestEventStream.AudioInputEvent)?.value

    /**
     * Casts this [StartConversationRequestEventStream] as a [ConfigurationEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.ConfigurationEvent] value. Throws an exception if the [StartConversationRequestEventStream] is not a
     * [ConfigurationEvent].
     */
    public fun asConfigurationEvent(): aws.sdk.kotlin.services.lexruntimev2.model.ConfigurationEvent = (this as StartConversationRequestEventStream.ConfigurationEvent).value

    /**
     * Casts this [StartConversationRequestEventStream] as a [ConfigurationEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.ConfigurationEvent] value. Returns null if the [StartConversationRequestEventStream] is not a [ConfigurationEvent].
     */
    public fun asConfigurationEventOrNull(): aws.sdk.kotlin.services.lexruntimev2.model.ConfigurationEvent? = (this as? StartConversationRequestEventStream.ConfigurationEvent)?.value

    /**
     * Casts this [StartConversationRequestEventStream] as a [DtmfInputEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.DtmfInputEvent] value. Throws an exception if the [StartConversationRequestEventStream] is not a
     * [DtmfInputEvent].
     */
    public fun asDtmfInputEvent(): aws.sdk.kotlin.services.lexruntimev2.model.DtmfInputEvent = (this as StartConversationRequestEventStream.DtmfInputEvent).value

    /**
     * Casts this [StartConversationRequestEventStream] as a [DtmfInputEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.DtmfInputEvent] value. Returns null if the [StartConversationRequestEventStream] is not a [DtmfInputEvent].
     */
    public fun asDtmfInputEventOrNull(): aws.sdk.kotlin.services.lexruntimev2.model.DtmfInputEvent? = (this as? StartConversationRequestEventStream.DtmfInputEvent)?.value

    /**
     * Casts this [StartConversationRequestEventStream] as a [DisconnectionEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent] value. Throws an exception if the [StartConversationRequestEventStream] is not a
     * [DisconnectionEvent].
     */
    public fun asDisconnectionEvent(): aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent = (this as StartConversationRequestEventStream.DisconnectionEvent).value

    /**
     * Casts this [StartConversationRequestEventStream] as a [DisconnectionEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent] value. Returns null if the [StartConversationRequestEventStream] is not a [DisconnectionEvent].
     */
    public fun asDisconnectionEventOrNull(): aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent? = (this as? StartConversationRequestEventStream.DisconnectionEvent)?.value

    /**
     * Casts this [StartConversationRequestEventStream] as a [PlaybackCompletionEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.PlaybackCompletionEvent] value. Throws an exception if the [StartConversationRequestEventStream] is not a
     * [PlaybackCompletionEvent].
     */
    public fun asPlaybackCompletionEvent(): aws.sdk.kotlin.services.lexruntimev2.model.PlaybackCompletionEvent = (this as StartConversationRequestEventStream.PlaybackCompletionEvent).value

    /**
     * Casts this [StartConversationRequestEventStream] as a [PlaybackCompletionEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.PlaybackCompletionEvent] value. Returns null if the [StartConversationRequestEventStream] is not a [PlaybackCompletionEvent].
     */
    public fun asPlaybackCompletionEventOrNull(): aws.sdk.kotlin.services.lexruntimev2.model.PlaybackCompletionEvent? = (this as? StartConversationRequestEventStream.PlaybackCompletionEvent)?.value

    /**
     * Casts this [StartConversationRequestEventStream] as a [TextInputEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent] value. Throws an exception if the [StartConversationRequestEventStream] is not a
     * [TextInputEvent].
     */
    public fun asTextInputEvent(): aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent = (this as StartConversationRequestEventStream.TextInputEvent).value

    /**
     * Casts this [StartConversationRequestEventStream] as a [TextInputEvent] and retrieves its [aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent] value. Returns null if the [StartConversationRequestEventStream] is not a [TextInputEvent].
     */
    public fun asTextInputEventOrNull(): aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent? = (this as? StartConversationRequestEventStream.TextInputEvent)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy