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

com.pulumi.azure.securitycenter.kotlin.inputs.AutomationSourceRuleSetArgs.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.securitycenter.kotlin.inputs

import com.pulumi.azure.securitycenter.inputs.AutomationSourceRuleSetArgs.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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property rules One or more `rule` blocks as defined below.
 * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
 */
public data class AutomationSourceRuleSetArgs(
    public val rules: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.securitycenter.inputs.AutomationSourceRuleSetArgs =
        com.pulumi.azure.securitycenter.inputs.AutomationSourceRuleSetArgs.builder()
            .rules(
                rules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    /**
     * @param value One or more `rule` blocks as defined below.
     * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
     */
    @JvmName("umpmiqfofekanhso")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values One or more `rule` blocks as defined below.
     * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
     */
    @JvmName("tpeerbucveqaskru")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value One or more `rule` blocks as defined below.
     * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
     */
    @JvmName("bjqdytwxatmnhcwj")
    public suspend fun rules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument One or more `rule` blocks as defined below.
     * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
     */
    @JvmName("wnjsxkgrdrcgiijt")
    public suspend
    fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AutomationSourceRuleSetRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument One or more `rule` blocks as defined below.
     * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
     */
    @JvmName("eakomeryqjfoplhb")
    public suspend fun rules(
        vararg
        argument: suspend AutomationSourceRuleSetRuleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AutomationSourceRuleSetRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument One or more `rule` blocks as defined below.
     * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
     */
    @JvmName("dbnwxjwlcrgipwxd")
    public suspend fun rules(argument: suspend AutomationSourceRuleSetRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AutomationSourceRuleSetRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values One or more `rule` blocks as defined below.
     * > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'.
     */
    @JvmName("aygghclmdbgtgarp")
    public suspend fun rules(vararg values: AutomationSourceRuleSetRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): AutomationSourceRuleSetArgs = AutomationSourceRuleSetArgs(
        rules = rules ?: throw PulumiNullFieldException("rules"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy