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

com.pulumi.awsnative.iotevents.kotlin.inputs.DetectorModelEventArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.iotevents.kotlin.inputs

import com.pulumi.awsnative.iotevents.inputs.DetectorModelEventArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies the `actions` to be performed when the `condition` evaluates to `TRUE`.
 * @property actions The actions to be performed.
 * @property condition The Boolean expression that, when `TRUE`, causes the `actions` to be performed. If not present, the `actions` are performed (=`TRUE`). If the expression result is not a `Boolean` value, the `actions` are not performed (=`FALSE`).
 * @property eventName The name of the event.
 */
public data class DetectorModelEventArgs(
    public val actions: Output>? = null,
    public val condition: Output? = null,
    public val eventName: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iotevents.inputs.DetectorModelEventArgs =
        com.pulumi.awsnative.iotevents.inputs.DetectorModelEventArgs.builder()
            .actions(
                actions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .condition(condition?.applyValue({ args0 -> args0 }))
            .eventName(eventName.applyValue({ args0 -> args0 })).build()
}

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

    private var condition: Output? = null

    private var eventName: Output? = null

    /**
     * @param value The actions to be performed.
     */
    @JvmName("ogipfmvivnsvyssi")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values The actions to be performed.
     */
    @JvmName("cybfjybfqnxbktxh")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

    /**
     * @param value The Boolean expression that, when `TRUE`, causes the `actions` to be performed. If not present, the `actions` are performed (=`TRUE`). If the expression result is not a `Boolean` value, the `actions` are not performed (=`FALSE`).
     */
    @JvmName("fjurndrocxddtpcq")
    public suspend fun condition(`value`: Output) {
        this.condition = value
    }

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

    /**
     * @param value The actions to be performed.
     */
    @JvmName("stilhiiklbjkibsr")
    public suspend fun actions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param argument The actions to be performed.
     */
    @JvmName("oliuodoukvadknse")
    public suspend fun actions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DetectorModelActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument The actions to be performed.
     */
    @JvmName("ikcvdfclkfomckca")
    public suspend fun actions(vararg argument: suspend DetectorModelActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DetectorModelActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument The actions to be performed.
     */
    @JvmName("hpqydikmgwjeyvtx")
    public suspend fun actions(argument: suspend DetectorModelActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DetectorModelActionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param values The actions to be performed.
     */
    @JvmName("xpwuikivqnnjrmcy")
    public suspend fun actions(vararg values: DetectorModelActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value The Boolean expression that, when `TRUE`, causes the `actions` to be performed. If not present, the `actions` are performed (=`TRUE`). If the expression result is not a `Boolean` value, the `actions` are not performed (=`FALSE`).
     */
    @JvmName("ulombmdpqbyfaibp")
    public suspend fun condition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.condition = mapped
    }

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

    internal fun build(): DetectorModelEventArgs = DetectorModelEventArgs(
        actions = actions,
        condition = condition,
        eventName = eventName ?: throw PulumiNullFieldException("eventName"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy