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

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

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

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

/**
 * Provides a list of conditional branches. Branches are evaluated in the order that they are entered in the list. The first branch with a condition that evaluates to true is executed. The last branch in the list is the default branch. The default branch should not have any condition expression. The default branch is executed if no other branch has a matching condition.
 * @property conditionalBranches A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
 * @property defaultBranch The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
 * @property isActive Determines whether a conditional branch is active. When active is false, the conditions are not evaluated.
 */
public data class BotConditionalSpecificationArgs(
    public val conditionalBranches: Output>,
    public val defaultBranch: Output,
    public val isActive: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lex.inputs.BotConditionalSpecificationArgs =
        com.pulumi.awsnative.lex.inputs.BotConditionalSpecificationArgs.builder()
            .conditionalBranches(
                conditionalBranches.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .defaultBranch(defaultBranch.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .isActive(isActive.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BotConditionalSpecificationArgs].
 */
@PulumiTagMarker
public class BotConditionalSpecificationArgsBuilder internal constructor() {
    private var conditionalBranches: Output>? = null

    private var defaultBranch: Output? = null

    private var isActive: Output? = null

    /**
     * @param value A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
     */
    @JvmName("iagtvodekgmfbfhe")
    public suspend fun conditionalBranches(`value`: Output>) {
        this.conditionalBranches = value
    }

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

    /**
     * @param values A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
     */
    @JvmName("cutysvxmkfxhkpfd")
    public suspend fun conditionalBranches(values: List>) {
        this.conditionalBranches = Output.all(values)
    }

    /**
     * @param value The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
     */
    @JvmName("uuvhcgxbmvnkdqrp")
    public suspend fun defaultBranch(`value`: Output) {
        this.defaultBranch = value
    }

    /**
     * @param value Determines whether a conditional branch is active. When active is false, the conditions are not evaluated.
     */
    @JvmName("sjscmmvdbitpelqb")
    public suspend fun isActive(`value`: Output) {
        this.isActive = value
    }

    /**
     * @param value A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
     */
    @JvmName("iowhrfbvughniluu")
    public suspend fun conditionalBranches(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conditionalBranches = mapped
    }

    /**
     * @param argument A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
     */
    @JvmName("jlxcugdymeecicmb")
    public suspend fun conditionalBranches(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BotConditionalBranchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.conditionalBranches = mapped
    }

    /**
     * @param argument A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
     */
    @JvmName("qchowyuivwyrhjfe")
    public suspend fun conditionalBranches(vararg argument: suspend BotConditionalBranchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BotConditionalBranchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.conditionalBranches = mapped
    }

    /**
     * @param argument A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
     */
    @JvmName("ycsdtyiwoinxkcln")
    public suspend fun conditionalBranches(argument: suspend BotConditionalBranchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BotConditionalBranchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.conditionalBranches = mapped
    }

    /**
     * @param values A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
     */
    @JvmName("xxjrxjufkedcaory")
    public suspend fun conditionalBranches(vararg values: BotConditionalBranchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conditionalBranches = mapped
    }

    /**
     * @param value The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
     */
    @JvmName("bqlbfxithlxjyawy")
    public suspend fun defaultBranch(`value`: BotDefaultConditionalBranchArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultBranch = mapped
    }

    /**
     * @param argument The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
     */
    @JvmName("rwfxgwnkcuohgrad")
    public suspend fun defaultBranch(argument: suspend BotDefaultConditionalBranchArgsBuilder.() -> Unit) {
        val toBeMapped = BotDefaultConditionalBranchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.defaultBranch = mapped
    }

    /**
     * @param value Determines whether a conditional branch is active. When active is false, the conditions are not evaluated.
     */
    @JvmName("oiarqudnyhyubcgr")
    public suspend fun isActive(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.isActive = mapped
    }

    internal fun build(): BotConditionalSpecificationArgs = BotConditionalSpecificationArgs(
        conditionalBranches = conditionalBranches ?: throw PulumiNullFieldException("conditionalBranches"),
        defaultBranch = defaultBranch ?: throw PulumiNullFieldException("defaultBranch"),
        isActive = isActive ?: throw PulumiNullFieldException("isActive"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy