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

com.pulumi.azurenative.datafactory.kotlin.inputs.ScheduleTriggerArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.datafactory.kotlin.inputs

import com.pulumi.azurenative.datafactory.inputs.ScheduleTriggerArgs.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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Trigger that creates pipeline runs periodically, on schedule.
 * @property annotations List of tags that can be used for describing the trigger.
 * @property description Trigger description.
 * @property pipelines Pipelines that need to be started.
 * @property recurrence Recurrence schedule configuration.
 * @property type Trigger type.
 * Expected value is 'ScheduleTrigger'.
 */
public data class ScheduleTriggerArgs(
    public val annotations: Output>? = null,
    public val description: Output? = null,
    public val pipelines: Output>? = null,
    public val recurrence: Output,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.datafactory.inputs.ScheduleTriggerArgs =
        com.pulumi.azurenative.datafactory.inputs.ScheduleTriggerArgs.builder()
            .annotations(annotations?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .pipelines(
                pipelines?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .recurrence(recurrence.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ScheduleTriggerArgs].
 */
@PulumiTagMarker
public class ScheduleTriggerArgsBuilder internal constructor() {
    private var annotations: Output>? = null

    private var description: Output? = null

    private var pipelines: Output>? = null

    private var recurrence: Output? = null

    private var type: Output? = null

    /**
     * @param value List of tags that can be used for describing the trigger.
     */
    @JvmName("mprrjkcmwekotefx")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

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

    /**
     * @param values List of tags that can be used for describing the trigger.
     */
    @JvmName("umfubvdgwbuumaik")
    public suspend fun annotations(values: List>) {
        this.annotations = Output.all(values)
    }

    /**
     * @param value Trigger description.
     */
    @JvmName("dniopqdhfxgwnyod")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Pipelines that need to be started.
     */
    @JvmName("tyiyhrlllogqepwu")
    public suspend fun pipelines(`value`: Output>) {
        this.pipelines = value
    }

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

    /**
     * @param values Pipelines that need to be started.
     */
    @JvmName("bgcwxvwmxcwwpydv")
    public suspend fun pipelines(values: List>) {
        this.pipelines = Output.all(values)
    }

    /**
     * @param value Recurrence schedule configuration.
     */
    @JvmName("ewgctlllvlicqyem")
    public suspend fun recurrence(`value`: Output) {
        this.recurrence = value
    }

    /**
     * @param value Trigger type.
     * Expected value is 'ScheduleTrigger'.
     */
    @JvmName("dxjtmphwdsmkulkc")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value List of tags that can be used for describing the trigger.
     */
    @JvmName("iefpmfcrcwjjpxpo")
    public suspend fun annotations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values List of tags that can be used for describing the trigger.
     */
    @JvmName("mvrhevgssnvtfxka")
    public suspend fun annotations(vararg values: Any) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value Trigger description.
     */
    @JvmName("wjijpgykqrmpgpxa")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Pipelines that need to be started.
     */
    @JvmName("rkuqsyyiowpauwqj")
    public suspend fun pipelines(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pipelines = mapped
    }

    /**
     * @param argument Pipelines that need to be started.
     */
    @JvmName("eykpcgcsucunfpdc")
    public suspend fun pipelines(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TriggerPipelineReferenceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.pipelines = mapped
    }

    /**
     * @param argument Pipelines that need to be started.
     */
    @JvmName("pefvhusoqtaaeytl")
    public suspend fun pipelines(vararg argument: suspend TriggerPipelineReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TriggerPipelineReferenceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.pipelines = mapped
    }

    /**
     * @param argument Pipelines that need to be started.
     */
    @JvmName("vjavkodfdcyvixap")
    public suspend fun pipelines(argument: suspend TriggerPipelineReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TriggerPipelineReferenceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.pipelines = mapped
    }

    /**
     * @param values Pipelines that need to be started.
     */
    @JvmName("yksspflhncgboqab")
    public suspend fun pipelines(vararg values: TriggerPipelineReferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pipelines = mapped
    }

    /**
     * @param value Recurrence schedule configuration.
     */
    @JvmName("kcmmxsdxmaoyrbog")
    public suspend fun recurrence(`value`: ScheduleTriggerRecurrenceArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.recurrence = mapped
    }

    /**
     * @param argument Recurrence schedule configuration.
     */
    @JvmName("mwppcrqgrnceflgm")
    public suspend fun recurrence(argument: suspend ScheduleTriggerRecurrenceArgsBuilder.() -> Unit) {
        val toBeMapped = ScheduleTriggerRecurrenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.recurrence = mapped
    }

    /**
     * @param value Trigger type.
     * Expected value is 'ScheduleTrigger'.
     */
    @JvmName("cxuwerhkuwtwraxh")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ScheduleTriggerArgs = ScheduleTriggerArgs(
        annotations = annotations,
        description = description,
        pipelines = pipelines,
        recurrence = recurrence ?: throw PulumiNullFieldException("recurrence"),
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy