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

com.pulumi.aws.wafv2.kotlin.inputs.WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs.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.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.wafv2.kotlin.inputs

import com.pulumi.aws.wafv2.inputs.WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property invalidFallbackBehavior What to do when JSON parsing fails. Defaults to evaluating up to the first parsing failure. Valid values are `EVALUATE_AS_STRING`, `MATCH` and `NO_MATCH`.
 * @property matchPattern The patterns to look for in the JSON body. You must specify exactly one setting: either `all` or `included_paths`. See [JsonMatchPattern](https://docs.aws.amazon.com/waf/latest/APIReference/API_JsonMatchPattern.html) for details.
 * @property matchScope The parts of the JSON to match against using the `match_pattern`. Valid values are `ALL`, `KEY` and `VALUE`.
 * @property oversizeHandling What to do if the body is larger than can be inspected. Valid values are `CONTINUE` (default), `MATCH` and `NO_MATCH`.
 */
public data class WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs(
    public val invalidFallbackBehavior: Output? = null,
    public val matchPattern: Output,
    public val matchScope: Output,
    public val oversizeHandling: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.wafv2.inputs.WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs =
        com.pulumi.aws.wafv2.inputs.WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs.builder()
            .invalidFallbackBehavior(invalidFallbackBehavior?.applyValue({ args0 -> args0 }))
            .matchPattern(matchPattern.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .matchScope(matchScope.applyValue({ args0 -> args0 }))
            .oversizeHandling(oversizeHandling?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs].
 */
@PulumiTagMarker
public class WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgsBuilder internal constructor() {
    private var invalidFallbackBehavior: Output? = null

    private var matchPattern:
        Output? = null

    private var matchScope: Output? = null

    private var oversizeHandling: Output? = null

    /**
     * @param value What to do when JSON parsing fails. Defaults to evaluating up to the first parsing failure. Valid values are `EVALUATE_AS_STRING`, `MATCH` and `NO_MATCH`.
     */
    @JvmName("xbabqjjemvdpjccj")
    public suspend fun invalidFallbackBehavior(`value`: Output) {
        this.invalidFallbackBehavior = value
    }

    /**
     * @param value The patterns to look for in the JSON body. You must specify exactly one setting: either `all` or `included_paths`. See [JsonMatchPattern](https://docs.aws.amazon.com/waf/latest/APIReference/API_JsonMatchPattern.html) for details.
     */
    @JvmName("heeaiwwnnjufyfqb")
    public suspend fun matchPattern(`value`: Output) {
        this.matchPattern = value
    }

    /**
     * @param value The parts of the JSON to match against using the `match_pattern`. Valid values are `ALL`, `KEY` and `VALUE`.
     */
    @JvmName("iyeypwlietimbbum")
    public suspend fun matchScope(`value`: Output) {
        this.matchScope = value
    }

    /**
     * @param value What to do if the body is larger than can be inspected. Valid values are `CONTINUE` (default), `MATCH` and `NO_MATCH`.
     */
    @JvmName("npldahelvxjnhxhx")
    public suspend fun oversizeHandling(`value`: Output) {
        this.oversizeHandling = value
    }

    /**
     * @param value What to do when JSON parsing fails. Defaults to evaluating up to the first parsing failure. Valid values are `EVALUATE_AS_STRING`, `MATCH` and `NO_MATCH`.
     */
    @JvmName("lecsmtjtudyevyaf")
    public suspend fun invalidFallbackBehavior(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.invalidFallbackBehavior = mapped
    }

    /**
     * @param value The patterns to look for in the JSON body. You must specify exactly one setting: either `all` or `included_paths`. See [JsonMatchPattern](https://docs.aws.amazon.com/waf/latest/APIReference/API_JsonMatchPattern.html) for details.
     */
    @JvmName("diebyjlmkoorlrdq")
    public suspend fun matchPattern(`value`: WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyMatchPatternArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchPattern = mapped
    }

    /**
     * @param argument The patterns to look for in the JSON body. You must specify exactly one setting: either `all` or `included_paths`. See [JsonMatchPattern](https://docs.aws.amazon.com/waf/latest/APIReference/API_JsonMatchPattern.html) for details.
     */
    @JvmName("ylttxjcegndrtamw")
    public suspend fun matchPattern(argument: suspend WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyMatchPatternArgsBuilder.() -> Unit) {
        val toBeMapped =
            WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyMatchPatternArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.matchPattern = mapped
    }

    /**
     * @param value The parts of the JSON to match against using the `match_pattern`. Valid values are `ALL`, `KEY` and `VALUE`.
     */
    @JvmName("slhiacropgfrjybf")
    public suspend fun matchScope(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchScope = mapped
    }

    /**
     * @param value What to do if the body is larger than can be inspected. Valid values are `CONTINUE` (default), `MATCH` and `NO_MATCH`.
     */
    @JvmName("pltoybmsaondurfq")
    public suspend fun oversizeHandling(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oversizeHandling = mapped
    }

    internal fun build(): WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs =
        WebAclRuleStatementRegexMatchStatementFieldToMatchJsonBodyArgs(
            invalidFallbackBehavior = invalidFallbackBehavior,
            matchPattern = matchPattern ?: throw PulumiNullFieldException("matchPattern"),
            matchScope = matchScope ?: throw PulumiNullFieldException("matchScope"),
            oversizeHandling = oversizeHandling,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy