
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent.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
/**
* A notification from the client that it is disconnecting from Amazon Lex V2. Sending a `DisconnectionEvent` event is optional, but can help identify a conversation in logs.
*/
public class DisconnectionEvent 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DisconnectionEvent(")
append("clientTimestampMillis=$clientTimestampMillis,")
append("eventId=$eventId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientTimestampMillis.hashCode()
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 DisconnectionEvent
if (clientTimestampMillis != other.clientTimestampMillis) return false
if (eventId != other.eventId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent = 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent) : this() {
this.clientTimestampMillis = x.clientTimestampMillis
this.eventId = x.eventId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.DisconnectionEvent = DisconnectionEvent(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy