All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.lexruntimev2.model.HeartbeatEvent.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 that Amazon Lex V2 sends to indicate that the stream is still open between the client application and Amazon Lex V2
 */
public class HeartbeatEvent 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

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.HeartbeatEvent = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("HeartbeatEvent(")
        append("eventId=$eventId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var 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 HeartbeatEvent

        if (eventId != other.eventId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.HeartbeatEvent = 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

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.HeartbeatEvent) : this() {
            this.eventId = x.eventId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.HeartbeatEvent = HeartbeatEvent(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy