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

com.pulumi.gcp.cloudbuild.kotlin.inputs.TriggerBuildSourceRepoSourceArgs.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.cloudbuild.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceRepoSourceArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property branchName Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided.
 * The syntax of the regular expressions accepted is the syntax accepted by RE2 and
 * described at https://github.com/google/re2/wiki/Syntax
 * @property commitSha Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
 * @property dir Directory, relative to the source root, in which to run the build.
 * This must be a relative path. If a step's dir is specified and is an absolute path,
 * this value is ignored for that step's execution.
 * @property invertRegex Only trigger a build if the revision regex does NOT match the revision regex.
 * @property projectId ID of the project that owns the Cloud Source Repository.
 * If omitted, the project ID requesting the build is assumed.
 * @property repoName Name of the Cloud Source Repository.
 * @property substitutions Substitutions to use in a triggered build. Should only be used with triggers.run
 * @property tagName Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided.
 * The syntax of the regular expressions accepted is the syntax accepted by RE2 and
 * described at https://github.com/google/re2/wiki/Syntax
 */
public data class TriggerBuildSourceRepoSourceArgs(
    public val branchName: Output? = null,
    public val commitSha: Output? = null,
    public val dir: Output? = null,
    public val invertRegex: Output? = null,
    public val projectId: Output? = null,
    public val repoName: Output,
    public val substitutions: Output>? = null,
    public val tagName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceRepoSourceArgs =
        com.pulumi.gcp.cloudbuild.inputs.TriggerBuildSourceRepoSourceArgs.builder()
            .branchName(branchName?.applyValue({ args0 -> args0 }))
            .commitSha(commitSha?.applyValue({ args0 -> args0 }))
            .dir(dir?.applyValue({ args0 -> args0 }))
            .invertRegex(invertRegex?.applyValue({ args0 -> args0 }))
            .projectId(projectId?.applyValue({ args0 -> args0 }))
            .repoName(repoName.applyValue({ args0 -> args0 }))
            .substitutions(
                substitutions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .tagName(tagName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TriggerBuildSourceRepoSourceArgs].
 */
@PulumiTagMarker
public class TriggerBuildSourceRepoSourceArgsBuilder internal constructor() {
    private var branchName: Output? = null

    private var commitSha: Output? = null

    private var dir: Output? = null

    private var invertRegex: Output? = null

    private var projectId: Output? = null

    private var repoName: Output? = null

    private var substitutions: Output>? = null

    private var tagName: Output? = null

    /**
     * @param value Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided.
     * The syntax of the regular expressions accepted is the syntax accepted by RE2 and
     * described at https://github.com/google/re2/wiki/Syntax
     */
    @JvmName("wsfruyovlhamgyuu")
    public suspend fun branchName(`value`: Output) {
        this.branchName = value
    }

    /**
     * @param value Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
     */
    @JvmName("uwtnbuovmjfwfmft")
    public suspend fun commitSha(`value`: Output) {
        this.commitSha = value
    }

    /**
     * @param value Directory, relative to the source root, in which to run the build.
     * This must be a relative path. If a step's dir is specified and is an absolute path,
     * this value is ignored for that step's execution.
     */
    @JvmName("humlatnhgyawpxvu")
    public suspend fun dir(`value`: Output) {
        this.dir = value
    }

    /**
     * @param value Only trigger a build if the revision regex does NOT match the revision regex.
     */
    @JvmName("xubkvimjrffokdcn")
    public suspend fun invertRegex(`value`: Output) {
        this.invertRegex = value
    }

    /**
     * @param value ID of the project that owns the Cloud Source Repository.
     * If omitted, the project ID requesting the build is assumed.
     */
    @JvmName("cnabvdvpqepdiwuh")
    public suspend fun projectId(`value`: Output) {
        this.projectId = value
    }

    /**
     * @param value Name of the Cloud Source Repository.
     */
    @JvmName("megndmgvkhjcgtij")
    public suspend fun repoName(`value`: Output) {
        this.repoName = value
    }

    /**
     * @param value Substitutions to use in a triggered build. Should only be used with triggers.run
     */
    @JvmName("nynajmnbkqjgdjxe")
    public suspend fun substitutions(`value`: Output>) {
        this.substitutions = value
    }

    /**
     * @param value Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided.
     * The syntax of the regular expressions accepted is the syntax accepted by RE2 and
     * described at https://github.com/google/re2/wiki/Syntax
     */
    @JvmName("ttvlpnxcjllebdgv")
    public suspend fun tagName(`value`: Output) {
        this.tagName = value
    }

    /**
     * @param value Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided.
     * The syntax of the regular expressions accepted is the syntax accepted by RE2 and
     * described at https://github.com/google/re2/wiki/Syntax
     */
    @JvmName("xjnwkpujexhyhrsh")
    public suspend fun branchName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.branchName = mapped
    }

    /**
     * @param value Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.
     */
    @JvmName("cwjrlilywsrenpji")
    public suspend fun commitSha(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commitSha = mapped
    }

    /**
     * @param value Directory, relative to the source root, in which to run the build.
     * This must be a relative path. If a step's dir is specified and is an absolute path,
     * this value is ignored for that step's execution.
     */
    @JvmName("fujokvjxuqqnirpi")
    public suspend fun dir(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dir = mapped
    }

    /**
     * @param value Only trigger a build if the revision regex does NOT match the revision regex.
     */
    @JvmName("dyipvigmwxswooxa")
    public suspend fun invertRegex(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.invertRegex = mapped
    }

    /**
     * @param value ID of the project that owns the Cloud Source Repository.
     * If omitted, the project ID requesting the build is assumed.
     */
    @JvmName("lqfttdeqxrpafjvc")
    public suspend fun projectId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.projectId = mapped
    }

    /**
     * @param value Name of the Cloud Source Repository.
     */
    @JvmName("gfqslkkkvmbjswch")
    public suspend fun repoName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.repoName = mapped
    }

    /**
     * @param value Substitutions to use in a triggered build. Should only be used with triggers.run
     */
    @JvmName("jelecpqnahsxqgwq")
    public suspend fun substitutions(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.substitutions = mapped
    }

    /**
     * @param values Substitutions to use in a triggered build. Should only be used with triggers.run
     */
    @JvmName("oqnmtejtapipvkix")
    public fun substitutions(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.substitutions = mapped
    }

    /**
     * @param value Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided.
     * The syntax of the regular expressions accepted is the syntax accepted by RE2 and
     * described at https://github.com/google/re2/wiki/Syntax
     */
    @JvmName("jmjxbxekvhwthhda")
    public suspend fun tagName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagName = mapped
    }

    internal fun build(): TriggerBuildSourceRepoSourceArgs = TriggerBuildSourceRepoSourceArgs(
        branchName = branchName,
        commitSha = commitSha,
        dir = dir,
        invertRegex = invertRegex,
        projectId = projectId,
        repoName = repoName ?: throw PulumiNullFieldException("repoName"),
        substitutions = substitutions,
        tagName = tagName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy