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

com.pulumi.azurenative.cdn.kotlin.inputs.MatchConditionArgs.kt Maven / Gradle / Ivy

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

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

import com.pulumi.azurenative.cdn.inputs.MatchConditionArgs.builder
import com.pulumi.azurenative.cdn.kotlin.enums.Operator
import com.pulumi.azurenative.cdn.kotlin.enums.TransformType
import com.pulumi.azurenative.cdn.kotlin.enums.WafMatchVariable
import com.pulumi.core.Either
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 kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Define match conditions
 * @property matchValue List of possible match values.
 * @property matchVariable Match variable to compare against.
 * @property negateCondition Describes if the result of this condition should be negated.
 * @property operator Describes operator to be matched
 * @property selector Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
 * @property transforms List of transforms.
 */
public data class MatchConditionArgs(
    public val matchValue: Output>,
    public val matchVariable: Output>,
    public val negateCondition: Output? = null,
    public val `operator`: Output>,
    public val selector: Output? = null,
    public val transforms: Output>>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cdn.inputs.MatchConditionArgs =
        com.pulumi.azurenative.cdn.inputs.MatchConditionArgs.builder()
            .matchValue(matchValue.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .matchVariable(
                matchVariable.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .negateCondition(negateCondition?.applyValue({ args0 -> args0 }))
            .`operator`(
                `operator`.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .selector(selector?.applyValue({ args0 -> args0 }))
            .transforms(
                transforms?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            ).build()
}

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

    private var matchVariable: Output>? = null

    private var negateCondition: Output? = null

    private var `operator`: Output>? = null

    private var selector: Output? = null

    private var transforms: Output>>? = null

    /**
     * @param value List of possible match values.
     */
    @JvmName("vgpqeuiobvjjgigs")
    public suspend fun matchValue(`value`: Output>) {
        this.matchValue = value
    }

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

    /**
     * @param values List of possible match values.
     */
    @JvmName("papvkhdbuoawbaxl")
    public suspend fun matchValue(values: List>) {
        this.matchValue = Output.all(values)
    }

    /**
     * @param value Match variable to compare against.
     */
    @JvmName("llfmdpfmeqdtxbuu")
    public suspend fun matchVariable(`value`: Output>) {
        this.matchVariable = value
    }

    /**
     * @param value Describes if the result of this condition should be negated.
     */
    @JvmName("tltgnixogfvbotsg")
    public suspend fun negateCondition(`value`: Output) {
        this.negateCondition = value
    }

    /**
     * @param value Describes operator to be matched
     */
    @JvmName("hgnenkyqoxwhbyet")
    public suspend fun `operator`(`value`: Output>) {
        this.`operator` = value
    }

    /**
     * @param value Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
     */
    @JvmName("dmavlepbjeiqtcqv")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

    /**
     * @param value List of transforms.
     */
    @JvmName("cmwbauqxxrohhaeh")
    public suspend fun transforms(`value`: Output>>) {
        this.transforms = value
    }

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

    /**
     * @param values List of transforms.
     */
    @JvmName("jsghioodmullorot")
    public suspend fun transforms(values: List>>) {
        this.transforms = Output.all(values)
    }

    /**
     * @param value List of possible match values.
     */
    @JvmName("dbcwkwoanxjubswn")
    public suspend fun matchValue(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchValue = mapped
    }

    /**
     * @param values List of possible match values.
     */
    @JvmName("loddtwtedywcsegl")
    public suspend fun matchValue(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchValue = mapped
    }

    /**
     * @param value Match variable to compare against.
     */
    @JvmName("kqehkbmgtiwvawpy")
    public suspend fun matchVariable(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchVariable = mapped
    }

    /**
     * @param value Match variable to compare against.
     */
    @JvmName("ptmouwpgiflnxkvy")
    public fun matchVariable(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchVariable = mapped
    }

    /**
     * @param value Match variable to compare against.
     */
    @JvmName("fuoyckbgpfmfcqdh")
    public fun matchVariable(`value`: WafMatchVariable) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchVariable = mapped
    }

    /**
     * @param value Describes if the result of this condition should be negated.
     */
    @JvmName("bcpwntudtnptdass")
    public suspend fun negateCondition(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.negateCondition = mapped
    }

    /**
     * @param value Describes operator to be matched
     */
    @JvmName("ofutnrnhjitbfmku")
    public suspend fun `operator`(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value Describes operator to be matched
     */
    @JvmName("sbyprwgcetqqfbvf")
    public fun `operator`(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value Describes operator to be matched
     */
    @JvmName("wdrqddwrenkscxul")
    public fun `operator`(`value`: Operator) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
     */
    @JvmName("yfcjknsgjdqasbaa")
    public suspend fun selector(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selector = mapped
    }

    /**
     * @param value List of transforms.
     */
    @JvmName("kqvijxmhomuqclpb")
    public suspend fun transforms(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transforms = mapped
    }

    /**
     * @param values List of transforms.
     */
    @JvmName("sseqeloipjoojirx")
    public suspend fun transforms(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transforms = mapped
    }

    internal fun build(): MatchConditionArgs = MatchConditionArgs(
        matchValue = matchValue ?: throw PulumiNullFieldException("matchValue"),
        matchVariable = matchVariable ?: throw PulumiNullFieldException("matchVariable"),
        negateCondition = negateCondition,
        `operator` = `operator` ?: throw PulumiNullFieldException("operator"),
        selector = selector,
        transforms = transforms,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy