
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent.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 your client application to Amazon Lex V2 with text input from the user.
*/
public class TextInputEvent private constructor(builder: Builder) {
/**
* A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.
*/
public val clientTimestampMillis: kotlin.Long = builder.clientTimestampMillis
/**
* A unique identifier that your application assigns to the event. You can use this to identify events in logs.
*/
public val eventId: kotlin.String? = builder.eventId
/**
* The text from the user. Amazon Lex V2 processes this as a complete statement.
*/
public val text: kotlin.String = requireNotNull(builder.text) { "A non-null value must be provided for text" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TextInputEvent(")
append("clientTimestampMillis=$clientTimestampMillis,")
append("eventId=$eventId,")
append("text=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientTimestampMillis.hashCode()
result = 31 * result + (eventId?.hashCode() ?: 0)
result = 31 * result + (text.hashCode())
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 TextInputEvent
if (clientTimestampMillis != other.clientTimestampMillis) return false
if (eventId != other.eventId) return false
if (text != other.text) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.
*/
public var clientTimestampMillis: kotlin.Long = 0L
/**
* A unique identifier that your application assigns to the event. You can use this to identify events in logs.
*/
public var eventId: kotlin.String? = null
/**
* The text from the user. Amazon Lex V2 processes this as a complete statement.
*/
public var text: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent) : this() {
this.clientTimestampMillis = x.clientTimestampMillis
this.eventId = x.eventId
this.text = x.text
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.TextInputEvent = TextInputEvent(this)
internal fun correctErrors(): Builder {
if (text == null) text = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy