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

com.pulumi.azurenative.containerregistry.kotlin.inputs.SourceTriggerArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.containerregistry.kotlin.inputs

import com.pulumi.azurenative.containerregistry.inputs.SourceTriggerArgs.builder
import com.pulumi.azurenative.containerregistry.kotlin.enums.SourceTriggerEvent
import com.pulumi.azurenative.containerregistry.kotlin.enums.TriggerStatus
import com.pulumi.core.Either
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The properties of a source based trigger.
 * @property name The name of the trigger.
 * @property sourceRepository The properties that describes the source(code) for the task.
 * @property sourceTriggerEvents The source event corresponding to the trigger.
 * @property status The current status of trigger.
 */
public data class SourceTriggerArgs(
    public val name: Output,
    public val sourceRepository: Output,
    public val sourceTriggerEvents: Output>>,
    public val status: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.containerregistry.inputs.SourceTriggerArgs =
        com.pulumi.azurenative.containerregistry.inputs.SourceTriggerArgs.builder()
            .name(name.applyValue({ args0 -> args0 }))
            .sourceRepository(sourceRepository.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sourceTriggerEvents(
                sourceTriggerEvents.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                    })
                }),
            )
            .status(
                status?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [SourceTriggerArgs].
 */
@PulumiTagMarker
public class SourceTriggerArgsBuilder internal constructor() {
    private var name: Output? = null

    private var sourceRepository: Output? = null

    private var sourceTriggerEvents: Output>>? = null

    private var status: Output>? = null

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

    /**
     * @param value The properties that describes the source(code) for the task.
     */
    @JvmName("gsyekrtuoeajmwqn")
    public suspend fun sourceRepository(`value`: Output) {
        this.sourceRepository = value
    }

    /**
     * @param value The source event corresponding to the trigger.
     */
    @JvmName("aiqwtjeiweooqdbt")
    public suspend fun sourceTriggerEvents(`value`: Output>>) {
        this.sourceTriggerEvents = value
    }

    @JvmName("eysacdfvwsbrjqpj")
    public suspend fun sourceTriggerEvents(vararg values: Output>) {
        this.sourceTriggerEvents = Output.all(values.asList())
    }

    /**
     * @param values The source event corresponding to the trigger.
     */
    @JvmName("gpglctchcihhnfif")
    public suspend fun sourceTriggerEvents(values: List>>) {
        this.sourceTriggerEvents = Output.all(values)
    }

    /**
     * @param value The current status of trigger.
     */
    @JvmName("htklpkahigxlenab")
    public suspend fun status(`value`: Output>) {
        this.status = value
    }

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

    /**
     * @param value The properties that describes the source(code) for the task.
     */
    @JvmName("blnmfhvqohkteieh")
    public suspend fun sourceRepository(`value`: SourcePropertiesArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceRepository = mapped
    }

    /**
     * @param argument The properties that describes the source(code) for the task.
     */
    @JvmName("svkmvlcasbyoipjy")
    public suspend fun sourceRepository(argument: suspend SourcePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = SourcePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceRepository = mapped
    }

    /**
     * @param value The source event corresponding to the trigger.
     */
    @JvmName("bcvnmlvlsnplwagn")
    public suspend fun sourceTriggerEvents(`value`: List>) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceTriggerEvents = mapped
    }

    /**
     * @param values The source event corresponding to the trigger.
     */
    @JvmName("snjhhnoyirvnojjv")
    public suspend fun sourceTriggerEvents(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceTriggerEvents = mapped
    }

    /**
     * @param value The current status of trigger.
     */
    @JvmName("ehokbkpkbyfgjlbc")
    public suspend fun status(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value The current status of trigger.
     */
    @JvmName("iinvjfxrswfcplaj")
    public fun status(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value The current status of trigger.
     */
    @JvmName("ruvmtgwqddvvgcom")
    public fun status(`value`: TriggerStatus) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

    internal fun build(): SourceTriggerArgs = SourceTriggerArgs(
        name = name ?: throw PulumiNullFieldException("name"),
        sourceRepository = sourceRepository ?: throw PulumiNullFieldException("sourceRepository"),
        sourceTriggerEvents = sourceTriggerEvents ?: throw PulumiNullFieldException("sourceTriggerEvents"),
        status = status,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy