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

com.pulumi.gcp.cloudbuild.kotlin.inputs.TriggerBitbucketServerTriggerConfigArgs.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.TriggerBitbucketServerTriggerConfigArgs.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.jvm.JvmName

/**
 *
 * @property bitbucketServerConfigResource The Bitbucket server config resource that this trigger config maps to.
 * @property projectKey Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
 * @property pullRequest Filter to match changes in pull requests.
 * Structure is documented below.
 * @property push Filter to match changes in refs like branches, tags.
 * Structure is documented below.
 * @property repoSlug Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL.
 * For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
 */
public data class TriggerBitbucketServerTriggerConfigArgs(
    public val bitbucketServerConfigResource: Output,
    public val projectKey: Output,
    public val pullRequest: Output? = null,
    public val push: Output? = null,
    public val repoSlug: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudbuild.inputs.TriggerBitbucketServerTriggerConfigArgs =
        com.pulumi.gcp.cloudbuild.inputs.TriggerBitbucketServerTriggerConfigArgs.builder()
            .bitbucketServerConfigResource(bitbucketServerConfigResource.applyValue({ args0 -> args0 }))
            .projectKey(projectKey.applyValue({ args0 -> args0 }))
            .pullRequest(pullRequest?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .push(push?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .repoSlug(repoSlug.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TriggerBitbucketServerTriggerConfigArgs].
 */
@PulumiTagMarker
public class TriggerBitbucketServerTriggerConfigArgsBuilder internal constructor() {
    private var bitbucketServerConfigResource: Output? = null

    private var projectKey: Output? = null

    private var pullRequest: Output? = null

    private var push: Output? = null

    private var repoSlug: Output? = null

    /**
     * @param value The Bitbucket server config resource that this trigger config maps to.
     */
    @JvmName("ympeiegfhdpfnusm")
    public suspend fun bitbucketServerConfigResource(`value`: Output) {
        this.bitbucketServerConfigResource = value
    }

    /**
     * @param value Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
     */
    @JvmName("ngsybtemqnqcxelr")
    public suspend fun projectKey(`value`: Output) {
        this.projectKey = value
    }

    /**
     * @param value Filter to match changes in pull requests.
     * Structure is documented below.
     */
    @JvmName("nytitjsmqvytojtn")
    public suspend fun pullRequest(`value`: Output) {
        this.pullRequest = value
    }

    /**
     * @param value Filter to match changes in refs like branches, tags.
     * Structure is documented below.
     */
    @JvmName("kksasvhhrisqmvxn")
    public suspend fun push(`value`: Output) {
        this.push = value
    }

    /**
     * @param value Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL.
     * For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
     */
    @JvmName("gbyqanvwamlyswca")
    public suspend fun repoSlug(`value`: Output) {
        this.repoSlug = value
    }

    /**
     * @param value The Bitbucket server config resource that this trigger config maps to.
     */
    @JvmName("vuacbjqbvymhqawg")
    public suspend fun bitbucketServerConfigResource(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.bitbucketServerConfigResource = mapped
    }

    /**
     * @param value Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is "TEST".
     */
    @JvmName("ndylsltpcqytjjkb")
    public suspend fun projectKey(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.projectKey = mapped
    }

    /**
     * @param value Filter to match changes in pull requests.
     * Structure is documented below.
     */
    @JvmName("edwhwyviuhxrfmpa")
    public suspend fun pullRequest(`value`: TriggerBitbucketServerTriggerConfigPullRequestArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pullRequest = mapped
    }

    /**
     * @param argument Filter to match changes in pull requests.
     * Structure is documented below.
     */
    @JvmName("cldusmxeifvlqflh")
    public suspend fun pullRequest(argument: suspend TriggerBitbucketServerTriggerConfigPullRequestArgsBuilder.() -> Unit) {
        val toBeMapped = TriggerBitbucketServerTriggerConfigPullRequestArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.pullRequest = mapped
    }

    /**
     * @param value Filter to match changes in refs like branches, tags.
     * Structure is documented below.
     */
    @JvmName("wwyacydqnhlljqmg")
    public suspend fun push(`value`: TriggerBitbucketServerTriggerConfigPushArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.push = mapped
    }

    /**
     * @param argument Filter to match changes in refs like branches, tags.
     * Structure is documented below.
     */
    @JvmName("ulhhaxoslahqkfpd")
    public suspend fun push(argument: suspend TriggerBitbucketServerTriggerConfigPushArgsBuilder.() -> Unit) {
        val toBeMapped = TriggerBitbucketServerTriggerConfigPushArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.push = mapped
    }

    /**
     * @param value Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL.
     * For example, if the repository name is 'test repo', in the URL it would become 'test-repo' as in https://mybitbucket.server/projects/TEST/repos/test-repo.
     */
    @JvmName("uaffvycykyjtphor")
    public suspend fun repoSlug(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.repoSlug = mapped
    }

    internal fun build(): TriggerBitbucketServerTriggerConfigArgs =
        TriggerBitbucketServerTriggerConfigArgs(
            bitbucketServerConfigResource = bitbucketServerConfigResource ?: throw
                PulumiNullFieldException("bitbucketServerConfigResource"),
            projectKey = projectKey ?: throw PulumiNullFieldException("projectKey"),
            pullRequest = pullRequest,
            push = push,
            repoSlug = repoSlug ?: throw PulumiNullFieldException("repoSlug"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy