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

com.pulumi.azurenative.datafactory.kotlin.inputs.CustomActivityArgs.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.CustomActivityArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Custom activity type.
 * @property autoUserSpecification Elevation level and scope for the user, default is nonadmin task. Type: string (or Expression with resultType double).
 * @property command Command for custom activity Type: string (or Expression with resultType string).
 * @property dependsOn Activity depends on condition.
 * @property description Activity description.
 * @property extendedProperties User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined.
 * @property folderPath Folder path for resource files Type: string (or Expression with resultType string).
 * @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 referenceObjects Reference objects
 * @property resourceLinkedService Resource linked service reference.
 * @property retentionTimeInDays The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double).
 * @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 'Custom'.
 * @property userProperties Activity user properties.
 */
public data class CustomActivityArgs(
    public val autoUserSpecification: Output? = null,
    public val command: Output,
    public val dependsOn: Output>? = null,
    public val description: Output? = null,
    public val extendedProperties: Output>? = null,
    public val folderPath: Output? = null,
    public val linkedServiceName: Output? = null,
    public val name: Output,
    public val onInactiveMarkAs: Output>? = null,
    public val policy: Output? = null,
    public val referenceObjects: Output? = null,
    public val resourceLinkedService: Output? = null,
    public val retentionTimeInDays: 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.CustomActivityArgs =
        com.pulumi.azurenative.datafactory.inputs.CustomActivityArgs.builder()
            .autoUserSpecification(autoUserSpecification?.applyValue({ args0 -> args0 }))
            .command(command.applyValue({ args0 -> args0 }))
            .dependsOn(
                dependsOn?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .extendedProperties(
                extendedProperties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .folderPath(folderPath?.applyValue({ args0 -> args0 }))
            .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() }) }))
            .referenceObjects(referenceObjects?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceLinkedService(
                resourceLinkedService?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .retentionTimeInDays(retentionTimeInDays?.applyValue({ args0 -> args0 }))
            .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 [CustomActivityArgs].
 */
@PulumiTagMarker
public class CustomActivityArgsBuilder internal constructor() {
    private var autoUserSpecification: Output? = null

    private var command: Output? = null

    private var dependsOn: Output>? = null

    private var description: Output? = null

    private var extendedProperties: Output>? = null

    private var folderPath: Output? = null

    private var linkedServiceName: Output? = null

    private var name: Output? = null

    private var onInactiveMarkAs: Output>? = null

    private var policy: Output? = null

    private var referenceObjects: Output? = null

    private var resourceLinkedService: Output? = null

    private var retentionTimeInDays: Output? = null

    private var state: Output>? = null

    private var type: Output? = null

    private var userProperties: Output>? = null

    /**
     * @param value Elevation level and scope for the user, default is nonadmin task. Type: string (or Expression with resultType double).
     */
    @JvmName("cvrkvxjkffnfiele")
    public suspend fun autoUserSpecification(`value`: Output) {
        this.autoUserSpecification = value
    }

    /**
     * @param value Command for custom activity Type: string (or Expression with resultType string).
     */
    @JvmName("tkbovxlmrlnqsdes")
    public suspend fun command(`value`: Output) {
        this.command = value
    }

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

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

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

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

    /**
     * @param value User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined.
     */
    @JvmName("pcifroelerhsgjvg")
    public suspend fun extendedProperties(`value`: Output>) {
        this.extendedProperties = value
    }

    /**
     * @param value Folder path for resource files Type: string (or Expression with resultType string).
     */
    @JvmName("xpstyyqppcotstcj")
    public suspend fun folderPath(`value`: Output) {
        this.folderPath = value
    }

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

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

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

    /**
     * @param value Reference objects
     */
    @JvmName("botnnhmveydjnaqs")
    public suspend fun referenceObjects(`value`: Output) {
        this.referenceObjects = value
    }

    /**
     * @param value Resource linked service reference.
     */
    @JvmName("sajqhsrlupfnvgdq")
    public suspend fun resourceLinkedService(`value`: Output) {
        this.resourceLinkedService = value
    }

    /**
     * @param value The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double).
     */
    @JvmName("irosesippgunegdj")
    public suspend fun retentionTimeInDays(`value`: Output) {
        this.retentionTimeInDays = value
    }

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

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

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

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

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

    /**
     * @param value Elevation level and scope for the user, default is nonadmin task. Type: string (or Expression with resultType double).
     */
    @JvmName("mryknfjacxyikpbn")
    public suspend fun autoUserSpecification(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoUserSpecification = mapped
    }

    /**
     * @param value Command for custom activity Type: string (or Expression with resultType string).
     */
    @JvmName("aioctnscdsskctoo")
    public suspend fun command(`value`: Any) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.command = mapped
    }

    /**
     * @param value Activity depends on condition.
     */
    @JvmName("rybnkbbvtatkkpda")
    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("xvsjnqnvnmhqxdxa")
    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("jogqjwjkwtcofibx")
    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("gxduxpcfvkutqnfg")
    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("cbpmbfivaysadijm")
    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("eghrlimvugerlrgl")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined.
     */
    @JvmName("wtjwcvjecjgylwyq")
    public suspend fun extendedProperties(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedProperties = mapped
    }

    /**
     * @param values User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined.
     */
    @JvmName("okbpohpdjinlyydc")
    public fun extendedProperties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.extendedProperties = mapped
    }

    /**
     * @param value Folder path for resource files Type: string (or Expression with resultType string).
     */
    @JvmName("biwreidltfettywc")
    public suspend fun folderPath(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.folderPath = mapped
    }

    /**
     * @param value Linked service reference.
     */
    @JvmName("qlutxcvylbvctgta")
    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("mtufsbnnkdfkwcyk")
    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("qefwknckqqorvpsq")
    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("lrccagwsuddxukhx")
    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("tprawxcvgqtjlrme")
    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("iucsciudeyucjbdv")
    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("inhqoelksumjxlif")
    public suspend fun policy(`value`: ActivityPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

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

    /**
     * @param value Reference objects
     */
    @JvmName("oeuldskthmvgtyyl")
    public suspend fun referenceObjects(`value`: CustomActivityReferenceObjectArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.referenceObjects = mapped
    }

    /**
     * @param argument Reference objects
     */
    @JvmName("pydmrobfdnldmtdl")
    public suspend fun referenceObjects(argument: suspend CustomActivityReferenceObjectArgsBuilder.() -> Unit) {
        val toBeMapped = CustomActivityReferenceObjectArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.referenceObjects = mapped
    }

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

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

    /**
     * @param value The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double).
     */
    @JvmName("nrkunindwrfpbodm")
    public suspend fun retentionTimeInDays(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionTimeInDays = mapped
    }

    /**
     * @param value Activity state. This is an optional property and if not provided, the state will be Active by default.
     */
    @JvmName("pnpaxmmgniwcwsfo")
    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("gdxhkayjxmcgdgtn")
    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("fsqqrxwyaftamwku")
    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 'Custom'.
     */
    @JvmName("gisxtpmfggbrjaof")
    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("qytnsjyofmiarnuw")
    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("crycadgyigmepdvx")
    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("btvptytcfmoxnfgk")
    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("mogtvfjexbtbobte")
    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("sejhsfwtertediia")
    public suspend fun userProperties(vararg values: UserPropertyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userProperties = mapped
    }

    internal fun build(): CustomActivityArgs = CustomActivityArgs(
        autoUserSpecification = autoUserSpecification,
        command = command ?: throw PulumiNullFieldException("command"),
        dependsOn = dependsOn,
        description = description,
        extendedProperties = extendedProperties,
        folderPath = folderPath,
        linkedServiceName = linkedServiceName,
        name = name ?: throw PulumiNullFieldException("name"),
        onInactiveMarkAs = onInactiveMarkAs,
        policy = policy,
        referenceObjects = referenceObjects,
        resourceLinkedService = resourceLinkedService,
        retentionTimeInDays = retentionTimeInDays,
        state = state,
        type = type ?: throw PulumiNullFieldException("type"),
        userProperties = userProperties,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy