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

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

package com.pulumi.gcp.cloudbuild.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildOptionsArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property diskSizeGb Requested disk size for the VM that runs the build. Note that this is NOT "disk free";
 * some of the space will be used by the operating system and build utilities.
 * Also note that this is the minimum disk size that will be allocated for the build --
 * the build may run with a larger disk than requested. At present, the maximum disk size
 * is 1000GB; builds that request more than the maximum are rejected with an error.
 * @property dynamicSubstitutions Option to specify whether or not to apply bash style string operations to the substitutions.
 * NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
 * @property envs A list of global environment variable definitions that will exist for all build steps
 * in this build. If a variable is defined in both globally and in a build step,
 * the variable will use the build step value.
 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
 * @property logStreamingOption Option to define build log streaming behavior to Google Cloud Storage.
 * Possible values are: `STREAM_DEFAULT`, `STREAM_ON`, `STREAM_OFF`.
 * @property logging Option to specify the logging mode, which determines if and where build logs are stored.
 * Possible values are: `LOGGING_UNSPECIFIED`, `LEGACY`, `GCS_ONLY`, `STACKDRIVER_ONLY`, `CLOUD_LOGGING_ONLY`, `NONE`.
 * @property machineType Compute Engine machine type on which to run the build.
 * @property requestedVerifyOption Requested verifiability options.
 * Possible values are: `NOT_VERIFIED`, `VERIFIED`.
 * @property secretEnvs A list of global environment variables, which are encrypted using a Cloud Key Management
 * Service crypto key. These values must be specified in the build's Secret. These variables
 * will be available to all build steps in this build.
 * @property sourceProvenanceHashes Requested hash for SourceProvenance.
 * Each value may be one of: `NONE`, `SHA256`, `MD5`.
 * @property substitutionOption Option to specify behavior when there is an error in the substitution checks.
 * NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
 * in the build configuration file.
 * Possible values are: `MUST_MATCH`, `ALLOW_LOOSE`.
 * @property volumes Global list of volumes to mount for ALL build steps
 * Each volume is created as an empty volume prior to starting the build process.
 * Upon completion of the build, volumes and their contents are discarded. Global
 * volume names and paths cannot conflict with the volumes defined a build step.
 * Using a global volume in a build with only one step is not valid as it is indicative
 * of a build request with an incorrect configuration.
 * Structure is documented below.
 * @property workerPool Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool}
 * This field is experimental.
 */
public data class TriggerBuildOptionsArgs(
    public val diskSizeGb: Output? = null,
    public val dynamicSubstitutions: Output? = null,
    public val envs: Output>? = null,
    public val logStreamingOption: Output? = null,
    public val logging: Output? = null,
    public val machineType: Output? = null,
    public val requestedVerifyOption: Output? = null,
    public val secretEnvs: Output>? = null,
    public val sourceProvenanceHashes: Output>? = null,
    public val substitutionOption: Output? = null,
    public val volumes: Output>? = null,
    public val workerPool: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudbuild.inputs.TriggerBuildOptionsArgs =
        com.pulumi.gcp.cloudbuild.inputs.TriggerBuildOptionsArgs.builder()
            .diskSizeGb(diskSizeGb?.applyValue({ args0 -> args0 }))
            .dynamicSubstitutions(dynamicSubstitutions?.applyValue({ args0 -> args0 }))
            .envs(envs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .logStreamingOption(logStreamingOption?.applyValue({ args0 -> args0 }))
            .logging(logging?.applyValue({ args0 -> args0 }))
            .machineType(machineType?.applyValue({ args0 -> args0 }))
            .requestedVerifyOption(requestedVerifyOption?.applyValue({ args0 -> args0 }))
            .secretEnvs(secretEnvs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .sourceProvenanceHashes(
                sourceProvenanceHashes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .substitutionOption(substitutionOption?.applyValue({ args0 -> args0 }))
            .volumes(
                volumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .workerPool(workerPool?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TriggerBuildOptionsArgs].
 */
@PulumiTagMarker
public class TriggerBuildOptionsArgsBuilder internal constructor() {
    private var diskSizeGb: Output? = null

    private var dynamicSubstitutions: Output? = null

    private var envs: Output>? = null

    private var logStreamingOption: Output? = null

    private var logging: Output? = null

    private var machineType: Output? = null

    private var requestedVerifyOption: Output? = null

    private var secretEnvs: Output>? = null

    private var sourceProvenanceHashes: Output>? = null

    private var substitutionOption: Output? = null

    private var volumes: Output>? = null

    private var workerPool: Output? = null

    /**
     * @param value Requested disk size for the VM that runs the build. Note that this is NOT "disk free";
     * some of the space will be used by the operating system and build utilities.
     * Also note that this is the minimum disk size that will be allocated for the build --
     * the build may run with a larger disk than requested. At present, the maximum disk size
     * is 1000GB; builds that request more than the maximum are rejected with an error.
     */
    @JvmName("xcwlbwkkimphwwca")
    public suspend fun diskSizeGb(`value`: Output) {
        this.diskSizeGb = value
    }

    /**
     * @param value Option to specify whether or not to apply bash style string operations to the substitutions.
     * NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
     */
    @JvmName("ikivxexklkubwpxm")
    public suspend fun dynamicSubstitutions(`value`: Output) {
        this.dynamicSubstitutions = value
    }

    /**
     * @param value A list of global environment variable definitions that will exist for all build steps
     * in this build. If a variable is defined in both globally and in a build step,
     * the variable will use the build step value.
     * The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
     */
    @JvmName("ftvkqkbrkvukrbba")
    public suspend fun envs(`value`: Output>) {
        this.envs = value
    }

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

    /**
     * @param values A list of global environment variable definitions that will exist for all build steps
     * in this build. If a variable is defined in both globally and in a build step,
     * the variable will use the build step value.
     * The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
     */
    @JvmName("mtmlaqawytjvgymy")
    public suspend fun envs(values: List>) {
        this.envs = Output.all(values)
    }

    /**
     * @param value Option to define build log streaming behavior to Google Cloud Storage.
     * Possible values are: `STREAM_DEFAULT`, `STREAM_ON`, `STREAM_OFF`.
     */
    @JvmName("iohfgphfmdenyeqe")
    public suspend fun logStreamingOption(`value`: Output) {
        this.logStreamingOption = value
    }

    /**
     * @param value Option to specify the logging mode, which determines if and where build logs are stored.
     * Possible values are: `LOGGING_UNSPECIFIED`, `LEGACY`, `GCS_ONLY`, `STACKDRIVER_ONLY`, `CLOUD_LOGGING_ONLY`, `NONE`.
     */
    @JvmName("ubjbepcjqbtwlokw")
    public suspend fun logging(`value`: Output) {
        this.logging = value
    }

    /**
     * @param value Compute Engine machine type on which to run the build.
     */
    @JvmName("cqtrajnaogngdfom")
    public suspend fun machineType(`value`: Output) {
        this.machineType = value
    }

    /**
     * @param value Requested verifiability options.
     * Possible values are: `NOT_VERIFIED`, `VERIFIED`.
     */
    @JvmName("fjvmqgthfjoersvp")
    public suspend fun requestedVerifyOption(`value`: Output) {
        this.requestedVerifyOption = value
    }

    /**
     * @param value A list of global environment variables, which are encrypted using a Cloud Key Management
     * Service crypto key. These values must be specified in the build's Secret. These variables
     * will be available to all build steps in this build.
     */
    @JvmName("fvefpepbhviobceq")
    public suspend fun secretEnvs(`value`: Output>) {
        this.secretEnvs = value
    }

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

    /**
     * @param values A list of global environment variables, which are encrypted using a Cloud Key Management
     * Service crypto key. These values must be specified in the build's Secret. These variables
     * will be available to all build steps in this build.
     */
    @JvmName("plqlnoecydpxtmwj")
    public suspend fun secretEnvs(values: List>) {
        this.secretEnvs = Output.all(values)
    }

    /**
     * @param value Requested hash for SourceProvenance.
     * Each value may be one of: `NONE`, `SHA256`, `MD5`.
     */
    @JvmName("ikflvjwmkvxxbycb")
    public suspend fun sourceProvenanceHashes(`value`: Output>) {
        this.sourceProvenanceHashes = value
    }

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

    /**
     * @param values Requested hash for SourceProvenance.
     * Each value may be one of: `NONE`, `SHA256`, `MD5`.
     */
    @JvmName("siidaolcfueheuoc")
    public suspend fun sourceProvenanceHashes(values: List>) {
        this.sourceProvenanceHashes = Output.all(values)
    }

    /**
     * @param value Option to specify behavior when there is an error in the substitution checks.
     * NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
     * in the build configuration file.
     * Possible values are: `MUST_MATCH`, `ALLOW_LOOSE`.
     */
    @JvmName("bhwrnwtukixcspls")
    public suspend fun substitutionOption(`value`: Output) {
        this.substitutionOption = value
    }

    /**
     * @param value Global list of volumes to mount for ALL build steps
     * Each volume is created as an empty volume prior to starting the build process.
     * Upon completion of the build, volumes and their contents are discarded. Global
     * volume names and paths cannot conflict with the volumes defined a build step.
     * Using a global volume in a build with only one step is not valid as it is indicative
     * of a build request with an incorrect configuration.
     * Structure is documented below.
     */
    @JvmName("knfdbifwqqwuxcqh")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values Global list of volumes to mount for ALL build steps
     * Each volume is created as an empty volume prior to starting the build process.
     * Upon completion of the build, volumes and their contents are discarded. Global
     * volume names and paths cannot conflict with the volumes defined a build step.
     * Using a global volume in a build with only one step is not valid as it is indicative
     * of a build request with an incorrect configuration.
     * Structure is documented below.
     */
    @JvmName("jdaljomebueafmrg")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool}
     * This field is experimental.
     */
    @JvmName("flggxlgvcxvsoesg")
    public suspend fun workerPool(`value`: Output) {
        this.workerPool = value
    }

    /**
     * @param value Requested disk size for the VM that runs the build. Note that this is NOT "disk free";
     * some of the space will be used by the operating system and build utilities.
     * Also note that this is the minimum disk size that will be allocated for the build --
     * the build may run with a larger disk than requested. At present, the maximum disk size
     * is 1000GB; builds that request more than the maximum are rejected with an error.
     */
    @JvmName("ohabykjoulbadldl")
    public suspend fun diskSizeGb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskSizeGb = mapped
    }

    /**
     * @param value Option to specify whether or not to apply bash style string operations to the substitutions.
     * NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file.
     */
    @JvmName("jvkywurwohgtxkms")
    public suspend fun dynamicSubstitutions(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dynamicSubstitutions = mapped
    }

    /**
     * @param value A list of global environment variable definitions that will exist for all build steps
     * in this build. If a variable is defined in both globally and in a build step,
     * the variable will use the build step value.
     * The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
     */
    @JvmName("oykvqqoyxtkcvpra")
    public suspend fun envs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param values A list of global environment variable definitions that will exist for all build steps
     * in this build. If a variable is defined in both globally and in a build step,
     * the variable will use the build step value.
     * The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".
     */
    @JvmName("qtipjqhrjghxngxi")
    public suspend fun envs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param value Option to define build log streaming behavior to Google Cloud Storage.
     * Possible values are: `STREAM_DEFAULT`, `STREAM_ON`, `STREAM_OFF`.
     */
    @JvmName("ggtdiatlayfiltqg")
    public suspend fun logStreamingOption(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logStreamingOption = mapped
    }

    /**
     * @param value Option to specify the logging mode, which determines if and where build logs are stored.
     * Possible values are: `LOGGING_UNSPECIFIED`, `LEGACY`, `GCS_ONLY`, `STACKDRIVER_ONLY`, `CLOUD_LOGGING_ONLY`, `NONE`.
     */
    @JvmName("ffpyjlxfcsvgxwno")
    public suspend fun logging(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logging = mapped
    }

    /**
     * @param value Compute Engine machine type on which to run the build.
     */
    @JvmName("moxikknbnswxhyyx")
    public suspend fun machineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineType = mapped
    }

    /**
     * @param value Requested verifiability options.
     * Possible values are: `NOT_VERIFIED`, `VERIFIED`.
     */
    @JvmName("peynwulogtpksrul")
    public suspend fun requestedVerifyOption(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestedVerifyOption = mapped
    }

    /**
     * @param value A list of global environment variables, which are encrypted using a Cloud Key Management
     * Service crypto key. These values must be specified in the build's Secret. These variables
     * will be available to all build steps in this build.
     */
    @JvmName("kcvqkbentbmvbufm")
    public suspend fun secretEnvs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretEnvs = mapped
    }

    /**
     * @param values A list of global environment variables, which are encrypted using a Cloud Key Management
     * Service crypto key. These values must be specified in the build's Secret. These variables
     * will be available to all build steps in this build.
     */
    @JvmName("aqhtarfmbbhndmhu")
    public suspend fun secretEnvs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secretEnvs = mapped
    }

    /**
     * @param value Requested hash for SourceProvenance.
     * Each value may be one of: `NONE`, `SHA256`, `MD5`.
     */
    @JvmName("ukeoyykjypuynmak")
    public suspend fun sourceProvenanceHashes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceProvenanceHashes = mapped
    }

    /**
     * @param values Requested hash for SourceProvenance.
     * Each value may be one of: `NONE`, `SHA256`, `MD5`.
     */
    @JvmName("femsuwxqstfyrmtw")
    public suspend fun sourceProvenanceHashes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceProvenanceHashes = mapped
    }

    /**
     * @param value Option to specify behavior when there is an error in the substitution checks.
     * NOTE this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden
     * in the build configuration file.
     * Possible values are: `MUST_MATCH`, `ALLOW_LOOSE`.
     */
    @JvmName("fcnenenqmkifhgug")
    public suspend fun substitutionOption(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.substitutionOption = mapped
    }

    /**
     * @param value Global list of volumes to mount for ALL build steps
     * Each volume is created as an empty volume prior to starting the build process.
     * Upon completion of the build, volumes and their contents are discarded. Global
     * volume names and paths cannot conflict with the volumes defined a build step.
     * Using a global volume in a build with only one step is not valid as it is indicative
     * of a build request with an incorrect configuration.
     * Structure is documented below.
     */
    @JvmName("amkqjflclbhkfnmu")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument Global list of volumes to mount for ALL build steps
     * Each volume is created as an empty volume prior to starting the build process.
     * Upon completion of the build, volumes and their contents are discarded. Global
     * volume names and paths cannot conflict with the volumes defined a build step.
     * Using a global volume in a build with only one step is not valid as it is indicative
     * of a build request with an incorrect configuration.
     * Structure is documented below.
     */
    @JvmName("xvpdnltntmelmylg")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TriggerBuildOptionsVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Global list of volumes to mount for ALL build steps
     * Each volume is created as an empty volume prior to starting the build process.
     * Upon completion of the build, volumes and their contents are discarded. Global
     * volume names and paths cannot conflict with the volumes defined a build step.
     * Using a global volume in a build with only one step is not valid as it is indicative
     * of a build request with an incorrect configuration.
     * Structure is documented below.
     */
    @JvmName("afibmncywpfdxiwc")
    public suspend fun volumes(vararg argument: suspend TriggerBuildOptionsVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TriggerBuildOptionsVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Global list of volumes to mount for ALL build steps
     * Each volume is created as an empty volume prior to starting the build process.
     * Upon completion of the build, volumes and their contents are discarded. Global
     * volume names and paths cannot conflict with the volumes defined a build step.
     * Using a global volume in a build with only one step is not valid as it is indicative
     * of a build request with an incorrect configuration.
     * Structure is documented below.
     */
    @JvmName("vxgoyktfuuyjvpvf")
    public suspend fun volumes(argument: suspend TriggerBuildOptionsVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TriggerBuildOptionsVolumeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values Global list of volumes to mount for ALL build steps
     * Each volume is created as an empty volume prior to starting the build process.
     * Upon completion of the build, volumes and their contents are discarded. Global
     * volume names and paths cannot conflict with the volumes defined a build step.
     * Using a global volume in a build with only one step is not valid as it is indicative
     * of a build request with an incorrect configuration.
     * Structure is documented below.
     */
    @JvmName("gxdfuakqyvkjnssj")
    public suspend fun volumes(vararg values: TriggerBuildOptionsVolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param value Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool}
     * This field is experimental.
     */
    @JvmName("sccuerdkuyulsgwh")
    public suspend fun workerPool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workerPool = mapped
    }

    internal fun build(): TriggerBuildOptionsArgs = TriggerBuildOptionsArgs(
        diskSizeGb = diskSizeGb,
        dynamicSubstitutions = dynamicSubstitutions,
        envs = envs,
        logStreamingOption = logStreamingOption,
        logging = logging,
        machineType = machineType,
        requestedVerifyOption = requestedVerifyOption,
        secretEnvs = secretEnvs,
        sourceProvenanceHashes = sourceProvenanceHashes,
        substitutionOption = substitutionOption,
        volumes = volumes,
        workerPool = workerPool,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy