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

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

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

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

import com.pulumi.awsnative.lex.inputs.BotFulfillmentStartResponseSpecificationArgs.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.Boolean
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides settings for a message that is sent to the user when a fulfillment Lambda function starts running.
 * @property allowInterrupt Determines whether the user can interrupt the start message while it is playing.
 * @property delayInSeconds The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
 * @property messageGroups 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
 */
public data class BotFulfillmentStartResponseSpecificationArgs(
    public val allowInterrupt: Output? = null,
    public val delayInSeconds: Output,
    public val messageGroups: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lex.inputs.BotFulfillmentStartResponseSpecificationArgs =
        com.pulumi.awsnative.lex.inputs.BotFulfillmentStartResponseSpecificationArgs.builder()
            .allowInterrupt(allowInterrupt?.applyValue({ args0 -> args0 }))
            .delayInSeconds(delayInSeconds.applyValue({ args0 -> args0 }))
            .messageGroups(
                messageGroups.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BotFulfillmentStartResponseSpecificationArgs].
 */
@PulumiTagMarker
public class BotFulfillmentStartResponseSpecificationArgsBuilder internal constructor() {
    private var allowInterrupt: Output? = null

    private var delayInSeconds: Output? = null

    private var messageGroups: Output>? = null

    /**
     * @param value Determines whether the user can interrupt the start message while it is playing.
     */
    @JvmName("rstshiloqehwugkt")
    public suspend fun allowInterrupt(`value`: Output) {
        this.allowInterrupt = value
    }

    /**
     * @param value The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
     */
    @JvmName("cwvyrebpphrgjbmw")
    public suspend fun delayInSeconds(`value`: Output) {
        this.delayInSeconds = value
    }

    /**
     * @param value 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
     */
    @JvmName("ohtdavfprysymyck")
    public suspend fun messageGroups(`value`: Output>) {
        this.messageGroups = value
    }

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

    /**
     * @param values 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
     */
    @JvmName("jkjxxmcigwxtyvpl")
    public suspend fun messageGroups(values: List>) {
        this.messageGroups = Output.all(values)
    }

    /**
     * @param value Determines whether the user can interrupt the start message while it is playing.
     */
    @JvmName("bvnqyahhpduwulpo")
    public suspend fun allowInterrupt(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowInterrupt = mapped
    }

    /**
     * @param value The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
     */
    @JvmName("hqdajqleyfmxfuyv")
    public suspend fun delayInSeconds(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.delayInSeconds = mapped
    }

    /**
     * @param value 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
     */
    @JvmName("yrglmrihhlcursue")
    public suspend fun messageGroups(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.messageGroups = mapped
    }

    /**
     * @param argument 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
     */
    @JvmName("hfikjyjymohbngng")
    public suspend fun messageGroups(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BotMessageGroupArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.messageGroups = mapped
    }

    /**
     * @param argument 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
     */
    @JvmName("uchgoywqrdgxpeek")
    public suspend fun messageGroups(vararg argument: suspend BotMessageGroupArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BotMessageGroupArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.messageGroups = mapped
    }

    /**
     * @param argument 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
     */
    @JvmName("vnwmjqtbaxmrhuui")
    public suspend fun messageGroups(argument: suspend BotMessageGroupArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BotMessageGroupArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.messageGroups = mapped
    }

    /**
     * @param values 1 - 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
     */
    @JvmName("xnfljnyuvxjfpblp")
    public suspend fun messageGroups(vararg values: BotMessageGroupArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.messageGroups = mapped
    }

    internal fun build(): BotFulfillmentStartResponseSpecificationArgs =
        BotFulfillmentStartResponseSpecificationArgs(
            allowInterrupt = allowInterrupt,
            delayInSeconds = delayInSeconds ?: throw PulumiNullFieldException("delayInSeconds"),
            messageGroups = messageGroups ?: throw PulumiNullFieldException("messageGroups"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy