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

com.pulumi.googlenative.dataflow.v1b3.kotlin.TemplateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.dataflow.v1b3.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.dataflow.v1b3.TemplateArgs.builder
import com.pulumi.googlenative.dataflow.v1b3.kotlin.inputs.RuntimeEnvironmentArgs
import com.pulumi.googlenative.dataflow.v1b3.kotlin.inputs.RuntimeEnvironmentArgsBuilder
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

/**
 * Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.
 * Auto-naming is currently not supported for this resource.
 * Note - this resource's API doesn't support deletion. When deleted, the resource will persist
 * on Google Cloud even though it will be deleted from Pulumi state.
 * @property environment The runtime environment for the job.
 * @property gcsPath A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with `gs://`.
 * @property jobName The job name to use for the created job.
 * @property location The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.
 * @property parameters The runtime parameters to pass to the job.
 * @property project
 */
public data class TemplateArgs(
    public val environment: Output? = null,
    public val gcsPath: Output? = null,
    public val jobName: Output? = null,
    public val location: Output? = null,
    public val parameters: Output>? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.dataflow.v1b3.TemplateArgs =
        com.pulumi.googlenative.dataflow.v1b3.TemplateArgs.builder()
            .environment(environment?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .gcsPath(gcsPath?.applyValue({ args0 -> args0 }))
            .jobName(jobName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .project(project?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TemplateArgs].
 */
@PulumiTagMarker
public class TemplateArgsBuilder internal constructor() {
    private var environment: Output? = null

    private var gcsPath: Output? = null

    private var jobName: Output? = null

    private var location: Output? = null

    private var parameters: Output>? = null

    private var project: Output? = null

    /**
     * @param value The runtime environment for the job.
     */
    @JvmName("xnclwqsxrpvhkuqt")
    public suspend fun environment(`value`: Output) {
        this.environment = value
    }

    /**
     * @param value A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with `gs://`.
     */
    @JvmName("ymlmepgfjeiawufp")
    public suspend fun gcsPath(`value`: Output) {
        this.gcsPath = value
    }

    /**
     * @param value The job name to use for the created job.
     */
    @JvmName("yhtomnmvhjtcspuo")
    public suspend fun jobName(`value`: Output) {
        this.jobName = value
    }

    /**
     * @param value The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.
     */
    @JvmName("gmxqgdcxtiqgroqx")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The runtime parameters to pass to the job.
     */
    @JvmName("wefsvaqbjvlaarep")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param value The runtime environment for the job.
     */
    @JvmName("ubrccdwqnvkwmtpq")
    public suspend fun environment(`value`: RuntimeEnvironmentArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environment = mapped
    }

    /**
     * @param argument The runtime environment for the job.
     */
    @JvmName("eyplmqxnskxquxbd")
    public suspend fun environment(argument: suspend RuntimeEnvironmentArgsBuilder.() -> Unit) {
        val toBeMapped = RuntimeEnvironmentArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.environment = mapped
    }

    /**
     * @param value A Cloud Storage path to the template from which to create the job. Must be a valid Cloud Storage URL, beginning with `gs://`.
     */
    @JvmName("iltsvpetcnnopmig")
    public suspend fun gcsPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gcsPath = mapped
    }

    /**
     * @param value The job name to use for the created job.
     */
    @JvmName("uetquexgvsplfour")
    public suspend fun jobName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobName = mapped
    }

    /**
     * @param value The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.
     */
    @JvmName("nxsobexjqpyfdcqg")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The runtime parameters to pass to the job.
     */
    @JvmName("wqjaalrihxhdmxpv")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values The runtime parameters to pass to the job.
     */
    @JvmName("fjjtwacyikltyuyo")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

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

    internal fun build(): TemplateArgs = TemplateArgs(
        environment = environment,
        gcsPath = gcsPath,
        jobName = jobName,
        location = location,
        parameters = parameters,
        project = project,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy