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

com.pulumi.gcp.osconfig.kotlin.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs.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.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property args Optional arguments to pass to the source during
 * execution.
 * @property file A remote or local file. Structure is
 * documented below.
 * @property interpreter The script interpreter to use. Possible values
 * are: `INTERPRETER_UNSPECIFIED`, `NONE`, `SHELL`, `POWERSHELL`.
 * @property outputFilePath Only recorded for enforce Exec. Path to an
 * output file (that is created by this Exec) whose content will be recorded in
 * OSPolicyResourceCompliance after a successful run. Absence or failure to
 * read this file will result in this ExecResource being non-compliant. Output
 * file size is limited to 100K bytes.
 * @property script An inline script. The size of the script is limited to
 * 1024 characters.
 */
public data class OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs(
    public val args: Output>? = null,
    public val `file`: Output? =
        null,
    public val interpreter: Output,
    public val outputFilePath: Output? = null,
    public val script: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs =
        com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs.builder()
            .args(args?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .`file`(`file`?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .interpreter(interpreter.applyValue({ args0 -> args0 }))
            .outputFilePath(outputFilePath?.applyValue({ args0 -> args0 }))
            .script(script?.applyValue({ args0 -> args0 })).build()
}

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

    private var `file`: Output? =
        null

    private var interpreter: Output? = null

    private var outputFilePath: Output? = null

    private var script: Output? = null

    /**
     * @param value Optional arguments to pass to the source during
     * execution.
     */
    @JvmName("sqoymgtphlnoojbm")
    public suspend fun args(`value`: Output>) {
        this.args = value
    }

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

    /**
     * @param values Optional arguments to pass to the source during
     * execution.
     */
    @JvmName("obrwheppyapaaywh")
    public suspend fun args(values: List>) {
        this.args = Output.all(values)
    }

    /**
     * @param value A remote or local file. Structure is
     * documented below.
     */
    @JvmName("dvrfixyruxubxapj")
    public suspend fun `file`(`value`: Output) {
        this.`file` = value
    }

    /**
     * @param value The script interpreter to use. Possible values
     * are: `INTERPRETER_UNSPECIFIED`, `NONE`, `SHELL`, `POWERSHELL`.
     */
    @JvmName("khaohmklkqaqlmxq")
    public suspend fun interpreter(`value`: Output) {
        this.interpreter = value
    }

    /**
     * @param value Only recorded for enforce Exec. Path to an
     * output file (that is created by this Exec) whose content will be recorded in
     * OSPolicyResourceCompliance after a successful run. Absence or failure to
     * read this file will result in this ExecResource being non-compliant. Output
     * file size is limited to 100K bytes.
     */
    @JvmName("glxedfjbnqfosgyk")
    public suspend fun outputFilePath(`value`: Output) {
        this.outputFilePath = value
    }

    /**
     * @param value An inline script. The size of the script is limited to
     * 1024 characters.
     */
    @JvmName("cfxvpswaqpwjtxsi")
    public suspend fun script(`value`: Output) {
        this.script = value
    }

    /**
     * @param value Optional arguments to pass to the source during
     * execution.
     */
    @JvmName("btfryqaosvptwkpo")
    public suspend fun args(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param values Optional arguments to pass to the source during
     * execution.
     */
    @JvmName("suxpyxknppqrudda")
    public suspend fun args(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param value A remote or local file. Structure is
     * documented below.
     */
    @JvmName("rydycoarvwldhxck")
    public suspend fun `file`(`value`: OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`file` = mapped
    }

    /**
     * @param argument A remote or local file. Structure is
     * documented below.
     */
    @JvmName("jlamtienykfdghnl")
    public suspend fun `file`(argument: suspend OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileArgsBuilder.() -> Unit) {
        val toBeMapped =
            OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.`file` = mapped
    }

    /**
     * @param value The script interpreter to use. Possible values
     * are: `INTERPRETER_UNSPECIFIED`, `NONE`, `SHELL`, `POWERSHELL`.
     */
    @JvmName("hhmmdlopclypinje")
    public suspend fun interpreter(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.interpreter = mapped
    }

    /**
     * @param value Only recorded for enforce Exec. Path to an
     * output file (that is created by this Exec) whose content will be recorded in
     * OSPolicyResourceCompliance after a successful run. Absence or failure to
     * read this file will result in this ExecResource being non-compliant. Output
     * file size is limited to 100K bytes.
     */
    @JvmName("mgnlqbrfnlrxsolc")
    public suspend fun outputFilePath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputFilePath = mapped
    }

    /**
     * @param value An inline script. The size of the script is limited to
     * 1024 characters.
     */
    @JvmName("lqbaymkqquijlsqf")
    public suspend fun script(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.script = mapped
    }

    internal fun build(): OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs =
        OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs(
            args = args,
            `file` = `file`,
            interpreter = interpreter ?: throw PulumiNullFieldException("interpreter"),
            outputFilePath = outputFilePath,
            script = script,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy