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

com.pulumi.googlenative.dataproc.v1.kotlin.WorkflowTemplateArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.dataproc.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.dataproc.v1.WorkflowTemplateArgs.builder
import com.pulumi.googlenative.dataproc.v1.kotlin.inputs.OrderedJobArgs
import com.pulumi.googlenative.dataproc.v1.kotlin.inputs.OrderedJobArgsBuilder
import com.pulumi.googlenative.dataproc.v1.kotlin.inputs.TemplateParameterArgs
import com.pulumi.googlenative.dataproc.v1.kotlin.inputs.TemplateParameterArgsBuilder
import com.pulumi.googlenative.dataproc.v1.kotlin.inputs.WorkflowTemplatePlacementArgs
import com.pulumi.googlenative.dataproc.v1.kotlin.inputs.WorkflowTemplatePlacementArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates new workflow template.
 * Auto-naming is currently not supported for this resource.
 * @property dagTimeout Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted.
 * @property id
 * @property jobs The Directed Acyclic Graph of Jobs to submit.
 * @property labels Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be associated with a template.
 * @property location
 * @property parameters Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
 * @property placement WorkflowTemplate scheduling information.
 * @property project
 * @property version Optional. Used to perform a consistent read-modify-write.This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.
 */
public data class WorkflowTemplateArgs(
    public val dagTimeout: Output? = null,
    public val id: Output? = null,
    public val jobs: Output>? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val parameters: Output>? = null,
    public val placement: Output? = null,
    public val project: Output? = null,
    public val version: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.dataproc.v1.WorkflowTemplateArgs =
        com.pulumi.googlenative.dataproc.v1.WorkflowTemplateArgs.builder()
            .dagTimeout(dagTimeout?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .jobs(jobs?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .placement(placement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .version(version?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WorkflowTemplateArgs].
 */
@PulumiTagMarker
public class WorkflowTemplateArgsBuilder internal constructor() {
    private var dagTimeout: Output? = null

    private var id: Output? = null

    private var jobs: Output>? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var parameters: Output>? = null

    private var placement: Output? = null

    private var project: Output? = null

    private var version: Output? = null

    /**
     * @param value Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted.
     */
    @JvmName("cxrahtugtdviodnn")
    public suspend fun dagTimeout(`value`: Output) {
        this.dagTimeout = value
    }

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

    /**
     * @param value The Directed Acyclic Graph of Jobs to submit.
     */
    @JvmName("ovxppidnunrtfjou")
    public suspend fun jobs(`value`: Output>) {
        this.jobs = value
    }

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

    /**
     * @param values The Directed Acyclic Graph of Jobs to submit.
     */
    @JvmName("xxyiitmuvgibpygf")
    public suspend fun jobs(values: List>) {
        this.jobs = Output.all(values)
    }

    /**
     * @param value Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be associated with a template.
     */
    @JvmName("vctpvhsrcwgqhxaa")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

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

    /**
     * @param value Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
     */
    @JvmName("nkrrliycvfqsyptd")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param values Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
     */
    @JvmName("hsbtbvlgnaodtcnq")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value WorkflowTemplate scheduling information.
     */
    @JvmName("qcjtbnghbvvgqddq")
    public suspend fun placement(`value`: Output) {
        this.placement = value
    }

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

    /**
     * @param value Optional. Used to perform a consistent read-modify-write.This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.
     */
    @JvmName("dtxbecdysywiipqc")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration (https://developers.google.com/protocol-buffers/docs/proto3#json)). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted.
     */
    @JvmName("cqtjcpkxqolebsol")
    public suspend fun dagTimeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dagTimeout = mapped
    }

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

    /**
     * @param value The Directed Acyclic Graph of Jobs to submit.
     */
    @JvmName("rjycxqmghipdoiys")
    public suspend fun jobs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobs = mapped
    }

    /**
     * @param argument The Directed Acyclic Graph of Jobs to submit.
     */
    @JvmName("lpypdfgmepwmdqom")
    public suspend fun jobs(argument: List Unit>) {
        val toBeMapped = argument.toList().map { OrderedJobArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.jobs = mapped
    }

    /**
     * @param argument The Directed Acyclic Graph of Jobs to submit.
     */
    @JvmName("qwcdhwdltdymdmud")
    public suspend fun jobs(vararg argument: suspend OrderedJobArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { OrderedJobArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.jobs = mapped
    }

    /**
     * @param argument The Directed Acyclic Graph of Jobs to submit.
     */
    @JvmName("lqmvusjrvgfaydnl")
    public suspend fun jobs(argument: suspend OrderedJobArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(OrderedJobArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.jobs = mapped
    }

    /**
     * @param values The Directed Acyclic Graph of Jobs to submit.
     */
    @JvmName("jpbnltyvmusjtwuh")
    public suspend fun jobs(vararg values: OrderedJobArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.jobs = mapped
    }

    /**
     * @param value Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be associated with a template.
     */
    @JvmName("lmhtjgpnhodhgdbk")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be associated with a template.
     */
    @JvmName("aemhnsrxrvopssry")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

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

    /**
     * @param value Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
     */
    @JvmName("nnryuobjiwtuisyn")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
     */
    @JvmName("qypjxiljvlrnmtcx")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TemplateParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
     */
    @JvmName("tbelrgnlhhlwphrt")
    public suspend fun parameters(vararg argument: suspend TemplateParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TemplateParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
     */
    @JvmName("uucaghwjmdbaibrc")
    public suspend fun parameters(argument: suspend TemplateParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TemplateParameterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.
     */
    @JvmName("peoijniuclhibogd")
    public suspend fun parameters(vararg values: TemplateParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value WorkflowTemplate scheduling information.
     */
    @JvmName("symuaertshitbbea")
    public suspend fun placement(`value`: WorkflowTemplatePlacementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.placement = mapped
    }

    /**
     * @param argument WorkflowTemplate scheduling information.
     */
    @JvmName("jqbtyhccypnjvjxc")
    public suspend fun placement(argument: suspend WorkflowTemplatePlacementArgsBuilder.() -> Unit) {
        val toBeMapped = WorkflowTemplatePlacementArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.placement = mapped
    }

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

    /**
     * @param value Optional. Used to perform a consistent read-modify-write.This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.
     */
    @JvmName("erqgholxihuvwleg")
    public suspend fun version(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    internal fun build(): WorkflowTemplateArgs = WorkflowTemplateArgs(
        dagTimeout = dagTimeout,
        id = id,
        jobs = jobs,
        labels = labels,
        location = location,
        parameters = parameters,
        placement = placement,
        project = project,
        version = version,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy