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

commonMain.aws.sdk.kotlin.services.lexruntimev2.model.Value.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.lexruntimev2.model



/**
 * The value of a slot.
 */
public class Value private constructor(builder: Builder) {
    /**
     * The value that Amazon Lex V2 determines for the slot. The actual value depends on the setting of the value selection strategy for the bot. You can choose to use the value entered by the user, or you can have Amazon Lex V2 choose the first value in the `resolvedValues` list.
     */
    public val interpretedValue: kotlin.String? = builder.interpretedValue
    /**
     * The text of the utterance from the user that was entered for the slot.
     */
    public val originalValue: kotlin.String? = builder.originalValue
    /**
     * A list of additional values that have been recognized for the slot.
     */
    public val resolvedValues: List? = builder.resolvedValues

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

    override fun toString(): kotlin.String = buildString {
        append("Value(")
        append("interpretedValue=$interpretedValue,")
        append("originalValue=$originalValue,")
        append("resolvedValues=$resolvedValues")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = interpretedValue?.hashCode() ?: 0
        result = 31 * result + (originalValue?.hashCode() ?: 0)
        result = 31 * result + (resolvedValues?.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 Value

        if (interpretedValue != other.interpretedValue) return false
        if (originalValue != other.originalValue) return false
        if (resolvedValues != other.resolvedValues) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.Value = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The value that Amazon Lex V2 determines for the slot. The actual value depends on the setting of the value selection strategy for the bot. You can choose to use the value entered by the user, or you can have Amazon Lex V2 choose the first value in the `resolvedValues` list.
         */
        public var interpretedValue: kotlin.String? = null
        /**
         * The text of the utterance from the user that was entered for the slot.
         */
        public var originalValue: kotlin.String? = null
        /**
         * A list of additional values that have been recognized for the slot.
         */
        public var resolvedValues: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.Value) : this() {
            this.interpretedValue = x.interpretedValue
            this.originalValue = x.originalValue
            this.resolvedValues = x.resolvedValues
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy