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

com.pulumi.nomad.kotlin.inputs.JobHcl2Args.kt Maven / Gradle / Ivy

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

package com.pulumi.nomad.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.nomad.inputs.JobHcl2Args.builder
import kotlin.Any
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property allowFs `(boolean: false)` - Set this to `true` to be able to use
 * HCL2 filesystem functions
 * @property enabled `(boolean: false)` - **Deprecated** All HCL jobs are parsed as
 * HCL2 by default.
 * @property vars Additional variables to use when templating the job with HCL2
 */
public data class JobHcl2Args(
    public val allowFs: Output? = null,
    @Deprecated(
        message = """
  Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this
      field is no longer used and may be safely removed from your configuration files. Set 'hcl1 =
      true' if you must use HCL1 job parsing.
  """,
    )
    public val enabled: Output? = null,
    public val vars: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.nomad.inputs.JobHcl2Args =
        com.pulumi.nomad.inputs.JobHcl2Args.builder()
            .allowFs(allowFs?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .vars(
                vars?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [JobHcl2Args].
 */
@PulumiTagMarker
public class JobHcl2ArgsBuilder internal constructor() {
    private var allowFs: Output? = null

    private var enabled: Output? = null

    private var vars: Output>? = null

    /**
     * @param value `(boolean: false)` - Set this to `true` to be able to use
     * HCL2 filesystem functions
     */
    @JvmName("nxucnngwtsbpucas")
    public suspend fun allowFs(`value`: Output) {
        this.allowFs = value
    }

    /**
     * @param value `(boolean: false)` - **Deprecated** All HCL jobs are parsed as
     * HCL2 by default.
     */
    @Deprecated(
        message = """
  Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this
      field is no longer used and may be safely removed from your configuration files. Set 'hcl1 =
      true' if you must use HCL1 job parsing.
  """,
    )
    @JvmName("iiourrcpcqgofeuy")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Additional variables to use when templating the job with HCL2
     */
    @JvmName("micwnbhhvwmjvqws")
    public suspend fun vars(`value`: Output>) {
        this.vars = value
    }

    /**
     * @param value `(boolean: false)` - Set this to `true` to be able to use
     * HCL2 filesystem functions
     */
    @JvmName("dhpplycjuxqsikoe")
    public suspend fun allowFs(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowFs = mapped
    }

    /**
     * @param value `(boolean: false)` - **Deprecated** All HCL jobs are parsed as
     * HCL2 by default.
     */
    @Deprecated(
        message = """
  Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this
      field is no longer used and may be safely removed from your configuration files. Set 'hcl1 =
      true' if you must use HCL1 job parsing.
  """,
    )
    @JvmName("ulqijeefgmbbkenv")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Additional variables to use when templating the job with HCL2
     */
    @JvmName("fwvrjfllnbmtjgml")
    public suspend fun vars(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vars = mapped
    }

    /**
     * @param values Additional variables to use when templating the job with HCL2
     */
    @JvmName("vlmysvhplrylsywp")
    public fun vars(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vars = mapped
    }

    internal fun build(): JobHcl2Args = JobHcl2Args(
        allowFs = allowFs,
        enabled = enabled,
        vars = vars,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy