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

commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.FollowUpPrompt.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.lexmodelbuildingservice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A prompt for additional activity after an intent is fulfilled. For example, after the `OrderPizza` intent is fulfilled, you might prompt the user to find out whether the user wants to order drinks.
 */
public class FollowUpPrompt private constructor(builder: Builder) {
    /**
     * Prompts for information from the user.
     */
    public val prompt: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Prompt? = builder.prompt
    /**
     * If the user answers "no" to the question defined in the `prompt` field, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
     */
    public val rejectionStatement: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement? = builder.rejectionStatement

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

    override fun toString(): kotlin.String = buildString {
        append("FollowUpPrompt(")
        append("prompt=$prompt,")
        append("rejectionStatement=$rejectionStatement")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = prompt?.hashCode() ?: 0
        result = 31 * result + (rejectionStatement?.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 FollowUpPrompt

        if (prompt != other.prompt) return false
        if (rejectionStatement != other.rejectionStatement) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Prompts for information from the user.
         */
        public var prompt: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Prompt? = null
        /**
         * If the user answers "no" to the question defined in the `prompt` field, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
         */
        public var rejectionStatement: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Statement? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.FollowUpPrompt) : this() {
            this.prompt = x.prompt
            this.rejectionStatement = x.rejectionStatement
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy