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

com.pulumi.azure.chaosstudio.kotlin.inputs.ExperimentStepArgs.kt Maven / Gradle / Ivy

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

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

import com.pulumi.azure.chaosstudio.inputs.ExperimentStepArgs.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 branches One or more `branch` blocks as defined above.
 * @property name The name of the Step.
 */
public data class ExperimentStepArgs(
    public val branches: Output>,
    public val name: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.chaosstudio.inputs.ExperimentStepArgs =
        com.pulumi.azure.chaosstudio.inputs.ExperimentStepArgs.builder()
            .branches(
                branches.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

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

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

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

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

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

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

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

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

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

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

    internal fun build(): ExperimentStepArgs = ExperimentStepArgs(
        branches = branches ?: throw PulumiNullFieldException("branches"),
        name = name ?: throw PulumiNullFieldException("name"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy