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

com.pulumi.gcp.cloudfunctionsv2.kotlin.inputs.FunctionBuildConfigArgs.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudfunctionsv2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property build (Output)
 * The Cloud Build name of the latest successful
 * deployment of the function.
 * @property dockerRepository User managed repository created in Artifact Registry optionally with a customer managed encryption key.
 * @property entryPoint The name of the function (as defined in source code) that will be executed.
 * Defaults to the resource name suffix, if not specified. For backward
 * compatibility, if function with given name is not found, then the system
 * will try to use function named "function". For Node.js this is name of a
 * function exported by the module specified in source_location.
 * @property environmentVariables User-provided build-time environment variables for the function.
 * @property runtime The runtime in which to run the function. Required when deploying a new
 * function, optional when updating an existing function.
 * @property serviceAccount The fully-qualified name of the service account to be used for building the container.
 * @property source The location of the function source code.
 * Structure is documented below.
 * @property workerPool Name of the Cloud Build Custom Worker Pool that should be used to build the function.
 */
public data class FunctionBuildConfigArgs(
    public val build: Output? = null,
    public val dockerRepository: Output? = null,
    public val entryPoint: Output? = null,
    public val environmentVariables: Output>? = null,
    public val runtime: Output? = null,
    public val serviceAccount: Output? = null,
    public val source: Output? = null,
    public val workerPool: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigArgs =
        com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigArgs.builder()
            .build(build?.applyValue({ args0 -> args0 }))
            .dockerRepository(dockerRepository?.applyValue({ args0 -> args0 }))
            .entryPoint(entryPoint?.applyValue({ args0 -> args0 }))
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .runtime(runtime?.applyValue({ args0 -> args0 }))
            .serviceAccount(serviceAccount?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .workerPool(workerPool?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FunctionBuildConfigArgs].
 */
@PulumiTagMarker
public class FunctionBuildConfigArgsBuilder internal constructor() {
    private var build: Output? = null

    private var dockerRepository: Output? = null

    private var entryPoint: Output? = null

    private var environmentVariables: Output>? = null

    private var runtime: Output? = null

    private var serviceAccount: Output? = null

    private var source: Output? = null

    private var workerPool: Output? = null

    /**
     * @param value (Output)
     * The Cloud Build name of the latest successful
     * deployment of the function.
     */
    @JvmName("teayjtlbixjtriuy")
    public suspend fun build(`value`: Output) {
        this.build = value
    }

    /**
     * @param value User managed repository created in Artifact Registry optionally with a customer managed encryption key.
     */
    @JvmName("ecbmkdaftxtpfxvf")
    public suspend fun dockerRepository(`value`: Output) {
        this.dockerRepository = value
    }

    /**
     * @param value The name of the function (as defined in source code) that will be executed.
     * Defaults to the resource name suffix, if not specified. For backward
     * compatibility, if function with given name is not found, then the system
     * will try to use function named "function". For Node.js this is name of a
     * function exported by the module specified in source_location.
     */
    @JvmName("fuhaornpiqtphcrd")
    public suspend fun entryPoint(`value`: Output) {
        this.entryPoint = value
    }

    /**
     * @param value User-provided build-time environment variables for the function.
     */
    @JvmName("ernwhkgstugmgwjp")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function.
     */
    @JvmName("fisrlvecvmyidcqb")
    public suspend fun runtime(`value`: Output) {
        this.runtime = value
    }

    /**
     * @param value The fully-qualified name of the service account to be used for building the container.
     */
    @JvmName("noqyxnqmixuxmame")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value The location of the function source code.
     * Structure is documented below.
     */
    @JvmName("eihvhkcmuaauxxia")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Name of the Cloud Build Custom Worker Pool that should be used to build the function.
     */
    @JvmName("rdcnrekmoqpwgbmq")
    public suspend fun workerPool(`value`: Output) {
        this.workerPool = value
    }

    /**
     * @param value (Output)
     * The Cloud Build name of the latest successful
     * deployment of the function.
     */
    @JvmName("jixvxftebttulgfo")
    public suspend fun build(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.build = mapped
    }

    /**
     * @param value User managed repository created in Artifact Registry optionally with a customer managed encryption key.
     */
    @JvmName("kqjjpmjrtydsteuo")
    public suspend fun dockerRepository(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dockerRepository = mapped
    }

    /**
     * @param value The name of the function (as defined in source code) that will be executed.
     * Defaults to the resource name suffix, if not specified. For backward
     * compatibility, if function with given name is not found, then the system
     * will try to use function named "function". For Node.js this is name of a
     * function exported by the module specified in source_location.
     */
    @JvmName("auodjvxaulsahico")
    public suspend fun entryPoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.entryPoint = mapped
    }

    /**
     * @param value User-provided build-time environment variables for the function.
     */
    @JvmName("mlltobjcsuhpuwoh")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param values User-provided build-time environment variables for the function.
     */
    @JvmName("wbjlklxhpbmfrpis")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function.
     */
    @JvmName("lwoeouxlcejlvuab")
    public suspend fun runtime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runtime = mapped
    }

    /**
     * @param value The fully-qualified name of the service account to be used for building the container.
     */
    @JvmName("sfvfrddonehmcnmv")
    public suspend fun serviceAccount(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param value The location of the function source code.
     * Structure is documented below.
     */
    @JvmName("fwyfhknmpedwlpry")
    public suspend fun source(`value`: FunctionBuildConfigSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param argument The location of the function source code.
     * Structure is documented below.
     */
    @JvmName("faorcgxtctdkapgo")
    public suspend fun source(argument: suspend FunctionBuildConfigSourceArgsBuilder.() -> Unit) {
        val toBeMapped = FunctionBuildConfigSourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.source = mapped
    }

    /**
     * @param value Name of the Cloud Build Custom Worker Pool that should be used to build the function.
     */
    @JvmName("sfdntffrntdtemwv")
    public suspend fun workerPool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workerPool = mapped
    }

    internal fun build(): FunctionBuildConfigArgs = FunctionBuildConfigArgs(
        build = build,
        dockerRepository = dockerRepository,
        entryPoint = entryPoint,
        environmentVariables = environmentVariables,
        runtime = runtime,
        serviceAccount = serviceAccount,
        source = source,
        workerPool = workerPool,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy