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

com.pulumi.azurenative.chaos.kotlin.inputs.StepArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.chaos.kotlin.inputs

import com.pulumi.azurenative.chaos.inputs.StepArgs.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

/**
 * Model that represents a step in the Experiment resource.
 * @property branches List of branches.
 * @property name String of the step name.
 */
public data class StepArgs(
    public val branches: Output>,
    public val name: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.chaos.inputs.StepArgs =
        com.pulumi.azurenative.chaos.inputs.StepArgs.builder()
            .branches(
                branches.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

    /**
     * @param value List of branches.
     */
    @JvmName("sicnyknfrwijfaph")
    public suspend fun branches(`value`: Output>) {
        this.branches = value
    }

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

    /**
     * @param values List of branches.
     */
    @JvmName("ukmqomnddyawqtbc")
    public suspend fun branches(values: List>) {
        this.branches = Output.all(values)
    }

    /**
     * @param value String of the step name.
     */
    @JvmName("iejgqtgdguqwgcsh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value List of branches.
     */
    @JvmName("gccrxbldpewjvdcr")
    public suspend fun branches(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.branches = mapped
    }

    /**
     * @param argument List of branches.
     */
    @JvmName("mbhyxqlcqhencjwt")
    public suspend fun branches(argument: List Unit>) {
        val toBeMapped = argument.toList().map { BranchArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.branches = mapped
    }

    /**
     * @param argument List of branches.
     */
    @JvmName("dvtehhtdishpofrc")
    public suspend fun branches(vararg argument: suspend BranchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { BranchArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.branches = mapped
    }

    /**
     * @param argument List of branches.
     */
    @JvmName("xvmnqnplxtkokjni")
    public suspend fun branches(argument: suspend BranchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BranchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.branches = mapped
    }

    /**
     * @param values List of branches.
     */
    @JvmName("xtpcltgbrkioxfhu")
    public suspend fun branches(vararg values: BranchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.branches = mapped
    }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy