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

com.pulumi.azure.chaosstudio.kotlin.inputs.ExperimentStepBranchArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.chaosstudio.kotlin.inputs

import com.pulumi.azure.chaosstudio.inputs.ExperimentStepBranchArgs.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.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property actions One or more `actions` blocks as defined above.
 * @property name The name of the branch.
 */
public data class ExperimentStepBranchArgs(
    public val actions: Output>,
    public val name: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.chaosstudio.inputs.ExperimentStepBranchArgs =
        com.pulumi.azure.chaosstudio.inputs.ExperimentStepBranchArgs.builder()
            .actions(
                actions.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

    /**
     * @param value One or more `actions` blocks as defined above.
     */
    @JvmName("clgivnqdwlnxhafa")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values One or more `actions` blocks as defined above.
     */
    @JvmName("ylidaqbnjpmwfqom")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

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

    /**
     * @param value One or more `actions` blocks as defined above.
     */
    @JvmName("fyqwwvfvwmdmsohd")
    public suspend fun actions(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param argument One or more `actions` blocks as defined above.
     */
    @JvmName("owswtibodvefgxji")
    public suspend fun actions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ExperimentStepBranchActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument One or more `actions` blocks as defined above.
     */
    @JvmName("yutkeqbhsthoxgtq")
    public suspend fun actions(vararg argument: suspend ExperimentStepBranchActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ExperimentStepBranchActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument One or more `actions` blocks as defined above.
     */
    @JvmName("kccbhtrtnvgkfsdy")
    public suspend fun actions(argument: suspend ExperimentStepBranchActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ExperimentStepBranchActionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param values One or more `actions` blocks as defined above.
     */
    @JvmName("euvsrjlsxgsvjtxh")
    public suspend fun actions(vararg values: ExperimentStepBranchActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

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

    internal fun build(): ExperimentStepBranchArgs = ExperimentStepBranchArgs(
        actions = actions ?: throw PulumiNullFieldException("actions"),
        name = name ?: throw PulumiNullFieldException("name"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy