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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.awsnative.lex.inputs.BotLocaleArgs.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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A locale in the bot, which contains the intents and slot types that the bot uses in conversations with users in the specified language and locale.
 * @property customVocabulary Specifies a custom vocabulary to use with a specific locale.
 * @property description A description of the bot locale. Use this to help identify the bot locale in lists.
 * @property intents List of intents
 * @property localeId The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales.
 * @property nluConfidenceThreshold Determines the threshold where Amazon Lex will insert the `AMAZON.FallbackIntent` , `AMAZON.KendraSearchIntent` , or both when returning alternative intents. You must configure an `AMAZON.FallbackIntent` . `AMAZON.KendraSearchIntent` is only inserted if it is configured for the bot.
 * @property slotTypes List of SlotTypes
 * @property voiceSettings Defines settings for using an Amazon Polly voice to communicate with a user.
 */
public data class BotLocaleArgs(
    public val customVocabulary: Output? = null,
    public val description: Output? = null,
    public val intents: Output>? = null,
    public val localeId: Output,
    public val nluConfidenceThreshold: Output,
    public val slotTypes: Output>? = null,
    public val voiceSettings: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lex.inputs.BotLocaleArgs =
        com.pulumi.awsnative.lex.inputs.BotLocaleArgs.builder()
            .customVocabulary(customVocabulary?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .intents(
                intents?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .localeId(localeId.applyValue({ args0 -> args0 }))
            .nluConfidenceThreshold(nluConfidenceThreshold.applyValue({ args0 -> args0 }))
            .slotTypes(
                slotTypes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .voiceSettings(voiceSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [BotLocaleArgs].
 */
@PulumiTagMarker
public class BotLocaleArgsBuilder internal constructor() {
    private var customVocabulary: Output? = null

    private var description: Output? = null

    private var intents: Output>? = null

    private var localeId: Output? = null

    private var nluConfidenceThreshold: Output? = null

    private var slotTypes: Output>? = null

    private var voiceSettings: Output? = null

    /**
     * @param value Specifies a custom vocabulary to use with a specific locale.
     */
    @JvmName("drqwwqhntxkrwjvr")
    public suspend fun customVocabulary(`value`: Output) {
        this.customVocabulary = value
    }

    /**
     * @param value A description of the bot locale. Use this to help identify the bot locale in lists.
     */
    @JvmName("aiowcbxllwjfdusl")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value List of intents
     */
    @JvmName("khawtawyefybxlnn")
    public suspend fun intents(`value`: Output>) {
        this.intents = value
    }

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

    /**
     * @param values List of intents
     */
    @JvmName("eyfeasvyypkipgcs")
    public suspend fun intents(values: List>) {
        this.intents = Output.all(values)
    }

    /**
     * @param value The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales.
     */
    @JvmName("yvycldsotapydgrv")
    public suspend fun localeId(`value`: Output) {
        this.localeId = value
    }

    /**
     * @param value Determines the threshold where Amazon Lex will insert the `AMAZON.FallbackIntent` , `AMAZON.KendraSearchIntent` , or both when returning alternative intents. You must configure an `AMAZON.FallbackIntent` . `AMAZON.KendraSearchIntent` is only inserted if it is configured for the bot.
     */
    @JvmName("jnslfyonngtdtdac")
    public suspend fun nluConfidenceThreshold(`value`: Output) {
        this.nluConfidenceThreshold = value
    }

    /**
     * @param value List of SlotTypes
     */
    @JvmName("dotbimxdjaoibthq")
    public suspend fun slotTypes(`value`: Output>) {
        this.slotTypes = value
    }

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

    /**
     * @param values List of SlotTypes
     */
    @JvmName("cqjahfowxlexmfhm")
    public suspend fun slotTypes(values: List>) {
        this.slotTypes = Output.all(values)
    }

    /**
     * @param value Defines settings for using an Amazon Polly voice to communicate with a user.
     */
    @JvmName("nlbqesjlrwgovytv")
    public suspend fun voiceSettings(`value`: Output) {
        this.voiceSettings = value
    }

    /**
     * @param value Specifies a custom vocabulary to use with a specific locale.
     */
    @JvmName("lxpxtumqybvruqdw")
    public suspend fun customVocabulary(`value`: BotCustomVocabularyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customVocabulary = mapped
    }

    /**
     * @param argument Specifies a custom vocabulary to use with a specific locale.
     */
    @JvmName("lcnrnxbrshhiwcgm")
    public suspend fun customVocabulary(argument: suspend BotCustomVocabularyArgsBuilder.() -> Unit) {
        val toBeMapped = BotCustomVocabularyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.customVocabulary = mapped
    }

    /**
     * @param value A description of the bot locale. Use this to help identify the bot locale in lists.
     */
    @JvmName("ypbtcvxrmsuyqgpe")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value List of intents
     */
    @JvmName("oyyannhamxcfeuhc")
    public suspend fun intents(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.intents = mapped
    }

    /**
     * @param argument List of intents
     */
    @JvmName("idpdotwaijcshajd")
    public suspend fun intents(argument: List Unit>) {
        val toBeMapped = argument.toList().map { BotIntentArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.intents = mapped
    }

    /**
     * @param argument List of intents
     */
    @JvmName("mindwhxjoiybvdbh")
    public suspend fun intents(vararg argument: suspend BotIntentArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { BotIntentArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.intents = mapped
    }

    /**
     * @param argument List of intents
     */
    @JvmName("gntiwkeligjgxgqv")
    public suspend fun intents(argument: suspend BotIntentArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BotIntentArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.intents = mapped
    }

    /**
     * @param values List of intents
     */
    @JvmName("alawvujtyffymvpr")
    public suspend fun intents(vararg values: BotIntentArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.intents = mapped
    }

    /**
     * @param value The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales.
     */
    @JvmName("cipigrsmlmadxiti")
    public suspend fun localeId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.localeId = mapped
    }

    /**
     * @param value Determines the threshold where Amazon Lex will insert the `AMAZON.FallbackIntent` , `AMAZON.KendraSearchIntent` , or both when returning alternative intents. You must configure an `AMAZON.FallbackIntent` . `AMAZON.KendraSearchIntent` is only inserted if it is configured for the bot.
     */
    @JvmName("hbnmdripsjgvejmf")
    public suspend fun nluConfidenceThreshold(`value`: Double) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nluConfidenceThreshold = mapped
    }

    /**
     * @param value List of SlotTypes
     */
    @JvmName("vtnwccterhltgvxu")
    public suspend fun slotTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slotTypes = mapped
    }

    /**
     * @param argument List of SlotTypes
     */
    @JvmName("pwpwdwnmkmxfahxv")
    public suspend fun slotTypes(argument: List Unit>) {
        val toBeMapped = argument.toList().map { BotSlotTypeArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.slotTypes = mapped
    }

    /**
     * @param argument List of SlotTypes
     */
    @JvmName("miwfwnwawhbhqgbc")
    public suspend fun slotTypes(vararg argument: suspend BotSlotTypeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { BotSlotTypeArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.slotTypes = mapped
    }

    /**
     * @param argument List of SlotTypes
     */
    @JvmName("amltvdvrrxbnlmof")
    public suspend fun slotTypes(argument: suspend BotSlotTypeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BotSlotTypeArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.slotTypes = mapped
    }

    /**
     * @param values List of SlotTypes
     */
    @JvmName("jxvwvldhqbijxsve")
    public suspend fun slotTypes(vararg values: BotSlotTypeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.slotTypes = mapped
    }

    /**
     * @param value Defines settings for using an Amazon Polly voice to communicate with a user.
     */
    @JvmName("rxnmylljhkxmrrer")
    public suspend fun voiceSettings(`value`: BotVoiceSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.voiceSettings = mapped
    }

    /**
     * @param argument Defines settings for using an Amazon Polly voice to communicate with a user.
     */
    @JvmName("jcsqhfvybaqsdumv")
    public suspend fun voiceSettings(argument: suspend BotVoiceSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = BotVoiceSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.voiceSettings = mapped
    }

    internal fun build(): BotLocaleArgs = BotLocaleArgs(
        customVocabulary = customVocabulary,
        description = description,
        intents = intents,
        localeId = localeId ?: throw PulumiNullFieldException("localeId"),
        nluConfidenceThreshold = nluConfidenceThreshold ?: throw
            PulumiNullFieldException("nluConfidenceThreshold"),
        slotTypes = slotTypes,
        voiceSettings = voiceSettings,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy