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

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

package com.pulumi.gcp.osconfig.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.osconfig.inputs.GuestPoliciesRecipeUpdateStepScriptRunArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property allowedExitCodes Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0]
 * @property interpreter The script interpreter to use to run the script. If no interpreter is specified the script is executed directly,
 * which likely only succeed for scripts with shebang lines.
 * Possible values are: `SHELL`, `POWERSHELL`.
 * @property script The shell script to be executed.
 */
public data class GuestPoliciesRecipeUpdateStepScriptRunArgs(
    public val allowedExitCodes: Output>? = null,
    public val interpreter: Output? = null,
    public val script: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.osconfig.inputs.GuestPoliciesRecipeUpdateStepScriptRunArgs =
        com.pulumi.gcp.osconfig.inputs.GuestPoliciesRecipeUpdateStepScriptRunArgs.builder()
            .allowedExitCodes(allowedExitCodes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .interpreter(interpreter?.applyValue({ args0 -> args0 }))
            .script(script.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GuestPoliciesRecipeUpdateStepScriptRunArgs].
 */
@PulumiTagMarker
public class GuestPoliciesRecipeUpdateStepScriptRunArgsBuilder internal constructor() {
    private var allowedExitCodes: Output>? = null

    private var interpreter: Output? = null

    private var script: Output? = null

    /**
     * @param value Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0]
     */
    @JvmName("xmvjfsasynnjptox")
    public suspend fun allowedExitCodes(`value`: Output>) {
        this.allowedExitCodes = value
    }

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

    /**
     * @param values Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0]
     */
    @JvmName("rldhrvbfggapojfn")
    public suspend fun allowedExitCodes(values: List>) {
        this.allowedExitCodes = Output.all(values)
    }

    /**
     * @param value The script interpreter to use to run the script. If no interpreter is specified the script is executed directly,
     * which likely only succeed for scripts with shebang lines.
     * Possible values are: `SHELL`, `POWERSHELL`.
     */
    @JvmName("ufemkydaexhowbpt")
    public suspend fun interpreter(`value`: Output) {
        this.interpreter = value
    }

    /**
     * @param value The shell script to be executed.
     */
    @JvmName("tyhrnsgsiwidqjhh")
    public suspend fun script(`value`: Output) {
        this.script = value
    }

    /**
     * @param value Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0]
     */
    @JvmName("nudquwwamecvwrwy")
    public suspend fun allowedExitCodes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedExitCodes = mapped
    }

    /**
     * @param values Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0]
     */
    @JvmName("tmbnxpdjurnyjmxu")
    public suspend fun allowedExitCodes(vararg values: Int) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedExitCodes = mapped
    }

    /**
     * @param value The script interpreter to use to run the script. If no interpreter is specified the script is executed directly,
     * which likely only succeed for scripts with shebang lines.
     * Possible values are: `SHELL`, `POWERSHELL`.
     */
    @JvmName("mglbbrurceoljugi")
    public suspend fun interpreter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interpreter = mapped
    }

    /**
     * @param value The shell script to be executed.
     */
    @JvmName("bdfnvqtlvlsueiao")
    public suspend fun script(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.script = mapped
    }

    internal fun build(): GuestPoliciesRecipeUpdateStepScriptRunArgs =
        GuestPoliciesRecipeUpdateStepScriptRunArgs(
            allowedExitCodes = allowedExitCodes,
            interpreter = interpreter,
            script = script ?: throw PulumiNullFieldException("script"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy