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

com.pulumi.azurenative.datafactory.kotlin.inputs.AzureFunctionActivityArgs.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.AzureFunctionActivityArgs.builder
import com.pulumi.azurenative.datafactory.kotlin.enums.ActivityOnInactiveMarkAs
import com.pulumi.azurenative.datafactory.kotlin.enums.ActivityState
import com.pulumi.azurenative.datafactory.kotlin.enums.AzureFunctionActivityMethod
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

/**
 * Azure Function activity.
 * @property body Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string).
 * @property dependsOn Activity depends on condition.
 * @property description Activity description.
 * @property functionName Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string)
 * @property headers Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string).
 * @property linkedServiceName Linked service reference.
 * @property method Rest API method for target endpoint.
 * @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 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 'AzureFunctionActivity'.
 * @property userProperties Activity user properties.
 */
public data class AzureFunctionActivityArgs(
    public val body: Output? = null,
    public val dependsOn: Output>? = null,
    public val description: Output? = null,
    public val functionName: Output,
    public val headers: Output>? = null,
    public val linkedServiceName: Output? = null,
    public val method: Output>,
    public val name: Output,
    public val onInactiveMarkAs: 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.AzureFunctionActivityArgs =
        com.pulumi.azurenative.datafactory.inputs.AzureFunctionActivityArgs.builder()
            .body(body?.applyValue({ args0 -> args0 }))
            .dependsOn(
                dependsOn?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .functionName(functionName.applyValue({ args0 -> args0 }))
            .headers(headers?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .linkedServiceName(linkedServiceName?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .method(
                method.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { 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() }) }))
            .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 [AzureFunctionActivityArgs].
 */
@PulumiTagMarker
public class AzureFunctionActivityArgsBuilder internal constructor() {
    private var body: Output? = null

    private var dependsOn: Output>? = null

    private var description: Output? = null

    private var functionName: Output? = null

    private var headers: Output>? = null

    private var linkedServiceName: Output? = null

    private var method: Output>? = null

    private var name: Output? = null

    private var onInactiveMarkAs: Output>? = null

    private var policy: Output? = null

    private var state: Output>? = null

    private var type: Output? = null

    private var userProperties: Output>? = null

    /**
     * @param value Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string).
     */
    @JvmName("agiomvoqfukjhquo")
    public suspend fun body(`value`: Output) {
        this.body = value
    }

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

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

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

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

    /**
     * @param value Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string)
     */
    @JvmName("tjxskmhtobpenryv")
    public suspend fun functionName(`value`: Output) {
        this.functionName = value
    }

    /**
     * @param value Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string).
     */
    @JvmName("yftwmtgvvuspqwaa")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

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

    /**
     * @param value Rest API method for target endpoint.
     */
    @JvmName("jjmlvleqqdsatdsk")
    public suspend fun method(`value`: Output>) {
        this.method = value
    }

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

    /**
     * @param value Activity policy.
     */
    @JvmName("lhqacwwhdvfuvtuu")
    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("wtrkafcweefejaxe")
    public suspend fun state(`value`: Output>) {
        this.state = value
    }

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

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

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

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

    /**
     * @param value Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string).
     */
    @JvmName("wjhqkrayplcksygi")
    public suspend fun body(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.body = mapped
    }

    /**
     * @param value Activity depends on condition.
     */
    @JvmName("mgkkhvmyiwvrcqtc")
    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("ubhwbjlwjlwbxccc")
    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("qjbfaixmqgmwrmrv")
    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("ivkfvtlkbmplyohb")
    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("mrxwitmfwykehdhm")
    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("hagoothgyppesuhp")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string)
     */
    @JvmName("xlpxqbsidrustutg")
    public suspend fun functionName(`value`: Any) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.functionName = mapped
    }

    /**
     * @param value Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string).
     */
    @JvmName("qraagwwnbtxluhxv")
    public suspend fun headers(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param values Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string).
     */
    @JvmName("kmjgnwvipotnbtvg")
    public fun headers(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

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

    /**
     * @param value Rest API method for target endpoint.
     */
    @JvmName("afwjwqwwxipfogyd")
    public suspend fun method(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.method = mapped
    }

    /**
     * @param value Rest API method for target endpoint.
     */
    @JvmName("bbenctghvkwhcwpx")
    public fun method(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.method = mapped
    }

    /**
     * @param value Rest API method for target endpoint.
     */
    @JvmName("iwgcqpwhvtsoavpw")
    public fun method(`value`: AzureFunctionActivityMethod) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.method = mapped
    }

    /**
     * @param value Activity name.
     */
    @JvmName("vuunadwkmhwrkyar")
    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("ohkkrcbidcxftiyp")
    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("igvwoiyucmchdvvp")
    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("ovpspafsqytdxvyn")
    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("xttfgsvyvfnbvguu")
    public suspend fun policy(`value`: ActivityPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

    /**
     * @param argument Activity policy.
     */
    @JvmName("jbqvvgywpwvqkoir")
    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("lcfdxxtkuedcwtcy")
    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("hbcrciogrdgkqnxh")
    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("ubyersoqjdbfwxdj")
    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 'AzureFunctionActivity'.
     */
    @JvmName("pkloopseobctwtsd")
    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("qhdlgibjjntvmwdy")
    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("lukpcqxobkebudjh")
    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("khwlkbeuiuiavprb")
    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("acfbvpyxrgtrqtyc")
    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("cgbxmdeaisosohij")
    public suspend fun userProperties(vararg values: UserPropertyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userProperties = mapped
    }

    internal fun build(): AzureFunctionActivityArgs = AzureFunctionActivityArgs(
        body = body,
        dependsOn = dependsOn,
        description = description,
        functionName = functionName ?: throw PulumiNullFieldException("functionName"),
        headers = headers,
        linkedServiceName = linkedServiceName,
        method = method ?: throw PulumiNullFieldException("method"),
        name = name ?: throw PulumiNullFieldException("name"),
        onInactiveMarkAs = onInactiveMarkAs,
        policy = policy,
        state = state,
        type = type ?: throw PulumiNullFieldException("type"),
        userProperties = userProperties,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy