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

aws.sdk.kotlin.services.lexmodelsv2.model.SlotSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lexmodelsv2.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Summary information about a slot, a value that the bot elicits from
 * the user.
 */
class SlotSummary private constructor(builder: Builder) {
    /**
     * The description of the slot.
     */
    val description: kotlin.String? = builder.description
    /**
     * The timestamp of the last date and time that the slot was
     * updated.
     */
    val lastUpdatedDateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedDateTime
    /**
     * Whether the slot is required or optional. An intent is complete when
     * all required slots are filled.
     */
    val slotConstraint: aws.sdk.kotlin.services.lexmodelsv2.model.SlotConstraint? = builder.slotConstraint
    /**
     * The unique identifier of the slot.
     */
    val slotId: kotlin.String? = builder.slotId
    /**
     * The name given to the slot.
     */
    val slotName: kotlin.String? = builder.slotName
    /**
     * The unique identifier for the slot type that defines the values for
     * the slot.
     */
    val slotTypeId: kotlin.String? = builder.slotTypeId
    /**
     * Prompts that are sent to the user to elicit a value for the
     * slot.
     */
    val valueElicitationPromptSpecification: aws.sdk.kotlin.services.lexmodelsv2.model.PromptSpecification? = builder.valueElicitationPromptSpecification

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

    override fun toString(): kotlin.String = buildString {
        append("SlotSummary(")
        append("description=$description,")
        append("lastUpdatedDateTime=$lastUpdatedDateTime,")
        append("slotConstraint=$slotConstraint,")
        append("slotId=$slotId,")
        append("slotName=$slotName,")
        append("slotTypeId=$slotTypeId,")
        append("valueElicitationPromptSpecification=$valueElicitationPromptSpecification)")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (lastUpdatedDateTime?.hashCode() ?: 0)
        result = 31 * result + (slotConstraint?.hashCode() ?: 0)
        result = 31 * result + (slotId?.hashCode() ?: 0)
        result = 31 * result + (slotName?.hashCode() ?: 0)
        result = 31 * result + (slotTypeId?.hashCode() ?: 0)
        result = 31 * result + (valueElicitationPromptSpecification?.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 SlotSummary

        if (description != other.description) return false
        if (lastUpdatedDateTime != other.lastUpdatedDateTime) return false
        if (slotConstraint != other.slotConstraint) return false
        if (slotId != other.slotId) return false
        if (slotName != other.slotName) return false
        if (slotTypeId != other.slotTypeId) return false
        if (valueElicitationPromptSpecification != other.valueElicitationPromptSpecification) return false

        return true
    }

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

    class Builder {
        /**
         * The description of the slot.
         */
        var description: kotlin.String? = null
        /**
         * The timestamp of the last date and time that the slot was
         * updated.
         */
        var lastUpdatedDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Whether the slot is required or optional. An intent is complete when
         * all required slots are filled.
         */
        var slotConstraint: aws.sdk.kotlin.services.lexmodelsv2.model.SlotConstraint? = null
        /**
         * The unique identifier of the slot.
         */
        var slotId: kotlin.String? = null
        /**
         * The name given to the slot.
         */
        var slotName: kotlin.String? = null
        /**
         * The unique identifier for the slot type that defines the values for
         * the slot.
         */
        var slotTypeId: kotlin.String? = null
        /**
         * Prompts that are sent to the user to elicit a value for the
         * slot.
         */
        var valueElicitationPromptSpecification: aws.sdk.kotlin.services.lexmodelsv2.model.PromptSpecification? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexmodelsv2.model.SlotSummary) : this() {
            this.description = x.description
            this.lastUpdatedDateTime = x.lastUpdatedDateTime
            this.slotConstraint = x.slotConstraint
            this.slotId = x.slotId
            this.slotName = x.slotName
            this.slotTypeId = x.slotTypeId
            this.valueElicitationPromptSpecification = x.valueElicitationPromptSpecification
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.lexmodelsv2.model.PromptSpecification] inside the given [block]
         */
        fun valueElicitationPromptSpecification(block: aws.sdk.kotlin.services.lexmodelsv2.model.PromptSpecification.Builder.() -> kotlin.Unit) {
            this.valueElicitationPromptSpecification = aws.sdk.kotlin.services.lexmodelsv2.model.PromptSpecification.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy