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

com.pulumi.awsnative.iotevents.kotlin.inputs.DetectorModelTransitionEventArgs.kt Maven / Gradle / Ivy

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

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

import com.pulumi.awsnative.iotevents.inputs.DetectorModelTransitionEventArgs.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 `performed and the next `state` entered when a `condition` evaluates to `TRUE`.
 * @property actions The actions to be performed.
 * @property condition A Boolean expression that when `TRUE` causes the `actions` to be performed and the `nextState` to be entered.
 * @property eventName The name of the event.
 * @property nextState The next state to enter.
 */
public data class DetectorModelTransitionEventArgs(
    public val actions: Output>? = null,
    public val condition: Output,
    public val eventName: Output,
    public val nextState: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iotevents.inputs.DetectorModelTransitionEventArgs =
        com.pulumi.awsnative.iotevents.inputs.DetectorModelTransitionEventArgs.builder()
            .actions(
                actions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .condition(condition.applyValue({ args0 -> args0 }))
            .eventName(eventName.applyValue({ args0 -> args0 }))
            .nextState(nextState.applyValue({ args0 -> args0 })).build()
}

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

    private var condition: Output? = null

    private var eventName: Output? = null

    private var nextState: Output? = null

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

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

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

    /**
     * @param value A Boolean expression that when `TRUE` causes the `actions` to be performed and the `nextState` to be entered.
     */
    @JvmName("ngcmrukuwyycsmmo")
    public suspend fun condition(`value`: Output) {
        this.condition = value
    }

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

    /**
     * @param value The next state to enter.
     */
    @JvmName("hygxmqoqogrclmfb")
    public suspend fun nextState(`value`: Output) {
        this.nextState = value
    }

    /**
     * @param value The actions to be performed.
     */
    @JvmName("jvyyixbsvoxwutae")
    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("xqfisxlkedjkanxu")
    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("conkqvdmcywvxnii")
    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("uwxnwtefxhekagfb")
    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("ntjkubpdcgbulgtx")
    public suspend fun actions(vararg values: DetectorModelActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value A Boolean expression that when `TRUE` causes the `actions` to be performed and the `nextState` to be entered.
     */
    @JvmName("picufwlsfyqnudwf")
    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("qosofmwrvusfjcgx")
    public suspend fun eventName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventName = mapped
    }

    /**
     * @param value The next state to enter.
     */
    @JvmName("kaupgvjbpcvxmoil")
    public suspend fun nextState(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nextState = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy