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

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

/**
 * A set of actions that Amazon Lex should run if the condition is matched.
 * @property condition Contains the expression to evaluate. If the condition is true, the branch's actions are taken.
 * @property name The name of the branch.
 * @property nextStep The next step in the conversation.
 * @property response Specifies a list of message groups that Amazon Lex uses to respond the user input.
 */
public data class BotConditionalBranchArgs(
    public val condition: Output,
    public val name: Output,
    public val nextStep: Output,
    public val response: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lex.inputs.BotConditionalBranchArgs =
        com.pulumi.awsnative.lex.inputs.BotConditionalBranchArgs.builder()
            .condition(condition.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name.applyValue({ args0 -> args0 }))
            .nextStep(nextStep.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .response(response?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [BotConditionalBranchArgs].
 */
@PulumiTagMarker
public class BotConditionalBranchArgsBuilder internal constructor() {
    private var condition: Output? = null

    private var name: Output? = null

    private var nextStep: Output? = null

    private var response: Output? = null

    /**
     * @param value Contains the expression to evaluate. If the condition is true, the branch's actions are taken.
     */
    @JvmName("simnrmqmrurldngg")
    public suspend fun condition(`value`: Output) {
        this.condition = value
    }

    /**
     * @param value The name of the branch.
     */
    @JvmName("vojacpbvxpvvcaja")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The next step in the conversation.
     */
    @JvmName("cfgoomcloytdcatr")
    public suspend fun nextStep(`value`: Output) {
        this.nextStep = value
    }

    /**
     * @param value Specifies a list of message groups that Amazon Lex uses to respond the user input.
     */
    @JvmName("cyalmppomqvymasx")
    public suspend fun response(`value`: Output) {
        this.response = value
    }

    /**
     * @param value Contains the expression to evaluate. If the condition is true, the branch's actions are taken.
     */
    @JvmName("mnmpngselsohlcww")
    public suspend fun condition(`value`: BotConditionArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.condition = mapped
    }

    /**
     * @param argument Contains the expression to evaluate. If the condition is true, the branch's actions are taken.
     */
    @JvmName("mmkxuodgtwannsns")
    public suspend fun condition(argument: suspend BotConditionArgsBuilder.() -> Unit) {
        val toBeMapped = BotConditionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.condition = mapped
    }

    /**
     * @param value The name of the branch.
     */
    @JvmName("jarqmqotnapotpdf")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The next step in the conversation.
     */
    @JvmName("bxwujcxtskxjmqwi")
    public suspend fun nextStep(`value`: BotDialogStateArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nextStep = mapped
    }

    /**
     * @param argument The next step in the conversation.
     */
    @JvmName("dbmgspumlhxniegu")
    public suspend fun nextStep(argument: suspend BotDialogStateArgsBuilder.() -> Unit) {
        val toBeMapped = BotDialogStateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.nextStep = mapped
    }

    /**
     * @param value Specifies a list of message groups that Amazon Lex uses to respond the user input.
     */
    @JvmName("ubfpywveifbmdhel")
    public suspend fun response(`value`: BotResponseSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.response = mapped
    }

    /**
     * @param argument Specifies a list of message groups that Amazon Lex uses to respond the user input.
     */
    @JvmName("yhgdleupsgqihlbp")
    public suspend fun response(argument: suspend BotResponseSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = BotResponseSpecificationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.response = mapped
    }

    internal fun build(): BotConditionalBranchArgs = BotConditionalBranchArgs(
        condition = condition ?: throw PulumiNullFieldException("condition"),
        name = name ?: throw PulumiNullFieldException("name"),
        nextStep = nextStep ?: throw PulumiNullFieldException("nextStep"),
        response = response,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy