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

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

package com.pulumi.azure.waf.kotlin.inputs

import com.pulumi.azure.waf.inputs.PolicyCustomRuleMatchConditionArgs.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 matchValues A list of match values. This is **Required** when the `operator` is not `Any`.
 * @property matchVariables One or more `match_variables` blocks as defined below.
 * @property negationCondition Describes if this is negate condition or not
 * @property operator Describes operator to be matched. Possible values are `Any`, `IPMatch`, `GeoMatch`, `Equal`, `Contains`, `LessThan`, `GreaterThan`, `LessThanOrEqual`, `GreaterThanOrEqual`, `BeginsWith`, `EndsWith` and `Regex`.
 * @property transforms A list of transformations to do before the match is attempted. Possible values are `HtmlEntityDecode`, `Lowercase`, `RemoveNulls`, `Trim`, `UrlDecode` and `UrlEncode`.
 */
public data class PolicyCustomRuleMatchConditionArgs(
    public val matchValues: Output>? = null,
    public val matchVariables: Output>,
    public val negationCondition: Output? = null,
    public val `operator`: Output,
    public val transforms: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.waf.inputs.PolicyCustomRuleMatchConditionArgs =
        com.pulumi.azure.waf.inputs.PolicyCustomRuleMatchConditionArgs.builder()
            .matchValues(matchValues?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .matchVariables(
                matchVariables.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .negationCondition(negationCondition?.applyValue({ args0 -> args0 }))
            .`operator`(`operator`.applyValue({ args0 -> args0 }))
            .transforms(transforms?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var matchVariables: Output>? = null

    private var negationCondition: Output? = null

    private var `operator`: Output? = null

    private var transforms: Output>? = null

    /**
     * @param value A list of match values. This is **Required** when the `operator` is not `Any`.
     */
    @JvmName("sojuwmjfaobyjusm")
    public suspend fun matchValues(`value`: Output>) {
        this.matchValues = value
    }

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

    /**
     * @param values A list of match values. This is **Required** when the `operator` is not `Any`.
     */
    @JvmName("mdbuavhbwemklynb")
    public suspend fun matchValues(values: List>) {
        this.matchValues = Output.all(values)
    }

    /**
     * @param value One or more `match_variables` blocks as defined below.
     */
    @JvmName("ymlqlpebgxcgnemm")
    public suspend
    fun matchVariables(`value`: Output>) {
        this.matchVariables = value
    }

    @JvmName("avhhnhblhcrobypq")
    public suspend fun matchVariables(
        vararg
        values: Output,
    ) {
        this.matchVariables = Output.all(values.asList())
    }

    /**
     * @param values One or more `match_variables` blocks as defined below.
     */
    @JvmName("qjmmsistknlimqyb")
    public suspend
    fun matchVariables(values: List>) {
        this.matchVariables = Output.all(values)
    }

    /**
     * @param value Describes if this is negate condition or not
     */
    @JvmName("fcrrclcihaloskmu")
    public suspend fun negationCondition(`value`: Output) {
        this.negationCondition = value
    }

    /**
     * @param value Describes operator to be matched. Possible values are `Any`, `IPMatch`, `GeoMatch`, `Equal`, `Contains`, `LessThan`, `GreaterThan`, `LessThanOrEqual`, `GreaterThanOrEqual`, `BeginsWith`, `EndsWith` and `Regex`.
     */
    @JvmName("idghjttfqqqyhpsw")
    public suspend fun `operator`(`value`: Output) {
        this.`operator` = value
    }

    /**
     * @param value A list of transformations to do before the match is attempted. Possible values are `HtmlEntityDecode`, `Lowercase`, `RemoveNulls`, `Trim`, `UrlDecode` and `UrlEncode`.
     */
    @JvmName("senjebxygjvmcdfv")
    public suspend fun transforms(`value`: Output>) {
        this.transforms = value
    }

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

    /**
     * @param values A list of transformations to do before the match is attempted. Possible values are `HtmlEntityDecode`, `Lowercase`, `RemoveNulls`, `Trim`, `UrlDecode` and `UrlEncode`.
     */
    @JvmName("qyboarrkibnqutrm")
    public suspend fun transforms(values: List>) {
        this.transforms = Output.all(values)
    }

    /**
     * @param value A list of match values. This is **Required** when the `operator` is not `Any`.
     */
    @JvmName("hnandgpjnmahwvcr")
    public suspend fun matchValues(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchValues = mapped
    }

    /**
     * @param values A list of match values. This is **Required** when the `operator` is not `Any`.
     */
    @JvmName("lmkjsxooljmsknkn")
    public suspend fun matchValues(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchValues = mapped
    }

    /**
     * @param value One or more `match_variables` blocks as defined below.
     */
    @JvmName("smrtfonwqhygjdpn")
    public suspend
    fun matchVariables(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchVariables = mapped
    }

    /**
     * @param argument One or more `match_variables` blocks as defined below.
     */
    @JvmName("vhndaukohaoqvmyd")
    public suspend
    fun matchVariables(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PolicyCustomRuleMatchConditionMatchVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.matchVariables = mapped
    }

    /**
     * @param argument One or more `match_variables` blocks as defined below.
     */
    @JvmName("dnytecppeahjfdmp")
    public suspend fun matchVariables(
        vararg
        argument: suspend PolicyCustomRuleMatchConditionMatchVariableArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            PolicyCustomRuleMatchConditionMatchVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.matchVariables = mapped
    }

    /**
     * @param argument One or more `match_variables` blocks as defined below.
     */
    @JvmName("mymucywcrhktrube")
    public suspend
    fun matchVariables(argument: suspend PolicyCustomRuleMatchConditionMatchVariableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PolicyCustomRuleMatchConditionMatchVariableArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.matchVariables = mapped
    }

    /**
     * @param values One or more `match_variables` blocks as defined below.
     */
    @JvmName("rodwsuodlirvsrsm")
    public suspend fun matchVariables(
        vararg
        values: PolicyCustomRuleMatchConditionMatchVariableArgs,
    ) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchVariables = mapped
    }

    /**
     * @param value Describes if this is negate condition or not
     */
    @JvmName("fkqrtpyptxdptspg")
    public suspend fun negationCondition(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.negationCondition = mapped
    }

    /**
     * @param value Describes operator to be matched. Possible values are `Any`, `IPMatch`, `GeoMatch`, `Equal`, `Contains`, `LessThan`, `GreaterThan`, `LessThanOrEqual`, `GreaterThanOrEqual`, `BeginsWith`, `EndsWith` and `Regex`.
     */
    @JvmName("sripuisydlcudjap")
    public suspend fun `operator`(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value A list of transformations to do before the match is attempted. Possible values are `HtmlEntityDecode`, `Lowercase`, `RemoveNulls`, `Trim`, `UrlDecode` and `UrlEncode`.
     */
    @JvmName("biuemaggxhofochn")
    public suspend fun transforms(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transforms = mapped
    }

    /**
     * @param values A list of transformations to do before the match is attempted. Possible values are `HtmlEntityDecode`, `Lowercase`, `RemoveNulls`, `Trim`, `UrlDecode` and `UrlEncode`.
     */
    @JvmName("favgmgwggxaouwna")
    public suspend fun transforms(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transforms = mapped
    }

    internal fun build(): PolicyCustomRuleMatchConditionArgs = PolicyCustomRuleMatchConditionArgs(
        matchValues = matchValues,
        matchVariables = matchVariables ?: throw PulumiNullFieldException("matchVariables"),
        negationCondition = negationCondition,
        `operator` = `operator` ?: throw PulumiNullFieldException("operator"),
        transforms = transforms,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy