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

com.pulumi.aws.lex.kotlin.inputs.IntentFollowUpPromptPromptArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.aws.lex.inputs.IntentFollowUpPromptPromptArgs.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 maxAttempts The number of times to prompt the user for information. Must be a number between 1 and 5 (inclusive).
 * @property messages A set of messages, each of which provides a message string and its type.
 * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
 * Attributes are documented under message. Must contain between 1 and 15 messages.
 * @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.
 */
public data class IntentFollowUpPromptPromptArgs(
    public val maxAttempts: Output,
    public val messages: Output>,
    public val responseCard: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.lex.inputs.IntentFollowUpPromptPromptArgs =
        com.pulumi.aws.lex.inputs.IntentFollowUpPromptPromptArgs.builder()
            .maxAttempts(maxAttempts.applyValue({ args0 -> args0 }))
            .messages(
                messages.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .responseCard(responseCard?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IntentFollowUpPromptPromptArgs].
 */
@PulumiTagMarker
public class IntentFollowUpPromptPromptArgsBuilder internal constructor() {
    private var maxAttempts: Output? = null

    private var messages: Output>? = null

    private var responseCard: Output? = null

    /**
     * @param value The number of times to prompt the user for information. Must be a number between 1 and 5 (inclusive).
     */
    @JvmName("ahoqtpknmidvfkis")
    public suspend fun maxAttempts(`value`: Output) {
        this.maxAttempts = value
    }

    /**
     * @param value A set of messages, each of which provides a message string and its type.
     * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
     * Attributes are documented under message. Must contain between 1 and 15 messages.
     */
    @JvmName("sbkcrfksnthcbeac")
    public suspend fun messages(`value`: Output>) {
        this.messages = value
    }

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

    /**
     * @param values A set of messages, each of which provides a message string and its type.
     * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
     * Attributes are documented under message. Must contain between 1 and 15 messages.
     */
    @JvmName("jaaakiieicsjnpsl")
    public suspend fun messages(values: List>) {
        this.messages = Output.all(values)
    }

    /**
     * @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("vcipgfbopcorjpso")
    public suspend fun responseCard(`value`: Output) {
        this.responseCard = value
    }

    /**
     * @param value The number of times to prompt the user for information. Must be a number between 1 and 5 (inclusive).
     */
    @JvmName("rhusdpdrffbjevea")
    public suspend fun maxAttempts(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.maxAttempts = mapped
    }

    /**
     * @param value A set of messages, each of which provides a message string and its type.
     * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
     * Attributes are documented under message. Must contain between 1 and 15 messages.
     */
    @JvmName("mtltiyfiaguocxnm")
    public suspend fun messages(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.messages = mapped
    }

    /**
     * @param argument A set of messages, each of which provides a message string and its type.
     * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
     * Attributes are documented under message. Must contain between 1 and 15 messages.
     */
    @JvmName("oaeofsuehpwmnmkl")
    public suspend fun messages(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IntentFollowUpPromptPromptMessageArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.messages = mapped
    }

    /**
     * @param argument A set of messages, each of which provides a message string and its type.
     * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
     * Attributes are documented under message. Must contain between 1 and 15 messages.
     */
    @JvmName("yailshflbwensudf")
    public suspend fun messages(vararg argument: suspend IntentFollowUpPromptPromptMessageArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            IntentFollowUpPromptPromptMessageArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.messages = mapped
    }

    /**
     * @param argument A set of messages, each of which provides a message string and its type.
     * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
     * Attributes are documented under message. Must contain between 1 and 15 messages.
     */
    @JvmName("rjpgmsqaegddthdp")
    public suspend fun messages(argument: suspend IntentFollowUpPromptPromptMessageArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            IntentFollowUpPromptPromptMessageArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.messages = mapped
    }

    /**
     * @param values A set of messages, each of which provides a message string and its type.
     * You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML).
     * Attributes are documented under message. Must contain between 1 and 15 messages.
     */
    @JvmName("fmwpnenqelaocrfp")
    public suspend fun messages(vararg values: IntentFollowUpPromptPromptMessageArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.messages = 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("ohqxelgdhhrnoujp")
    public suspend fun responseCard(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseCard = mapped
    }

    internal fun build(): IntentFollowUpPromptPromptArgs = IntentFollowUpPromptPromptArgs(
        maxAttempts = maxAttempts ?: throw PulumiNullFieldException("maxAttempts"),
        messages = messages ?: throw PulumiNullFieldException("messages"),
        responseCard = responseCard,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy