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

com.pulumi.awsnative.lex.kotlin.inputs.BotSlotValueElicitationSettingArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.lex.kotlin.inputs

import com.pulumi.awsnative.lex.inputs.BotSlotValueElicitationSettingArgs.builder
import com.pulumi.awsnative.lex.kotlin.enums.BotSlotConstraint
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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Settings that you can use for eliciting a slot value.
 * @property defaultValueSpecification A list of default values for a slot.
 * @property promptSpecification The prompt that Amazon Lex uses to elicit the slot value from the user.
 * @property sampleUtterances If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
 * @property slotCaptureSetting Specifies the next stage in the conversation after capturing the slot.
 * @property slotConstraint Specifies whether the slot is required or optional.
 * @property waitAndContinueSpecification Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
 */
public data class BotSlotValueElicitationSettingArgs(
    public val defaultValueSpecification: Output? = null,
    public val promptSpecification: Output? = null,
    public val sampleUtterances: Output>? = null,
    public val slotCaptureSetting: Output? = null,
    public val slotConstraint: Output,
    public val waitAndContinueSpecification: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lex.inputs.BotSlotValueElicitationSettingArgs =
        com.pulumi.awsnative.lex.inputs.BotSlotValueElicitationSettingArgs.builder()
            .defaultValueSpecification(
                defaultValueSpecification?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .promptSpecification(
                promptSpecification?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .sampleUtterances(
                sampleUtterances?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .slotCaptureSetting(
                slotCaptureSetting?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .slotConstraint(slotConstraint.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .waitAndContinueSpecification(
                waitAndContinueSpecification?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            ).build()
}

/**
 * Builder for [BotSlotValueElicitationSettingArgs].
 */
@PulumiTagMarker
public class BotSlotValueElicitationSettingArgsBuilder internal constructor() {
    private var defaultValueSpecification: Output? = null

    private var promptSpecification: Output? = null

    private var sampleUtterances: Output>? = null

    private var slotCaptureSetting: Output? = null

    private var slotConstraint: Output? = null

    private var waitAndContinueSpecification: Output? = null

    /**
     * @param value A list of default values for a slot.
     */
    @JvmName("skmcsienlmkuccca")
    public suspend fun defaultValueSpecification(`value`: Output) {
        this.defaultValueSpecification = value
    }

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

    /**
     * @param value If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
     */
    @JvmName("iknttoelaxepjego")
    public suspend fun sampleUtterances(`value`: Output>) {
        this.sampleUtterances = value
    }

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

    /**
     * @param values If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
     */
    @JvmName("qxfbwftlkliccgun")
    public suspend fun sampleUtterances(values: List>) {
        this.sampleUtterances = Output.all(values)
    }

    /**
     * @param value Specifies the next stage in the conversation after capturing the slot.
     */
    @JvmName("gcacafevuytinoum")
    public suspend fun slotCaptureSetting(`value`: Output) {
        this.slotCaptureSetting = value
    }

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

    /**
     * @param value Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
     */
    @JvmName("koxujxwnuwtjnyxh")
    public suspend fun waitAndContinueSpecification(`value`: Output) {
        this.waitAndContinueSpecification = value
    }

    /**
     * @param value A list of default values for a slot.
     */
    @JvmName("perddirnksfmopif")
    public suspend fun defaultValueSpecification(`value`: BotSlotDefaultValueSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultValueSpecification = mapped
    }

    /**
     * @param argument A list of default values for a slot.
     */
    @JvmName("ptamfrpmarsridsh")
    public suspend fun defaultValueSpecification(argument: suspend BotSlotDefaultValueSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = BotSlotDefaultValueSpecificationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.defaultValueSpecification = mapped
    }

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

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

    /**
     * @param value If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
     */
    @JvmName("utwmogcmqgeptdgu")
    public suspend fun sampleUtterances(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sampleUtterances = mapped
    }

    /**
     * @param argument If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
     */
    @JvmName("vwlxtjcxlbtcqkww")
    public suspend fun sampleUtterances(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BotSampleUtteranceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.sampleUtterances = mapped
    }

    /**
     * @param argument If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
     */
    @JvmName("lmchqxjoliydxbko")
    public suspend fun sampleUtterances(vararg argument: suspend BotSampleUtteranceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BotSampleUtteranceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.sampleUtterances = mapped
    }

    /**
     * @param argument If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
     */
    @JvmName("kcheqoxoilepejfb")
    public suspend fun sampleUtterances(argument: suspend BotSampleUtteranceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BotSampleUtteranceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.sampleUtterances = mapped
    }

    /**
     * @param values If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy.
     */
    @JvmName("sjsmfjmfmcxrpqeg")
    public suspend fun sampleUtterances(vararg values: BotSampleUtteranceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sampleUtterances = mapped
    }

    /**
     * @param value Specifies the next stage in the conversation after capturing the slot.
     */
    @JvmName("kftklfhdnuqoswjq")
    public suspend fun slotCaptureSetting(`value`: BotSlotCaptureSettingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slotCaptureSetting = mapped
    }

    /**
     * @param argument Specifies the next stage in the conversation after capturing the slot.
     */
    @JvmName("ycgmyiimjxexvshj")
    public suspend fun slotCaptureSetting(argument: suspend BotSlotCaptureSettingArgsBuilder.() -> Unit) {
        val toBeMapped = BotSlotCaptureSettingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.slotCaptureSetting = mapped
    }

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

    /**
     * @param value Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
     */
    @JvmName("ybmlufldxnattptf")
    public suspend fun waitAndContinueSpecification(`value`: BotWaitAndContinueSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.waitAndContinueSpecification = mapped
    }

    /**
     * @param argument Specifies the prompts that Amazon Lex uses while a bot is waiting for customer input.
     */
    @JvmName("taqygcbulexhsvtb")
    public suspend fun waitAndContinueSpecification(argument: suspend BotWaitAndContinueSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = BotWaitAndContinueSpecificationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.waitAndContinueSpecification = mapped
    }

    internal fun build(): BotSlotValueElicitationSettingArgs = BotSlotValueElicitationSettingArgs(
        defaultValueSpecification = defaultValueSpecification,
        promptSpecification = promptSpecification,
        sampleUtterances = sampleUtterances,
        slotCaptureSetting = slotCaptureSetting,
        slotConstraint = slotConstraint ?: throw PulumiNullFieldException("slotConstraint"),
        waitAndContinueSpecification = waitAndContinueSpecification,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy