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

com.pulumi.azurenative.cdn.kotlin.inputs.ManagedRuleSetArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.cdn.kotlin.inputs

import com.pulumi.azurenative.cdn.inputs.ManagedRuleSetArgs.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Defines a managed rule set.
 * @property anomalyScore Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.
 * @property ruleGroupOverrides Defines the rule overrides to apply to the rule set.
 * @property ruleSetType Defines the rule set type to use.
 * @property ruleSetVersion Defines the version of the rule set to use.
 */
public data class ManagedRuleSetArgs(
    public val anomalyScore: Output? = null,
    public val ruleGroupOverrides: Output>? = null,
    public val ruleSetType: Output,
    public val ruleSetVersion: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cdn.inputs.ManagedRuleSetArgs =
        com.pulumi.azurenative.cdn.inputs.ManagedRuleSetArgs.builder()
            .anomalyScore(anomalyScore?.applyValue({ args0 -> args0 }))
            .ruleGroupOverrides(
                ruleGroupOverrides?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .ruleSetType(ruleSetType.applyValue({ args0 -> args0 }))
            .ruleSetVersion(ruleSetVersion.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ManagedRuleSetArgs].
 */
@PulumiTagMarker
public class ManagedRuleSetArgsBuilder internal constructor() {
    private var anomalyScore: Output? = null

    private var ruleGroupOverrides: Output>? = null

    private var ruleSetType: Output? = null

    private var ruleSetVersion: Output? = null

    /**
     * @param value Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.
     */
    @JvmName("bniwwnhrqqreiarh")
    public suspend fun anomalyScore(`value`: Output) {
        this.anomalyScore = value
    }

    /**
     * @param value Defines the rule overrides to apply to the rule set.
     */
    @JvmName("eutqfhirvnmfvisg")
    public suspend fun ruleGroupOverrides(`value`: Output>) {
        this.ruleGroupOverrides = value
    }

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

    /**
     * @param values Defines the rule overrides to apply to the rule set.
     */
    @JvmName("lcopbarxmrtmstxm")
    public suspend fun ruleGroupOverrides(values: List>) {
        this.ruleGroupOverrides = Output.all(values)
    }

    /**
     * @param value Defines the rule set type to use.
     */
    @JvmName("jcpqyshynwsjsaer")
    public suspend fun ruleSetType(`value`: Output) {
        this.ruleSetType = value
    }

    /**
     * @param value Defines the version of the rule set to use.
     */
    @JvmName("timiuooybfdexrtp")
    public suspend fun ruleSetVersion(`value`: Output) {
        this.ruleSetVersion = value
    }

    /**
     * @param value Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests.
     */
    @JvmName("remvllnbxxibpccd")
    public suspend fun anomalyScore(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.anomalyScore = mapped
    }

    /**
     * @param value Defines the rule overrides to apply to the rule set.
     */
    @JvmName("pyyspaxyyisudsvu")
    public suspend fun ruleGroupOverrides(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ruleGroupOverrides = mapped
    }

    /**
     * @param argument Defines the rule overrides to apply to the rule set.
     */
    @JvmName("seewkttigqqkxlqu")
    public suspend fun ruleGroupOverrides(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ManagedRuleGroupOverrideArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ruleGroupOverrides = mapped
    }

    /**
     * @param argument Defines the rule overrides to apply to the rule set.
     */
    @JvmName("gbebvyxnxqdrcnhg")
    public suspend fun ruleGroupOverrides(vararg argument: suspend ManagedRuleGroupOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ManagedRuleGroupOverrideArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ruleGroupOverrides = mapped
    }

    /**
     * @param argument Defines the rule overrides to apply to the rule set.
     */
    @JvmName("qwaruyfljshfodld")
    public suspend fun ruleGroupOverrides(argument: suspend ManagedRuleGroupOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ManagedRuleGroupOverrideArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ruleGroupOverrides = mapped
    }

    /**
     * @param values Defines the rule overrides to apply to the rule set.
     */
    @JvmName("dyudhorrjaixkftn")
    public suspend fun ruleGroupOverrides(vararg values: ManagedRuleGroupOverrideArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ruleGroupOverrides = mapped
    }

    /**
     * @param value Defines the rule set type to use.
     */
    @JvmName("pxvncmxyrujxwrii")
    public suspend fun ruleSetType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ruleSetType = mapped
    }

    /**
     * @param value Defines the version of the rule set to use.
     */
    @JvmName("pwuwrfqxtiarfwfa")
    public suspend fun ruleSetVersion(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ruleSetVersion = mapped
    }

    internal fun build(): ManagedRuleSetArgs = ManagedRuleSetArgs(
        anomalyScore = anomalyScore,
        ruleGroupOverrides = ruleGroupOverrides,
        ruleSetType = ruleSetType ?: throw PulumiNullFieldException("ruleSetType"),
        ruleSetVersion = ruleSetVersion ?: throw PulumiNullFieldException("ruleSetVersion"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy