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

com.pulumi.azure.containerservice.kotlin.inputs.RegistryTaskSourceTriggerArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.containerservice.kotlin.inputs

import com.pulumi.azure.containerservice.inputs.RegistryTaskSourceTriggerArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property authentication A `authentication` block as defined above.
 * @property branch The branch name of the source code.
 * @property enabled Should the trigger be enabled? Defaults to `true`.
 * @property events Specifies a list of source events corresponding to the trigger. Possible values are `commit` and `pullrequest`.
 * @property name The name which should be used for this trigger.
 * @property repositoryUrl The full URL to the source code repository.
 * @property sourceType The type of the source control service. Possible values are `Github` and `VisualStudioTeamService`.
 */
public data class RegistryTaskSourceTriggerArgs(
    public val authentication: Output? = null,
    public val branch: Output? = null,
    public val enabled: Output? = null,
    public val events: Output>,
    public val name: Output,
    public val repositoryUrl: Output,
    public val sourceType: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerservice.inputs.RegistryTaskSourceTriggerArgs =
        com.pulumi.azure.containerservice.inputs.RegistryTaskSourceTriggerArgs.builder()
            .authentication(authentication?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .branch(branch?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .events(events.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name.applyValue({ args0 -> args0 }))
            .repositoryUrl(repositoryUrl.applyValue({ args0 -> args0 }))
            .sourceType(sourceType.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RegistryTaskSourceTriggerArgs].
 */
@PulumiTagMarker
public class RegistryTaskSourceTriggerArgsBuilder internal constructor() {
    private var authentication: Output? = null

    private var branch: Output? = null

    private var enabled: Output? = null

    private var events: Output>? = null

    private var name: Output? = null

    private var repositoryUrl: Output? = null

    private var sourceType: Output? = null

    /**
     * @param value A `authentication` block as defined above.
     */
    @JvmName("idwvdcipyoprkkog")
    public suspend fun authentication(`value`: Output) {
        this.authentication = value
    }

    /**
     * @param value The branch name of the source code.
     */
    @JvmName("swthdluflvapnqyu")
    public suspend fun branch(`value`: Output) {
        this.branch = value
    }

    /**
     * @param value Should the trigger be enabled? Defaults to `true`.
     */
    @JvmName("jiiipgnjahnosoti")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Specifies a list of source events corresponding to the trigger. Possible values are `commit` and `pullrequest`.
     */
    @JvmName("xowdaphekbnkxtos")
    public suspend fun events(`value`: Output>) {
        this.events = value
    }

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

    /**
     * @param values Specifies a list of source events corresponding to the trigger. Possible values are `commit` and `pullrequest`.
     */
    @JvmName("joeycywbnbadkthq")
    public suspend fun events(values: List>) {
        this.events = Output.all(values)
    }

    /**
     * @param value The name which should be used for this trigger.
     */
    @JvmName("pbaxtyhuyqhkjkah")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The full URL to the source code repository.
     */
    @JvmName("nehytromofuubxnv")
    public suspend fun repositoryUrl(`value`: Output) {
        this.repositoryUrl = value
    }

    /**
     * @param value The type of the source control service. Possible values are `Github` and `VisualStudioTeamService`.
     */
    @JvmName("hyujxdfsowsupplv")
    public suspend fun sourceType(`value`: Output) {
        this.sourceType = value
    }

    /**
     * @param value A `authentication` block as defined above.
     */
    @JvmName("alvoujoyswisatxn")
    public suspend fun authentication(`value`: RegistryTaskSourceTriggerAuthenticationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authentication = mapped
    }

    /**
     * @param argument A `authentication` block as defined above.
     */
    @JvmName("feauuqosjumjkkqe")
    public suspend fun authentication(argument: suspend RegistryTaskSourceTriggerAuthenticationArgsBuilder.() -> Unit) {
        val toBeMapped = RegistryTaskSourceTriggerAuthenticationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.authentication = mapped
    }

    /**
     * @param value The branch name of the source code.
     */
    @JvmName("qohdetjxxxjymeaq")
    public suspend fun branch(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.branch = mapped
    }

    /**
     * @param value Should the trigger be enabled? Defaults to `true`.
     */
    @JvmName("agpuehhowsryrxwi")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Specifies a list of source events corresponding to the trigger. Possible values are `commit` and `pullrequest`.
     */
    @JvmName("ngvgcthgfftrtetg")
    public suspend fun events(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.events = mapped
    }

    /**
     * @param values Specifies a list of source events corresponding to the trigger. Possible values are `commit` and `pullrequest`.
     */
    @JvmName("wvtvqosabarawdhp")
    public suspend fun events(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.events = mapped
    }

    /**
     * @param value The name which should be used for this trigger.
     */
    @JvmName("njvhthrkxkyrfrhw")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The full URL to the source code repository.
     */
    @JvmName("wmlhwinvjegcqkhl")
    public suspend fun repositoryUrl(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.repositoryUrl = mapped
    }

    /**
     * @param value The type of the source control service. Possible values are `Github` and `VisualStudioTeamService`.
     */
    @JvmName("nxwnxrihqwerxipm")
    public suspend fun sourceType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceType = mapped
    }

    internal fun build(): RegistryTaskSourceTriggerArgs = RegistryTaskSourceTriggerArgs(
        authentication = authentication,
        branch = branch,
        enabled = enabled,
        events = events ?: throw PulumiNullFieldException("events"),
        name = name ?: throw PulumiNullFieldException("name"),
        repositoryUrl = repositoryUrl ?: throw PulumiNullFieldException("repositoryUrl"),
        sourceType = sourceType ?: throw PulumiNullFieldException("sourceType"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy