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

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

package com.pulumi.awsnative.iotevents.kotlin

import com.pulumi.awsnative.iotevents.DetectorModelArgs.builder
import com.pulumi.awsnative.iotevents.kotlin.enums.DetectorModelEvaluationMethod
import com.pulumi.awsnative.iotevents.kotlin.inputs.DetectorModelDefinitionArgs
import com.pulumi.awsnative.iotevents.kotlin.inputs.DetectorModelDefinitionArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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 AWS::IoTEvents::DetectorModel resource creates a detector model. You create a *detector model* (a model of your equipment or process) using *states*. For each state, you define conditional (Boolean) logic that evaluates the incoming inputs to detect significant events. When an event is detected, it can change the state or trigger custom-built or predefined actions using other AWS services. You can define additional events that trigger actions when entering or exiting a state and, optionally, when a condition is met. For more information, see [How to Use AWS IoT Events](https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html) in the *AWS IoT Events Developer Guide*.
 * @property detectorModelDefinition Information that defines how a detector operates.
 * @property detectorModelDescription A brief description of the detector model.
 * @property detectorModelName The name of the detector model.
 * @property evaluationMethod Information about the order in which events are evaluated and how actions are executed.
 * @property key The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.
 * This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.
 * @property roleArn The ARN of the role that grants permission to AWS IoT Events to perform its operations.
 * @property tags An array of key-value pairs to apply to this resource.
 * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
 */
public data class DetectorModelArgs(
    public val detectorModelDefinition: Output? = null,
    public val detectorModelDescription: Output? = null,
    public val detectorModelName: Output? = null,
    public val evaluationMethod: Output? = null,
    public val key: Output? = null,
    public val roleArn: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iotevents.DetectorModelArgs =
        com.pulumi.awsnative.iotevents.DetectorModelArgs.builder()
            .detectorModelDefinition(
                detectorModelDefinition?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .detectorModelDescription(detectorModelDescription?.applyValue({ args0 -> args0 }))
            .detectorModelName(detectorModelName?.applyValue({ args0 -> args0 }))
            .evaluationMethod(evaluationMethod?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .key(key?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [DetectorModelArgs].
 */
@PulumiTagMarker
public class DetectorModelArgsBuilder internal constructor() {
    private var detectorModelDefinition: Output? = null

    private var detectorModelDescription: Output? = null

    private var detectorModelName: Output? = null

    private var evaluationMethod: Output? = null

    private var key: Output? = null

    private var roleArn: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Information that defines how a detector operates.
     */
    @JvmName("gevogdhsytjjkkyk")
    public suspend fun detectorModelDefinition(`value`: Output) {
        this.detectorModelDefinition = value
    }

    /**
     * @param value A brief description of the detector model.
     */
    @JvmName("kftduuajndopfwdy")
    public suspend fun detectorModelDescription(`value`: Output) {
        this.detectorModelDescription = value
    }

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

    /**
     * @param value Information about the order in which events are evaluated and how actions are executed.
     */
    @JvmName("rpmutmiqhilymrth")
    public suspend fun evaluationMethod(`value`: Output) {
        this.evaluationMethod = value
    }

    /**
     * @param value The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.
     * This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.
     */
    @JvmName("dbxfcojhkuwddell")
    public suspend fun key(`value`: Output) {
        this.key = value
    }

    /**
     * @param value The ARN of the role that grants permission to AWS IoT Events to perform its operations.
     */
    @JvmName("fpmuaijuukcypmtc")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("epqjbwogijcpqodo")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("yhrvkxhstqbbixfn")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Information that defines how a detector operates.
     */
    @JvmName("bncoabwbdgrnrpah")
    public suspend fun detectorModelDefinition(`value`: DetectorModelDefinitionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.detectorModelDefinition = mapped
    }

    /**
     * @param argument Information that defines how a detector operates.
     */
    @JvmName("xishxivcnxjwpltd")
    public suspend fun detectorModelDefinition(argument: suspend DetectorModelDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = DetectorModelDefinitionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.detectorModelDefinition = mapped
    }

    /**
     * @param value A brief description of the detector model.
     */
    @JvmName("stubvfbnblmwfjym")
    public suspend fun detectorModelDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.detectorModelDescription = mapped
    }

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

    /**
     * @param value Information about the order in which events are evaluated and how actions are executed.
     */
    @JvmName("gisanefheopccuil")
    public suspend fun evaluationMethod(`value`: DetectorModelEvaluationMethod?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.evaluationMethod = mapped
    }

    /**
     * @param value The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.
     * This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.
     */
    @JvmName("mpjgomedjhraqvlu")
    public suspend fun key(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.key = mapped
    }

    /**
     * @param value The ARN of the role that grants permission to AWS IoT Events to perform its operations.
     */
    @JvmName("lsjxaavcmoydiijy")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("leddhiricvlmtmuq")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("emjjdvifuadoghay")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("vojmxvlebyjcuxvb")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("nlsppnbpmegqynqk")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("ucktjawqroahwdsk")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): DetectorModelArgs = DetectorModelArgs(
        detectorModelDefinition = detectorModelDefinition,
        detectorModelDescription = detectorModelDescription,
        detectorModelName = detectorModelName,
        evaluationMethod = evaluationMethod,
        key = key,
        roleArn = roleArn,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy