
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.TranscriptEvent.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
/**
* Event sent from Amazon Lex V2 to your client application that contains a transcript of voice audio.
*/
public class TranscriptEvent 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
/**
* The transcript of the voice audio from the user.
*/
public val transcript: kotlin.String? = builder.transcript
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.TranscriptEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TranscriptEvent(")
append("eventId=$eventId,")
append("transcript=$transcript")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventId?.hashCode() ?: 0
result = 31 * result + (transcript?.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 TranscriptEvent
if (eventId != other.eventId) return false
if (transcript != other.transcript) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.TranscriptEvent = 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
/**
* The transcript of the voice audio from the user.
*/
public var transcript: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.TranscriptEvent) : this() {
this.eventId = x.eventId
this.transcript = x.transcript
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.TranscriptEvent = TranscriptEvent(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy