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

com.pulumi.azurenative.datafactory.kotlin.inputs.DatabricksSparkJarActivityArgs.kt Maven / Gradle / Ivy

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

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

import com.pulumi.azurenative.datafactory.inputs.DatabricksSparkJarActivityArgs.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.collections.Map
import kotlin.jvm.JvmName

/**
 * DatabricksSparkJar activity.
 * @property dependsOn Activity depends on condition.
 * @property description Activity description.
 * @property libraries A list of libraries to be installed on the cluster that will execute the job.
 * @property linkedServiceName Linked service reference.
 * @property mainClassName The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string).
 * @property name Activity name.
 * @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 parameters Parameters that will be passed to the main method.
 * @property policy Activity policy.
 * @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 'DatabricksSparkJar'.
 * @property userProperties Activity user properties.
 */
public data class DatabricksSparkJarActivityArgs(
    public val dependsOn: Output>? = null,
    public val description: Output? = null,
    public val libraries: Output>>? = null,
    public val linkedServiceName: Output? = null,
    public val mainClassName: Output,
    public val name: Output,
    public val onInactiveMarkAs: Output>? = null,
    public val parameters: Output>? = null,
    public val policy: 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.DatabricksSparkJarActivityArgs =
        com.pulumi.azurenative.datafactory.inputs.DatabricksSparkJarActivityArgs.builder()
            .dependsOn(
                dependsOn?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .libraries(
                libraries?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.map({ args0 ->
                            args0.key.to(args0.value)
                        }).toMap()
                    })
                }),
            )
            .linkedServiceName(linkedServiceName?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .mainClassName(mainClassName.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .onInactiveMarkAs(
                onInactiveMarkAs?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .parameters(parameters?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .policy(policy?.applyValue({ 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 [DatabricksSparkJarActivityArgs].
 */
@PulumiTagMarker
public class DatabricksSparkJarActivityArgsBuilder internal constructor() {
    private var dependsOn: Output>? = null

    private var description: Output? = null

    private var libraries: Output>>? = null

    private var linkedServiceName: Output? = null

    private var mainClassName: Output? = null

    private var name: Output? = null

    private var onInactiveMarkAs: Output>? = null

    private var parameters: Output>? = null

    private var policy: Output? = null

    private var state: Output>? = null

    private var type: Output? = null

    private var userProperties: Output>? = null

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

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

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

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

    /**
     * @param value A list of libraries to be installed on the cluster that will execute the job.
     */
    @JvmName("gatpfeqlciykoamj")
    public suspend fun libraries(`value`: Output>>) {
        this.libraries = value
    }

    @JvmName("xqyapsbhybrhhecx")
    public suspend fun libraries(vararg values: Output>) {
        this.libraries = Output.all(values.asList())
    }

    /**
     * @param values A list of libraries to be installed on the cluster that will execute the job.
     */
    @JvmName("ujkcrlunikocvpnl")
    public suspend fun libraries(values: List>>) {
        this.libraries = Output.all(values)
    }

    /**
     * @param value Linked service reference.
     */
    @JvmName("qpaelykmycoroqim")
    public suspend fun linkedServiceName(`value`: Output) {
        this.linkedServiceName = value
    }

    /**
     * @param value The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string).
     */
    @JvmName("cfwybltgeycbiifs")
    public suspend fun mainClassName(`value`: Output) {
        this.mainClassName = value
    }

    /**
     * @param value Activity name.
     */
    @JvmName("ijtoglnniybgcjud")
    public suspend fun name(`value`: Output) {
        this.name = 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("qdfekqwwihfovrud")
    public suspend fun onInactiveMarkAs(`value`: Output>) {
        this.onInactiveMarkAs = value
    }

    /**
     * @param value Parameters that will be passed to the main method.
     */
    @JvmName("eugbhbahifpplfjf")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param values Parameters that will be passed to the main method.
     */
    @JvmName("scooffstkmdkflbg")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

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

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

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

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

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

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

    /**
     * @param value Activity depends on condition.
     */
    @JvmName("qoymbbjkvcjnjjjx")
    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("joojukprpomlqkiq")
    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("qdihohdxrkqwyfsh")
    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("uevsadlvmvfrepgl")
    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("yyeexpwqprndidxh")
    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("tiqvgoiyxishyxhy")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A list of libraries to be installed on the cluster that will execute the job.
     */
    @JvmName("gmftqjdvhqqtijyf")
    public suspend fun libraries(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.libraries = mapped
    }

    /**
     * @param values A list of libraries to be installed on the cluster that will execute the job.
     */
    @JvmName("bbdtvjscgugrvcts")
    public suspend fun libraries(vararg values: Map) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.libraries = mapped
    }

    /**
     * @param value Linked service reference.
     */
    @JvmName("cduutcxkyjrbjdtj")
    public suspend fun linkedServiceName(`value`: LinkedServiceReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.linkedServiceName = mapped
    }

    /**
     * @param argument Linked service reference.
     */
    @JvmName("jbdqfwabonvwhblw")
    public suspend fun linkedServiceName(argument: suspend LinkedServiceReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = LinkedServiceReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.linkedServiceName = mapped
    }

    /**
     * @param value The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string).
     */
    @JvmName("wlcrbqcfktfgqeyw")
    public suspend fun mainClassName(`value`: Any) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mainClassName = mapped
    }

    /**
     * @param value Activity name.
     */
    @JvmName("oobmuveaoehvsklj")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = 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("pfkapnwpadkbrmrg")
    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("wspyifujuhigfjvn")
    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("wisbosysvmmwhbma")
    public fun onInactiveMarkAs(`value`: ActivityOnInactiveMarkAs) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.onInactiveMarkAs = mapped
    }

    /**
     * @param value Parameters that will be passed to the main method.
     */
    @JvmName("osxishfscilcxkmt")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values Parameters that will be passed to the main method.
     */
    @JvmName("clxfaotjdqwidfmp")
    public suspend fun parameters(vararg values: Any) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

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

    /**
     * @param argument Activity policy.
     */
    @JvmName("jyohwalpcahmvkvl")
    public suspend fun policy(argument: suspend ActivityPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = ActivityPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.policy = mapped
    }

    /**
     * @param value Activity state. This is an optional property and if not provided, the state will be Active by default.
     */
    @JvmName("rnbhwdjmyxdvttbu")
    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("qiqlakhepmbcfwio")
    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("ycpecdiovqjbxosq")
    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 'DatabricksSparkJar'.
     */
    @JvmName("umiuipdfxxwycndu")
    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("pcwxgvcneeohtfui")
    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("tgsahmhktpirjkrg")
    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("yxaorgelqonlrbqp")
    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("yikasdqaoqrewwcw")
    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("fawnykvxtxpmpyja")
    public suspend fun userProperties(vararg values: UserPropertyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userProperties = mapped
    }

    internal fun build(): DatabricksSparkJarActivityArgs = DatabricksSparkJarActivityArgs(
        dependsOn = dependsOn,
        description = description,
        libraries = libraries,
        linkedServiceName = linkedServiceName,
        mainClassName = mainClassName ?: throw PulumiNullFieldException("mainClassName"),
        name = name ?: throw PulumiNullFieldException("name"),
        onInactiveMarkAs = onInactiveMarkAs,
        parameters = parameters,
        policy = policy,
        state = state,
        type = type ?: throw PulumiNullFieldException("type"),
        userProperties = userProperties,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy