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

com.pulumi.aws.wafv2.kotlin.inputs.RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyArgs.kt Maven / Gradle / Ivy

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

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

import com.pulumi.aws.wafv2.inputs.RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyArgs.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 RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyArgs(
    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.RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyArgs =
        com.pulumi.aws.wafv2.inputs.RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyArgs.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 [RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyArgs].
 */
@PulumiTagMarker
public class RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyArgsBuilder 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("yrceqhygbnlvguas")
    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("saaavdaxtmyapnsh")
    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("klfrdtrmstchjrbf")
    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("ybsoeqephfsjbgdr")
    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("kvmaufabbdfupejg")
    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("kivpwifpulneqexd")
    public suspend fun matchPattern(`value`: RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyMatchPatternArgs) {
        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("fbysvjrcckchxmsm")
    public suspend fun matchPattern(argument: suspend RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyMatchPatternArgsBuilder.() -> Unit) {
        val toBeMapped =
            RuleGroupRuleStatementByteMatchStatementFieldToMatchJsonBodyMatchPatternArgsBuilder().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("wnxkgtljlhsvkdyy")
    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("fucmupeupskquahe")
    public suspend fun oversizeHandling(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oversizeHandling = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy