
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.AudioResponseEvent.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
/**
* An event sent from Amazon Lex V2 to your client application containing audio to play to the user.
*/
public class AudioResponseEvent private constructor(builder: Builder) {
/**
* A chunk of the audio to play.
*/
public val audioChunk: kotlin.ByteArray? = builder.audioChunk
/**
* The encoding of the audio chunk. This is the same as the encoding configure in the `contentType` field of the `ConfigurationEvent`.
*/
public val contentType: kotlin.String? = builder.contentType
/**
* 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.AudioResponseEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AudioResponseEvent(")
append("audioChunk=$audioChunk,")
append("contentType=$contentType,")
append("eventId=$eventId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = audioChunk?.contentHashCode() ?: 0
result = 31 * result + (contentType?.hashCode() ?: 0)
result = 31 * result + (eventId?.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 AudioResponseEvent
if (audioChunk != null) {
if (other.audioChunk == null) return false
if (!audioChunk.contentEquals(other.audioChunk)) return false
} else if (other.audioChunk != null) return false
if (contentType != other.contentType) return false
if (eventId != other.eventId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.AudioResponseEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A chunk of the audio to play.
*/
public var audioChunk: kotlin.ByteArray? = null
/**
* The encoding of the audio chunk. This is the same as the encoding configure in the `contentType` field of the `ConfigurationEvent`.
*/
public var contentType: kotlin.String? = null
/**
* 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.AudioResponseEvent) : this() {
this.audioChunk = x.audioChunk
this.contentType = x.contentType
this.eventId = x.eventId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.AudioResponseEvent = AudioResponseEvent(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy