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

com.pulumi.gcp.cloudbuild.kotlin.inputs.TriggerSourceToBuildArgs.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.12.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.TriggerSourceToBuildArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property bitbucketServerConfig The full resource name of the bitbucket server config.
 * Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
 * @property githubEnterpriseConfig The full resource name of the github enterprise config.
 * Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
 * @property ref The branch or tag to use. Must start with "refs/" (required).
 * @property repoType The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
 * Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
 * Possible values are: `UNKNOWN`, `CLOUD_SOURCE_REPOSITORIES`, `GITHUB`, `BITBUCKET_SERVER`.
 * @property repository The qualified resource name of the Repo API repository.
 * Either uri or repository can be specified and is required.
 * @property uri The URI of the repo.
 */
public data class TriggerSourceToBuildArgs(
    public val bitbucketServerConfig: Output? = null,
    public val githubEnterpriseConfig: Output? = null,
    public val ref: Output,
    public val repoType: Output,
    public val repository: Output? = null,
    public val uri: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs =
        com.pulumi.gcp.cloudbuild.inputs.TriggerSourceToBuildArgs.builder()
            .bitbucketServerConfig(bitbucketServerConfig?.applyValue({ args0 -> args0 }))
            .githubEnterpriseConfig(githubEnterpriseConfig?.applyValue({ args0 -> args0 }))
            .ref(ref.applyValue({ args0 -> args0 }))
            .repoType(repoType.applyValue({ args0 -> args0 }))
            .repository(repository?.applyValue({ args0 -> args0 }))
            .uri(uri?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TriggerSourceToBuildArgs].
 */
@PulumiTagMarker
public class TriggerSourceToBuildArgsBuilder internal constructor() {
    private var bitbucketServerConfig: Output? = null

    private var githubEnterpriseConfig: Output? = null

    private var ref: Output? = null

    private var repoType: Output? = null

    private var repository: Output? = null

    private var uri: Output? = null

    /**
     * @param value The full resource name of the bitbucket server config.
     * Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
     */
    @JvmName("egckfupwshlcmuvp")
    public suspend fun bitbucketServerConfig(`value`: Output) {
        this.bitbucketServerConfig = value
    }

    /**
     * @param value The full resource name of the github enterprise config.
     * Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
     */
    @JvmName("uvhhwgmnfnioqjrm")
    public suspend fun githubEnterpriseConfig(`value`: Output) {
        this.githubEnterpriseConfig = value
    }

    /**
     * @param value The branch or tag to use. Must start with "refs/" (required).
     */
    @JvmName("fehccuhtercbipjx")
    public suspend fun ref(`value`: Output) {
        this.ref = value
    }

    /**
     * @param value The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
     * Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
     * Possible values are: `UNKNOWN`, `CLOUD_SOURCE_REPOSITORIES`, `GITHUB`, `BITBUCKET_SERVER`.
     */
    @JvmName("gtlbxfhihmxcwwcj")
    public suspend fun repoType(`value`: Output) {
        this.repoType = value
    }

    /**
     * @param value The qualified resource name of the Repo API repository.
     * Either uri or repository can be specified and is required.
     */
    @JvmName("thxtqftlqwecqsyk")
    public suspend fun repository(`value`: Output) {
        this.repository = value
    }

    /**
     * @param value The URI of the repo.
     */
    @JvmName("odnhfossrtlxnqwv")
    public suspend fun uri(`value`: Output) {
        this.uri = value
    }

    /**
     * @param value The full resource name of the bitbucket server config.
     * Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
     */
    @JvmName("ttxfjerynbcvvgku")
    public suspend fun bitbucketServerConfig(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bitbucketServerConfig = mapped
    }

    /**
     * @param value The full resource name of the github enterprise config.
     * Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
     */
    @JvmName("ttivbymbhvwlwupi")
    public suspend fun githubEnterpriseConfig(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.githubEnterpriseConfig = mapped
    }

    /**
     * @param value The branch or tag to use. Must start with "refs/" (required).
     */
    @JvmName("ygiyyawiuxirxvqn")
    public suspend fun ref(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ref = mapped
    }

    /**
     * @param value The type of the repo, since it may not be explicit from the repo field (e.g from a URL).
     * Values can be UNKNOWN, CLOUD_SOURCE_REPOSITORIES, GITHUB, BITBUCKET_SERVER
     * Possible values are: `UNKNOWN`, `CLOUD_SOURCE_REPOSITORIES`, `GITHUB`, `BITBUCKET_SERVER`.
     */
    @JvmName("amcrjrjuaplvtlbk")
    public suspend fun repoType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.repoType = mapped
    }

    /**
     * @param value The qualified resource name of the Repo API repository.
     * Either uri or repository can be specified and is required.
     */
    @JvmName("uwcjwcdudkenqqbu")
    public suspend fun repository(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repository = mapped
    }

    /**
     * @param value The URI of the repo.
     */
    @JvmName("vhplrfruvjtqnbrp")
    public suspend fun uri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uri = mapped
    }

    internal fun build(): TriggerSourceToBuildArgs = TriggerSourceToBuildArgs(
        bitbucketServerConfig = bitbucketServerConfig,
        githubEnterpriseConfig = githubEnterpriseConfig,
        ref = ref ?: throw PulumiNullFieldException("ref"),
        repoType = repoType ?: throw PulumiNullFieldException("repoType"),
        repository = repository,
        uri = uri,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy