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

com.pulumi.awsnative.glue.kotlin.inputs.TriggerPredicateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.glue.kotlin.inputs

import com.pulumi.awsnative.glue.inputs.TriggerPredicateArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
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 predicate of this trigger, which defines when it will fire.
 * @property conditions A list of the conditions that determine when the trigger will fire.
 * @property logical An optional field if only one condition is listed. If multiple conditions are listed, then this field is required.
 */
public data class TriggerPredicateArgs(
    public val conditions: Output>? = null,
    public val logical: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.glue.inputs.TriggerPredicateArgs =
        com.pulumi.awsnative.glue.inputs.TriggerPredicateArgs.builder()
            .conditions(
                conditions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .logical(logical?.applyValue({ args0 -> args0 })).build()
}

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

    private var logical: Output? = null

    /**
     * @param value A list of the conditions that determine when the trigger will fire.
     */
    @JvmName("pssnnacsnflafoqb")
    public suspend fun conditions(`value`: Output>) {
        this.conditions = value
    }

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

    /**
     * @param values A list of the conditions that determine when the trigger will fire.
     */
    @JvmName("daxnrwhqmgodpoqj")
    public suspend fun conditions(values: List>) {
        this.conditions = Output.all(values)
    }

    /**
     * @param value An optional field if only one condition is listed. If multiple conditions are listed, then this field is required.
     */
    @JvmName("urjpuypmeabtoade")
    public suspend fun logical(`value`: Output) {
        this.logical = value
    }

    /**
     * @param value A list of the conditions that determine when the trigger will fire.
     */
    @JvmName("gkbrgydyoqrmitim")
    public suspend fun conditions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param argument A list of the conditions that determine when the trigger will fire.
     */
    @JvmName("xtpwkwhyrcyveaox")
    public suspend fun conditions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TriggerConditionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param argument A list of the conditions that determine when the trigger will fire.
     */
    @JvmName("nbppvvhxxdyijxjk")
    public suspend fun conditions(vararg argument: suspend TriggerConditionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TriggerConditionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param argument A list of the conditions that determine when the trigger will fire.
     */
    @JvmName("gqajcvobemimygxi")
    public suspend fun conditions(argument: suspend TriggerConditionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TriggerConditionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param values A list of the conditions that determine when the trigger will fire.
     */
    @JvmName("agtkfltwhhsunkjn")
    public suspend fun conditions(vararg values: TriggerConditionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param value An optional field if only one condition is listed. If multiple conditions are listed, then this field is required.
     */
    @JvmName("rpnfkvixjqipncvt")
    public suspend fun logical(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logical = mapped
    }

    internal fun build(): TriggerPredicateArgs = TriggerPredicateArgs(
        conditions = conditions,
        logical = logical,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy