
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequest.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 kotlinx.coroutines.flow.Flow
public class StartConversationRequest private constructor(builder: Builder) {
/**
* The alias identifier in use for the bot that processes the request.
*/
public val botAliasId: kotlin.String? = builder.botAliasId
/**
* The identifier of the bot to process the request.
*/
public val botId: kotlin.String? = builder.botId
/**
* The conversation type that you are using the Amazon Lex V2. If the conversation mode is `AUDIO` you can send both audio and DTMF information. If the mode is `TEXT` you can only send text.
*/
public val conversationMode: aws.sdk.kotlin.services.lexruntimev2.model.ConversationMode? = builder.conversationMode
/**
* The locale where the session is in use.
*/
public val localeId: kotlin.String? = builder.localeId
/**
* Represents the stream of events to Amazon Lex V2 from your application. The events are encoded as HTTP/2 data frames.
*/
public val requestEventStream: Flow? = builder.requestEventStream
/**
* The identifier of the user session that is having the conversation.
*/
public val sessionId: kotlin.String? = builder.sessionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StartConversationRequest(")
append("botAliasId=$botAliasId,")
append("botId=$botId,")
append("conversationMode=$conversationMode,")
append("localeId=$localeId,")
append("requestEventStream=$requestEventStream,")
append("sessionId=$sessionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = botAliasId?.hashCode() ?: 0
result = 31 * result + (botId?.hashCode() ?: 0)
result = 31 * result + (conversationMode?.hashCode() ?: 0)
result = 31 * result + (localeId?.hashCode() ?: 0)
result = 31 * result + (requestEventStream?.hashCode() ?: 0)
result = 31 * result + (sessionId?.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 StartConversationRequest
if (botAliasId != other.botAliasId) return false
if (botId != other.botId) return false
if (conversationMode != other.conversationMode) return false
if (localeId != other.localeId) return false
if (requestEventStream != other.requestEventStream) return false
if (sessionId != other.sessionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The alias identifier in use for the bot that processes the request.
*/
public var botAliasId: kotlin.String? = null
/**
* The identifier of the bot to process the request.
*/
public var botId: kotlin.String? = null
/**
* The conversation type that you are using the Amazon Lex V2. If the conversation mode is `AUDIO` you can send both audio and DTMF information. If the mode is `TEXT` you can only send text.
*/
public var conversationMode: aws.sdk.kotlin.services.lexruntimev2.model.ConversationMode? = null
/**
* The locale where the session is in use.
*/
public var localeId: kotlin.String? = null
/**
* Represents the stream of events to Amazon Lex V2 from your application. The events are encoded as HTTP/2 data frames.
*/
public var requestEventStream: Flow? = null
/**
* The identifier of the user session that is having the conversation.
*/
public var sessionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequest) : this() {
this.botAliasId = x.botAliasId
this.botId = x.botId
this.conversationMode = x.conversationMode
this.localeId = x.localeId
this.requestEventStream = x.requestEventStream
this.sessionId = x.sessionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.StartConversationRequest = StartConversationRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy