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

com.pulumi.googlenative.toolresults.v1beta3.kotlin.inputs.ToolExecutionArgs.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.toolresults.v1beta3.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.toolresults.v1beta3.inputs.ToolExecutionArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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

/**
 * An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code.
 * @property commandLineArguments The full tokenized command line including the program name (equivalent to argv in a C program). - In response: present if set by create request - In create request: optional - In update request: never set
 * @property exitCode Tool execution exit code. This field will be set once the tool has exited. - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set.
 * @property toolLogs References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
 * @property toolOutputs References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
 */
public data class ToolExecutionArgs(
    public val commandLineArguments: Output>? = null,
    public val exitCode: Output? = null,
    public val toolLogs: Output>? = null,
    public val toolOutputs: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.toolresults.v1beta3.inputs.ToolExecutionArgs =
        com.pulumi.googlenative.toolresults.v1beta3.inputs.ToolExecutionArgs.builder()
            .commandLineArguments(commandLineArguments?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .exitCode(exitCode?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .toolLogs(
                toolLogs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .toolOutputs(
                toolOutputs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var exitCode: Output? = null

    private var toolLogs: Output>? = null

    private var toolOutputs: Output>? = null

    /**
     * @param value The full tokenized command line including the program name (equivalent to argv in a C program). - In response: present if set by create request - In create request: optional - In update request: never set
     */
    @JvmName("opeerkehpgvsyjpy")
    public suspend fun commandLineArguments(`value`: Output>) {
        this.commandLineArguments = value
    }

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

    /**
     * @param values The full tokenized command line including the program name (equivalent to argv in a C program). - In response: present if set by create request - In create request: optional - In update request: never set
     */
    @JvmName("ccutmkdcmtwuepdu")
    public suspend fun commandLineArguments(values: List>) {
        this.commandLineArguments = Output.all(values)
    }

    /**
     * @param value Tool execution exit code. This field will be set once the tool has exited. - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set.
     */
    @JvmName("wlunyhtukgnkpfhw")
    public suspend fun exitCode(`value`: Output) {
        this.exitCode = value
    }

    /**
     * @param value References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("ofkawvpcwjtfbwpu")
    public suspend fun toolLogs(`value`: Output>) {
        this.toolLogs = value
    }

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

    /**
     * @param values References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("bvacpokndsaysula")
    public suspend fun toolLogs(values: List>) {
        this.toolLogs = Output.all(values)
    }

    /**
     * @param value References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("gjojfnamtbppqlnh")
    public suspend fun toolOutputs(`value`: Output>) {
        this.toolOutputs = value
    }

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

    /**
     * @param values References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("oxgxwrrbukmsgqfr")
    public suspend fun toolOutputs(values: List>) {
        this.toolOutputs = Output.all(values)
    }

    /**
     * @param value The full tokenized command line including the program name (equivalent to argv in a C program). - In response: present if set by create request - In create request: optional - In update request: never set
     */
    @JvmName("xcnsrhcelxqkspjp")
    public suspend fun commandLineArguments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commandLineArguments = mapped
    }

    /**
     * @param values The full tokenized command line including the program name (equivalent to argv in a C program). - In response: present if set by create request - In create request: optional - In update request: never set
     */
    @JvmName("hjsoylicjmjsfktl")
    public suspend fun commandLineArguments(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commandLineArguments = mapped
    }

    /**
     * @param value Tool execution exit code. This field will be set once the tool has exited. - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set.
     */
    @JvmName("prtsbndagkrcvtpt")
    public suspend fun exitCode(`value`: ToolExitCodeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exitCode = mapped
    }

    /**
     * @param argument Tool execution exit code. This field will be set once the tool has exited. - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set.
     */
    @JvmName("ctpowiibarqxgjcf")
    public suspend fun exitCode(argument: suspend ToolExitCodeArgsBuilder.() -> Unit) {
        val toBeMapped = ToolExitCodeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.exitCode = mapped
    }

    /**
     * @param value References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("ygytecvqnbpxytjj")
    public suspend fun toolLogs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.toolLogs = mapped
    }

    /**
     * @param argument References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("ofaoamwalurrpfti")
    public suspend fun toolLogs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FileReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.toolLogs = mapped
    }

    /**
     * @param argument References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("wxxcmialwvicbgsy")
    public suspend fun toolLogs(vararg argument: suspend FileReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FileReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.toolLogs = mapped
    }

    /**
     * @param argument References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("nfixygbwteykyell")
    public suspend fun toolLogs(argument: suspend FileReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FileReferenceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.toolLogs = mapped
    }

    /**
     * @param values References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("ejbebxqcbowyssjd")
    public suspend fun toolLogs(vararg values: FileReferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.toolLogs = mapped
    }

    /**
     * @param value References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("lqmoxqiurttiueng")
    public suspend fun toolOutputs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.toolOutputs = mapped
    }

    /**
     * @param argument References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("uedlysjcrlrgwdsi")
    public suspend fun toolOutputs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ToolOutputReferenceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.toolOutputs = mapped
    }

    /**
     * @param argument References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("lqqbjcxhqxelfmlt")
    public suspend fun toolOutputs(vararg argument: suspend ToolOutputReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ToolOutputReferenceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.toolOutputs = mapped
    }

    /**
     * @param argument References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("fuyqmtlgqvkjhnlf")
    public suspend fun toolOutputs(argument: suspend ToolOutputReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ToolOutputReferenceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.toolOutputs = mapped
    }

    /**
     * @param values References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list
     */
    @JvmName("wbjdnyqobolieukj")
    public suspend fun toolOutputs(vararg values: ToolOutputReferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.toolOutputs = mapped
    }

    internal fun build(): ToolExecutionArgs = ToolExecutionArgs(
        commandLineArguments = commandLineArguments,
        exitCode = exitCode,
        toolLogs = toolLogs,
        toolOutputs = toolOutputs,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy