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

com.pulumi.azurenative.datafactory.kotlin.inputs.SwitchActivityArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.datafactory.kotlin.inputs

import com.pulumi.azurenative.datafactory.inputs.SwitchActivityArgs.builder
import com.pulumi.azurenative.datafactory.kotlin.enums.ActivityOnInactiveMarkAs
import com.pulumi.azurenative.datafactory.kotlin.enums.ActivityState
import com.pulumi.core.Either
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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * This activity evaluates an expression and executes activities under the cases property that correspond to the expression evaluation expected in the equals property.
 * @property cases List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
 * @property defaultActivities List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
 * @property dependsOn Activity depends on condition.
 * @property description Activity description.
 * @property name Activity name.
 * @property on An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
 * @property onInactiveMarkAs Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
 * @property state Activity state. This is an optional property and if not provided, the state will be Active by default.
 * @property type Type of activity.
 * Expected value is 'Switch'.
 * @property userProperties Activity user properties.
 */
public data class SwitchActivityArgs(
    public val cases: Output>? = null,
    public val defaultActivities: Output>? = null,
    public val dependsOn: Output>? = null,
    public val description: Output? = null,
    public val name: Output,
    public val on: Output,
    public val onInactiveMarkAs: Output>? = null,
    public val state: Output>? = null,
    public val type: Output,
    public val userProperties: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.datafactory.inputs.SwitchActivityArgs =
        com.pulumi.azurenative.datafactory.inputs.SwitchActivityArgs.builder()
            .cases(cases?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .defaultActivities(defaultActivities?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .dependsOn(
                dependsOn?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .on(on.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .onInactiveMarkAs(
                onInactiveMarkAs?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .state(
                state?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 }))
            .userProperties(
                userProperties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var defaultActivities: Output>? = null

    private var dependsOn: Output>? = null

    private var description: Output? = null

    private var name: Output? = null

    private var on: Output? = null

    private var onInactiveMarkAs: Output>? = null

    private var state: Output>? = null

    private var type: Output? = null

    private var userProperties: Output>? = null

    /**
     * @param value List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     */
    @JvmName("ofsrxdajgumfjvng")
    public suspend fun cases(`value`: Output>) {
        this.cases = value
    }

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

    /**
     * @param values List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     */
    @JvmName("vstkahtypjqbbfqk")
    public suspend fun cases(values: List>) {
        this.cases = Output.all(values)
    }

    /**
     * @param value List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
     */
    @JvmName("avotfsxwskhqsudp")
    public suspend fun defaultActivities(`value`: Output>) {
        this.defaultActivities = value
    }

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

    /**
     * @param values List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
     */
    @JvmName("bnokkatgqujinypq")
    public suspend fun defaultActivities(values: List>) {
        this.defaultActivities = Output.all(values)
    }

    /**
     * @param value Activity depends on condition.
     */
    @JvmName("nvrsbuydpfxwkhth")
    public suspend fun dependsOn(`value`: Output>) {
        this.dependsOn = value
    }

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

    /**
     * @param values Activity depends on condition.
     */
    @JvmName("nmymghtxwyqxdlyl")
    public suspend fun dependsOn(values: List>) {
        this.dependsOn = Output.all(values)
    }

    /**
     * @param value Activity description.
     */
    @JvmName("xdefmntregblsyuh")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Activity name.
     */
    @JvmName("wefkrvelbfbmomlo")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
     */
    @JvmName("lmknhoymsqwxjanr")
    public suspend fun on(`value`: Output) {
        this.on = value
    }

    /**
     * @param value Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
     */
    @JvmName("lwldxhakmxpyeswn")
    public suspend fun onInactiveMarkAs(`value`: Output>) {
        this.onInactiveMarkAs = value
    }

    /**
     * @param value Activity state. This is an optional property and if not provided, the state will be Active by default.
     */
    @JvmName("fhudxwicpytepmyo")
    public suspend fun state(`value`: Output>) {
        this.state = value
    }

    /**
     * @param value Type of activity.
     * Expected value is 'Switch'.
     */
    @JvmName("olbwixgvvwogoofu")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Activity user properties.
     */
    @JvmName("xhfevlkkhltgyneh")
    public suspend fun userProperties(`value`: Output>) {
        this.userProperties = value
    }

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

    /**
     * @param values Activity user properties.
     */
    @JvmName("nqqogwwleaimrmsr")
    public suspend fun userProperties(values: List>) {
        this.userProperties = Output.all(values)
    }

    /**
     * @param value List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     */
    @JvmName("eoylhxdevljbtnhe")
    public suspend fun cases(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cases = mapped
    }

    /**
     * @param argument List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     */
    @JvmName("oaaipepwpcibnsql")
    public suspend fun cases(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SwitchCaseArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.cases = mapped
    }

    /**
     * @param argument List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     */
    @JvmName("iaquumbrxbdknaxh")
    public suspend fun cases(vararg argument: suspend SwitchCaseArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SwitchCaseArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.cases = mapped
    }

    /**
     * @param argument List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     */
    @JvmName("njwhcqkbswukbpqg")
    public suspend fun cases(argument: suspend SwitchCaseArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SwitchCaseArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.cases = mapped
    }

    /**
     * @param values List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.
     */
    @JvmName("snlxptdjoslkbkuo")
    public suspend fun cases(vararg values: SwitchCaseArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.cases = mapped
    }

    /**
     * @param value List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
     */
    @JvmName("yqbtjsekmfxigvld")
    public suspend fun defaultActivities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultActivities = mapped
    }

    /**
     * @param values List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.
     */
    @JvmName("wxrfsgrfvckwdtpo")
    public suspend fun defaultActivities(vararg values: Any) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultActivities = mapped
    }

    /**
     * @param value Activity depends on condition.
     */
    @JvmName("fthspmmecmftykqy")
    public suspend fun dependsOn(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dependsOn = mapped
    }

    /**
     * @param argument Activity depends on condition.
     */
    @JvmName("xgthdbnocwholdsj")
    public suspend fun dependsOn(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ActivityDependencyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dependsOn = mapped
    }

    /**
     * @param argument Activity depends on condition.
     */
    @JvmName("wdhhynbcgovffmab")
    public suspend fun dependsOn(vararg argument: suspend ActivityDependencyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ActivityDependencyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dependsOn = mapped
    }

    /**
     * @param argument Activity depends on condition.
     */
    @JvmName("ntrkrwekbybvkuja")
    public suspend fun dependsOn(argument: suspend ActivityDependencyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ActivityDependencyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.dependsOn = mapped
    }

    /**
     * @param values Activity depends on condition.
     */
    @JvmName("hitjnqhvykvcbepm")
    public suspend fun dependsOn(vararg values: ActivityDependencyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dependsOn = mapped
    }

    /**
     * @param value Activity description.
     */
    @JvmName("vkkmiyjvrjfptnrh")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

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

    /**
     * @param value An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
     */
    @JvmName("gbcjmwardxlaqngl")
    public suspend fun on(`value`: ExpressionArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.on = mapped
    }

    /**
     * @param argument An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.
     */
    @JvmName("vvcroxflgndrmhud")
    public suspend fun on(argument: suspend ExpressionArgsBuilder.() -> Unit) {
        val toBeMapped = ExpressionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.on = mapped
    }

    /**
     * @param value Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
     */
    @JvmName("phnflcueeigmpdes")
    public suspend fun onInactiveMarkAs(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.onInactiveMarkAs = mapped
    }

    /**
     * @param value Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
     */
    @JvmName("cftauerxitatlits")
    public fun onInactiveMarkAs(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.onInactiveMarkAs = mapped
    }

    /**
     * @param value Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.
     */
    @JvmName("bnplnwrypyjaivaj")
    public fun onInactiveMarkAs(`value`: ActivityOnInactiveMarkAs) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.onInactiveMarkAs = mapped
    }

    /**
     * @param value Activity state. This is an optional property and if not provided, the state will be Active by default.
     */
    @JvmName("mccvvyfqrxidyjey")
    public suspend fun state(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value Activity state. This is an optional property and if not provided, the state will be Active by default.
     */
    @JvmName("allxcxaggmwkrnql")
    public fun state(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value Activity state. This is an optional property and if not provided, the state will be Active by default.
     */
    @JvmName("nqixjebxtijgnwph")
    public fun state(`value`: ActivityState) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value Type of activity.
     * Expected value is 'Switch'.
     */
    @JvmName("lixvjgdgsqcngacs")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Activity user properties.
     */
    @JvmName("vfdpqlsodnusjyrr")
    public suspend fun userProperties(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userProperties = mapped
    }

    /**
     * @param argument Activity user properties.
     */
    @JvmName("odbtwhppttltmdtn")
    public suspend fun userProperties(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            UserPropertyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.userProperties = mapped
    }

    /**
     * @param argument Activity user properties.
     */
    @JvmName("hickmxmfhlircmfl")
    public suspend fun userProperties(vararg argument: suspend UserPropertyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            UserPropertyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.userProperties = mapped
    }

    /**
     * @param argument Activity user properties.
     */
    @JvmName("emeflkyargybrmxc")
    public suspend fun userProperties(argument: suspend UserPropertyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(UserPropertyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.userProperties = mapped
    }

    /**
     * @param values Activity user properties.
     */
    @JvmName("hypksuwcegeovghp")
    public suspend fun userProperties(vararg values: UserPropertyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userProperties = mapped
    }

    internal fun build(): SwitchActivityArgs = SwitchActivityArgs(
        cases = cases,
        defaultActivities = defaultActivities,
        dependsOn = dependsOn,
        description = description,
        name = name ?: throw PulumiNullFieldException("name"),
        on = on ?: throw PulumiNullFieldException("on"),
        onInactiveMarkAs = onInactiveMarkAs,
        state = state,
        type = type ?: throw PulumiNullFieldException("type"),
        userProperties = userProperties,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy