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

com.pulumi.azurenative.datafactory.kotlin.inputs.HDInsightSparkActivityArgs.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.HDInsightSparkActivityArgs.builder
import com.pulumi.azurenative.datafactory.kotlin.enums.ActivityOnInactiveMarkAs
import com.pulumi.azurenative.datafactory.kotlin.enums.ActivityState
import com.pulumi.azurenative.datafactory.kotlin.enums.HDInsightActivityDebugInfoOption
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * HDInsight Spark activity.
 * @property arguments The user-specified arguments to HDInsightSparkActivity.
 * @property className The application's Java/Spark main class.
 * @property dependsOn Activity depends on condition.
 * @property description Activity description.
 * @property entryFilePath The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string).
 * @property getDebugInfo Debug info option.
 * @property linkedServiceName Linked service reference.
 * @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 policy Activity policy.
 * @property proxyUser The user to impersonate that will execute the job. Type: string (or Expression with resultType string).
 * @property rootPath The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
 * @property sparkConfig Spark configuration property.
 * @property sparkJobLinkedService The storage linked service for uploading the entry file and dependencies, and for receiving logs.
 * @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 'HDInsightSpark'.
 * @property userProperties Activity user properties.
 */
public data class HDInsightSparkActivityArgs(
    public val arguments: Output>? = null,
    public val className: Output? = null,
    public val dependsOn: Output>? = null,
    public val description: Output? = null,
    public val entryFilePath: Output,
    public val getDebugInfo: Output>? = null,
    public val linkedServiceName: Output? = null,
    public val name: Output,
    public val onInactiveMarkAs: Output>? = null,
    public val policy: Output? = null,
    public val proxyUser: Output? = null,
    public val rootPath: Output,
    public val sparkConfig: Output>? = null,
    public val sparkJobLinkedService: 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.HDInsightSparkActivityArgs =
        com.pulumi.azurenative.datafactory.inputs.HDInsightSparkActivityArgs.builder()
            .arguments(arguments?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .className(className?.applyValue({ args0 -> args0 }))
            .dependsOn(
                dependsOn?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .entryFilePath(entryFilePath.applyValue({ args0 -> args0 }))
            .getDebugInfo(
                getDebugInfo?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .linkedServiceName(linkedServiceName?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name.applyValue({ args0 -> args0 }))
            .onInactiveMarkAs(
                onInactiveMarkAs?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .policy(policy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .proxyUser(proxyUser?.applyValue({ args0 -> args0 }))
            .rootPath(rootPath.applyValue({ args0 -> args0 }))
            .sparkConfig(
                sparkConfig?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .sparkJobLinkedService(
                sparkJobLinkedService?.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 [HDInsightSparkActivityArgs].
 */
@PulumiTagMarker
public class HDInsightSparkActivityArgsBuilder internal constructor() {
    private var arguments: Output>? = null

    private var className: Output? = null

    private var dependsOn: Output>? = null

    private var description: Output? = null

    private var entryFilePath: Output? = null

    private var getDebugInfo: Output>? = null

    private var linkedServiceName: Output? = null

    private var name: Output? = null

    private var onInactiveMarkAs: Output>? = null

    private var policy: Output? = null

    private var proxyUser: Output? = null

    private var rootPath: Output? = null

    private var sparkConfig: Output>? = null

    private var sparkJobLinkedService: Output? = null

    private var state: Output>? = null

    private var type: Output? = null

    private var userProperties: Output>? = null

    /**
     * @param value The user-specified arguments to HDInsightSparkActivity.
     */
    @JvmName("gbqnnivotjqaqmda")
    public suspend fun arguments(`value`: Output>) {
        this.arguments = value
    }

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

    /**
     * @param values The user-specified arguments to HDInsightSparkActivity.
     */
    @JvmName("bqoiqnrrcfieuutk")
    public suspend fun arguments(values: List>) {
        this.arguments = Output.all(values)
    }

    /**
     * @param value The application's Java/Spark main class.
     */
    @JvmName("flwgyxcuivglpfhm")
    public suspend fun className(`value`: Output) {
        this.className = value
    }

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

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

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

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

    /**
     * @param value The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string).
     */
    @JvmName("qcbcpfmfuamkofoe")
    public suspend fun entryFilePath(`value`: Output) {
        this.entryFilePath = value
    }

    /**
     * @param value Debug info option.
     */
    @JvmName("qvnpvonhwcdhnvoa")
    public suspend fun getDebugInfo(`value`: Output>) {
        this.getDebugInfo = value
    }

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

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

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

    /**
     * @param value The user to impersonate that will execute the job. Type: string (or Expression with resultType string).
     */
    @JvmName("qosrgkaobduqrpll")
    public suspend fun proxyUser(`value`: Output) {
        this.proxyUser = value
    }

    /**
     * @param value The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
     */
    @JvmName("fkisqvicbordwnle")
    public suspend fun rootPath(`value`: Output) {
        this.rootPath = value
    }

    /**
     * @param value Spark configuration property.
     */
    @JvmName("qdkxdhdixhdledlb")
    public suspend fun sparkConfig(`value`: Output>) {
        this.sparkConfig = value
    }

    /**
     * @param value The storage linked service for uploading the entry file and dependencies, and for receiving logs.
     */
    @JvmName("ssyrxhoegyedxfgd")
    public suspend fun sparkJobLinkedService(`value`: Output) {
        this.sparkJobLinkedService = value
    }

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

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

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

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

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

    /**
     * @param value The user-specified arguments to HDInsightSparkActivity.
     */
    @JvmName("klbhpcgurmbwqkla")
    public suspend fun arguments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.arguments = mapped
    }

    /**
     * @param values The user-specified arguments to HDInsightSparkActivity.
     */
    @JvmName("ryryuxwccjbdivrn")
    public suspend fun arguments(vararg values: Any) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.arguments = mapped
    }

    /**
     * @param value The application's Java/Spark main class.
     */
    @JvmName("yqdqdfifnfbvluut")
    public suspend fun className(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.className = mapped
    }

    /**
     * @param value Activity depends on condition.
     */
    @JvmName("xnffvfyxcxwnbkoo")
    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("rajlpymecpckwuat")
    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("bbmvlebvsouhwkgk")
    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("ymwvllsgqgvpbfbw")
    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("ljfsloqwtcagkfty")
    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("xcqmloanfrboltna")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The relative path to the root folder of the code/package to be executed. Type: string (or Expression with resultType string).
     */
    @JvmName("oqtdheddosdusygd")
    public suspend fun entryFilePath(`value`: Any) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.entryFilePath = mapped
    }

    /**
     * @param value Debug info option.
     */
    @JvmName("oxyljywjoiddapxm")
    public suspend fun getDebugInfo(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.getDebugInfo = mapped
    }

    /**
     * @param value Debug info option.
     */
    @JvmName("kkvvwdgjqyhbnfbv")
    public fun getDebugInfo(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.getDebugInfo = mapped
    }

    /**
     * @param value Debug info option.
     */
    @JvmName("tyyplpiujebeltiv")
    public fun getDebugInfo(`value`: HDInsightActivityDebugInfoOption) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.getDebugInfo = mapped
    }

    /**
     * @param value Linked service reference.
     */
    @JvmName("ekftfrxuvnpdpmni")
    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("wcnwhokvcoeavqtc")
    public suspend fun linkedServiceName(argument: suspend LinkedServiceReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = LinkedServiceReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.linkedServiceName = mapped
    }

    /**
     * @param value Activity name.
     */
    @JvmName("lcsjsntqjisdqdwu")
    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("crbrmmvaakionpbt")
    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("yyxeonkccqlgmdlh")
    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("upuwhpcdvfypewog")
    public fun onInactiveMarkAs(`value`: ActivityOnInactiveMarkAs) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.onInactiveMarkAs = mapped
    }

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

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

    /**
     * @param value The user to impersonate that will execute the job. Type: string (or Expression with resultType string).
     */
    @JvmName("wwmdmmbgjrepkwca")
    public suspend fun proxyUser(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.proxyUser = mapped
    }

    /**
     * @param value The root path in 'sparkJobLinkedService' for all the job’s files. Type: string (or Expression with resultType string).
     */
    @JvmName("satsiotbrmauadir")
    public suspend fun rootPath(`value`: Any) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rootPath = mapped
    }

    /**
     * @param value Spark configuration property.
     */
    @JvmName("lfwavgiibrohptob")
    public suspend fun sparkConfig(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sparkConfig = mapped
    }

    /**
     * @param values Spark configuration property.
     */
    @JvmName("iooamafbxoygocod")
    public fun sparkConfig(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sparkConfig = mapped
    }

    /**
     * @param value The storage linked service for uploading the entry file and dependencies, and for receiving logs.
     */
    @JvmName("vplrkodwuqfkhdoa")
    public suspend fun sparkJobLinkedService(`value`: LinkedServiceReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sparkJobLinkedService = mapped
    }

    /**
     * @param argument The storage linked service for uploading the entry file and dependencies, and for receiving logs.
     */
    @JvmName("gwjbjhabgflgybsr")
    public suspend fun sparkJobLinkedService(argument: suspend LinkedServiceReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = LinkedServiceReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sparkJobLinkedService = mapped
    }

    /**
     * @param value Activity state. This is an optional property and if not provided, the state will be Active by default.
     */
    @JvmName("djuanftcfgjegvxm")
    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("pffmdmknojymskkv")
    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("xkeskgvwuybbqueb")
    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 'HDInsightSpark'.
     */
    @JvmName("mtrehohbbfltjttv")
    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("urltvnvcrnfjqtuu")
    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("rymidmfallmndswg")
    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("xkjxjvlknigtaafr")
    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("kugrmtpmvlfibfcy")
    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("nhlmkotglghtrftc")
    public suspend fun userProperties(vararg values: UserPropertyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userProperties = mapped
    }

    internal fun build(): HDInsightSparkActivityArgs = HDInsightSparkActivityArgs(
        arguments = arguments,
        className = className,
        dependsOn = dependsOn,
        description = description,
        entryFilePath = entryFilePath ?: throw PulumiNullFieldException("entryFilePath"),
        getDebugInfo = getDebugInfo,
        linkedServiceName = linkedServiceName,
        name = name ?: throw PulumiNullFieldException("name"),
        onInactiveMarkAs = onInactiveMarkAs,
        policy = policy,
        proxyUser = proxyUser,
        rootPath = rootPath ?: throw PulumiNullFieldException("rootPath"),
        sparkConfig = sparkConfig,
        sparkJobLinkedService = sparkJobLinkedService,
        state = state,
        type = type ?: throw PulumiNullFieldException("type"),
        userProperties = userProperties,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy