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

com.pulumi.aws.lex.kotlin.inputs.IntentSlotArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.lex.kotlin.inputs

import com.pulumi.aws.lex.inputs.IntentSlotArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property description A description of the bot. Must be less than or equal to 200 characters in length.
 * @property name The name of the intent slot that you want to create. The name is case sensitive. Must be less than or equal to 100 characters in length.
 * @property priority Directs Lex the order in which to elicit this slot value from the user.
 * For example, if the intent has two slots with priorities 1 and 2, AWS Lex first elicits a value for
 * the slot with priority 1. If multiple slots share the same priority, the order in which Lex elicits
 * values is arbitrary. Must be between 1 and 100.
 * @property responseCard The response card. Amazon Lex will substitute session attributes and
 * slot values into the response card. For more information, see
 * [Example: Using a Response Card](https://docs.aws.amazon.com/lex/latest/dg/ex-resp-card.html). Must be less than or equal to 50000 characters in length.
 * @property sampleUtterances If you know a specific pattern with which users might respond to
 * an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This
 * is optional. In most cases, Amazon Lex is capable of understanding user utterances. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
 * @property slotConstraint Specifies whether the slot is required or optional.
 * @property slotType The type of the slot, either a custom slot type that you defined or one of
 * the built-in slot types. Must be less than or equal to 100 characters in length.
 * @property slotTypeVersion The version of the slot type. Must be less than or equal to 64 characters in length.
 * @property valueElicitationPrompt The prompt that Amazon Lex uses to elicit the slot value
 * from the user. Attributes are documented under prompt.
 */
public data class IntentSlotArgs(
    public val description: Output? = null,
    public val name: Output,
    public val priority: Output? = null,
    public val responseCard: Output? = null,
    public val sampleUtterances: Output>? = null,
    public val slotConstraint: Output,
    public val slotType: Output,
    public val slotTypeVersion: Output? = null,
    public val valueElicitationPrompt: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.lex.inputs.IntentSlotArgs =
        com.pulumi.aws.lex.inputs.IntentSlotArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .responseCard(responseCard?.applyValue({ args0 -> args0 }))
            .sampleUtterances(sampleUtterances?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .slotConstraint(slotConstraint.applyValue({ args0 -> args0 }))
            .slotType(slotType.applyValue({ args0 -> args0 }))
            .slotTypeVersion(slotTypeVersion?.applyValue({ args0 -> args0 }))
            .valueElicitationPrompt(
                valueElicitationPrompt?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [IntentSlotArgs].
 */
@PulumiTagMarker
public class IntentSlotArgsBuilder internal constructor() {
    private var description: Output? = null

    private var name: Output? = null

    private var priority: Output? = null

    private var responseCard: Output? = null

    private var sampleUtterances: Output>? = null

    private var slotConstraint: Output? = null

    private var slotType: Output? = null

    private var slotTypeVersion: Output? = null

    private var valueElicitationPrompt: Output? = null

    /**
     * @param value A description of the bot. Must be less than or equal to 200 characters in length.
     */
    @JvmName("wfwflitlgttnrmmd")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name of the intent slot that you want to create. The name is case sensitive. Must be less than or equal to 100 characters in length.
     */
    @JvmName("avodntxkwrrtwnod")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Directs Lex the order in which to elicit this slot value from the user.
     * For example, if the intent has two slots with priorities 1 and 2, AWS Lex first elicits a value for
     * the slot with priority 1. If multiple slots share the same priority, the order in which Lex elicits
     * values is arbitrary. Must be between 1 and 100.
     */
    @JvmName("wxjdyoevnqgsyvai")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value The response card. Amazon Lex will substitute session attributes and
     * slot values into the response card. For more information, see
     * [Example: Using a Response Card](https://docs.aws.amazon.com/lex/latest/dg/ex-resp-card.html). Must be less than or equal to 50000 characters in length.
     */
    @JvmName("wtidicuwumycmwfv")
    public suspend fun responseCard(`value`: Output) {
        this.responseCard = value
    }

    /**
     * @param value If you know a specific pattern with which users might respond to
     * an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This
     * is optional. In most cases, Amazon Lex is capable of understanding user utterances. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
     */
    @JvmName("upntdqsufvghwroc")
    public suspend fun sampleUtterances(`value`: Output>) {
        this.sampleUtterances = value
    }

    @JvmName("euksnbroyxfdvdlw")
    public suspend fun sampleUtterances(vararg values: Output) {
        this.sampleUtterances = Output.all(values.asList())
    }

    /**
     * @param values If you know a specific pattern with which users might respond to
     * an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This
     * is optional. In most cases, Amazon Lex is capable of understanding user utterances. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
     */
    @JvmName("pvwigwmfrnthwkke")
    public suspend fun sampleUtterances(values: List>) {
        this.sampleUtterances = Output.all(values)
    }

    /**
     * @param value Specifies whether the slot is required or optional.
     */
    @JvmName("siyhgmmhpkqrhnjb")
    public suspend fun slotConstraint(`value`: Output) {
        this.slotConstraint = value
    }

    /**
     * @param value The type of the slot, either a custom slot type that you defined or one of
     * the built-in slot types. Must be less than or equal to 100 characters in length.
     */
    @JvmName("xiekpofxoufxhjud")
    public suspend fun slotType(`value`: Output) {
        this.slotType = value
    }

    /**
     * @param value The version of the slot type. Must be less than or equal to 64 characters in length.
     */
    @JvmName("ulunbyahuolqtrif")
    public suspend fun slotTypeVersion(`value`: Output) {
        this.slotTypeVersion = value
    }

    /**
     * @param value The prompt that Amazon Lex uses to elicit the slot value
     * from the user. Attributes are documented under prompt.
     */
    @JvmName("ecuegvgyeyjlynfi")
    public suspend fun valueElicitationPrompt(`value`: Output) {
        this.valueElicitationPrompt = value
    }

    /**
     * @param value A description of the bot. Must be less than or equal to 200 characters in length.
     */
    @JvmName("vsxqmuawejecetin")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The name of the intent slot that you want to create. The name is case sensitive. Must be less than or equal to 100 characters in length.
     */
    @JvmName("yoawtspfytqtybqq")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Directs Lex the order in which to elicit this slot value from the user.
     * For example, if the intent has two slots with priorities 1 and 2, AWS Lex first elicits a value for
     * the slot with priority 1. If multiple slots share the same priority, the order in which Lex elicits
     * values is arbitrary. Must be between 1 and 100.
     */
    @JvmName("umbbxjiblgnombgy")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value The response card. Amazon Lex will substitute session attributes and
     * slot values into the response card. For more information, see
     * [Example: Using a Response Card](https://docs.aws.amazon.com/lex/latest/dg/ex-resp-card.html). Must be less than or equal to 50000 characters in length.
     */
    @JvmName("vvixansirxmxbmrl")
    public suspend fun responseCard(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseCard = mapped
    }

    /**
     * @param value If you know a specific pattern with which users might respond to
     * an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This
     * is optional. In most cases, Amazon Lex is capable of understanding user utterances. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
     */
    @JvmName("cyiivgcskjtfsgvv")
    public suspend fun sampleUtterances(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sampleUtterances = mapped
    }

    /**
     * @param values If you know a specific pattern with which users might respond to
     * an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This
     * is optional. In most cases, Amazon Lex is capable of understanding user utterances. Must have between 1 and 10 items in the list, and each item must be less than or equal to 200 characters in length.
     */
    @JvmName("dbnxcupodhuhkvlr")
    public suspend fun sampleUtterances(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sampleUtterances = mapped
    }

    /**
     * @param value Specifies whether the slot is required or optional.
     */
    @JvmName("rxljpcjsurojubma")
    public suspend fun slotConstraint(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.slotConstraint = mapped
    }

    /**
     * @param value The type of the slot, either a custom slot type that you defined or one of
     * the built-in slot types. Must be less than or equal to 100 characters in length.
     */
    @JvmName("lqfetmmbfqqphbhg")
    public suspend fun slotType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.slotType = mapped
    }

    /**
     * @param value The version of the slot type. Must be less than or equal to 64 characters in length.
     */
    @JvmName("egumdqwbtdkbrpop")
    public suspend fun slotTypeVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slotTypeVersion = mapped
    }

    /**
     * @param value The prompt that Amazon Lex uses to elicit the slot value
     * from the user. Attributes are documented under prompt.
     */
    @JvmName("nkvamnggbsyculkf")
    public suspend fun valueElicitationPrompt(`value`: IntentSlotValueElicitationPromptArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.valueElicitationPrompt = mapped
    }

    /**
     * @param argument The prompt that Amazon Lex uses to elicit the slot value
     * from the user. Attributes are documented under prompt.
     */
    @JvmName("gmactjobmieujyrx")
    public suspend fun valueElicitationPrompt(argument: suspend IntentSlotValueElicitationPromptArgsBuilder.() -> Unit) {
        val toBeMapped = IntentSlotValueElicitationPromptArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.valueElicitationPrompt = mapped
    }

    internal fun build(): IntentSlotArgs = IntentSlotArgs(
        description = description,
        name = name ?: throw PulumiNullFieldException("name"),
        priority = priority,
        responseCard = responseCard,
        sampleUtterances = sampleUtterances,
        slotConstraint = slotConstraint ?: throw PulumiNullFieldException("slotConstraint"),
        slotType = slotType ?: throw PulumiNullFieldException("slotType"),
        slotTypeVersion = slotTypeVersion,
        valueElicitationPrompt = valueElicitationPrompt,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy