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

com.pulumi.awsnative.iot.kotlin.inputs.TopicRulePayloadArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.iot.kotlin.inputs

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

/**
 *
 * @property actions The actions associated with the rule.
 * @property awsIotSqlVersion The version of the SQL rules engine to use when evaluating the rule.
 * The default value is 2015-10-08.
 * @property description The description of the rule.
 * @property errorAction The action to take when an error occurs.
 * @property ruleDisabled Specifies whether the rule is disabled.
 * @property sql The SQL statement used to query the topic. For more information, see [AWS IoT SQL Reference](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-reference.html) in the *AWS IoT Developer Guide* .
 */
public data class TopicRulePayloadArgs(
    public val actions: Output>,
    public val awsIotSqlVersion: Output? = null,
    public val description: Output? = null,
    public val errorAction: Output? = null,
    public val ruleDisabled: Output? = null,
    public val sql: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iot.inputs.TopicRulePayloadArgs =
        com.pulumi.awsnative.iot.inputs.TopicRulePayloadArgs.builder()
            .actions(
                actions.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .awsIotSqlVersion(awsIotSqlVersion?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .errorAction(errorAction?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ruleDisabled(ruleDisabled?.applyValue({ args0 -> args0 }))
            .sql(sql.applyValue({ args0 -> args0 })).build()
}

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

    private var awsIotSqlVersion: Output? = null

    private var description: Output? = null

    private var errorAction: Output? = null

    private var ruleDisabled: Output? = null

    private var sql: Output? = null

    /**
     * @param value The actions associated with the rule.
     */
    @JvmName("yiaasmtesuqefqxt")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values The actions associated with the rule.
     */
    @JvmName("wsqhiyvpxosfpshg")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

    /**
     * @param value The version of the SQL rules engine to use when evaluating the rule.
     * The default value is 2015-10-08.
     */
    @JvmName("scefdodwaenjgcsq")
    public suspend fun awsIotSqlVersion(`value`: Output) {
        this.awsIotSqlVersion = value
    }

    /**
     * @param value The description of the rule.
     */
    @JvmName("gaswyxtnhbrogjmk")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The action to take when an error occurs.
     */
    @JvmName("cfpdghuervskoqdx")
    public suspend fun errorAction(`value`: Output) {
        this.errorAction = value
    }

    /**
     * @param value Specifies whether the rule is disabled.
     */
    @JvmName("ylrjqmiqxidageha")
    public suspend fun ruleDisabled(`value`: Output) {
        this.ruleDisabled = value
    }

    /**
     * @param value The SQL statement used to query the topic. For more information, see [AWS IoT SQL Reference](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-reference.html) in the *AWS IoT Developer Guide* .
     */
    @JvmName("weghneytemdsoaco")
    public suspend fun sql(`value`: Output) {
        this.sql = value
    }

    /**
     * @param value The actions associated with the rule.
     */
    @JvmName("jvghhmwyohevbooc")
    public suspend fun actions(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param argument The actions associated with the rule.
     */
    @JvmName("fatyuavpqplxsgrc")
    public suspend fun actions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TopicRuleActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument The actions associated with the rule.
     */
    @JvmName("eturpkcwyuvwsgfd")
    public suspend fun actions(vararg argument: suspend TopicRuleActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TopicRuleActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument The actions associated with the rule.
     */
    @JvmName("bptkluaakcweshdo")
    public suspend fun actions(argument: suspend TopicRuleActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TopicRuleActionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param values The actions associated with the rule.
     */
    @JvmName("vidkrrhigdunttrv")
    public suspend fun actions(vararg values: TopicRuleActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value The version of the SQL rules engine to use when evaluating the rule.
     * The default value is 2015-10-08.
     */
    @JvmName("aaqytcjfcglphmma")
    public suspend fun awsIotSqlVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.awsIotSqlVersion = mapped
    }

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

    /**
     * @param value The action to take when an error occurs.
     */
    @JvmName("vttqavlvqpdgsrpc")
    public suspend fun errorAction(`value`: TopicRuleActionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.errorAction = mapped
    }

    /**
     * @param argument The action to take when an error occurs.
     */
    @JvmName("pbqrwgdlschpwxnh")
    public suspend fun errorAction(argument: suspend TopicRuleActionArgsBuilder.() -> Unit) {
        val toBeMapped = TopicRuleActionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.errorAction = mapped
    }

    /**
     * @param value Specifies whether the rule is disabled.
     */
    @JvmName("qubxftlpigiuorph")
    public suspend fun ruleDisabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ruleDisabled = mapped
    }

    /**
     * @param value The SQL statement used to query the topic. For more information, see [AWS IoT SQL Reference](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-reference.html) in the *AWS IoT Developer Guide* .
     */
    @JvmName("stapaupyavtcinoj")
    public suspend fun sql(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sql = mapped
    }

    internal fun build(): TopicRulePayloadArgs = TopicRulePayloadArgs(
        actions = actions ?: throw PulumiNullFieldException("actions"),
        awsIotSqlVersion = awsIotSqlVersion,
        description = description,
        errorAction = errorAction,
        ruleDisabled = ruleDisabled,
        sql = sql ?: throw PulumiNullFieldException("sql"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy