
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.TextResponseEvent.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
/**
* The event sent from Amazon Lex V2 to your application with text to present to the user.
*/
public class TextResponseEvent 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
/**
* A list of messages to send to the user. Messages are ordered based on the order that you returned the messages from your Lambda function or the order that the messages are defined in the bot.
*/
public val messages: List? = builder.messages
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.TextResponseEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TextResponseEvent(")
append("eventId=$eventId,")
append("messages=$messages")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventId?.hashCode() ?: 0
result = 31 * result + (messages?.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 TextResponseEvent
if (eventId != other.eventId) return false
if (messages != other.messages) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.TextResponseEvent = 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
/**
* A list of messages to send to the user. Messages are ordered based on the order that you returned the messages from your Lambda function or the order that the messages are defined in the bot.
*/
public var messages: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.TextResponseEvent) : this() {
this.eventId = x.eventId
this.messages = x.messages
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.TextResponseEvent = TextResponseEvent(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy