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

commonMain.aws.sdk.kotlin.services.lexruntimev2.model.DtmfInputEvent.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 DTMF character sent from the client application. DTMF characters are typically sent from a phone keypad to represent numbers. For example, you can have Amazon Lex V2 process a credit card number input from a phone.
 */
public class DtmfInputEvent 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 DTMF character that the user pressed. The allowed characters are A - D, 0 - 9, # and *.
     */
    public val inputCharacter: kotlin.String = requireNotNull(builder.inputCharacter) { "A non-null value must be provided for inputCharacter" }

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

    override fun toString(): kotlin.String = buildString {
        append("DtmfInputEvent(")
        append("clientTimestampMillis=$clientTimestampMillis,")
        append("eventId=$eventId,")
        append("inputCharacter=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientTimestampMillis.hashCode()
        result = 31 * result + (eventId?.hashCode() ?: 0)
        result = 31 * result + (inputCharacter.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 DtmfInputEvent

        if (clientTimestampMillis != other.clientTimestampMillis) return false
        if (eventId != other.eventId) return false
        if (inputCharacter != other.inputCharacter) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.DtmfInputEvent = 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 DTMF character that the user pressed. The allowed characters are A - D, 0 - 9, # and *.
         */
        public var inputCharacter: kotlin.String? = null

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

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

        internal fun correctErrors(): Builder {
            if (inputCharacter == null) inputCharacter = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy