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

com.pulumi.gcp.networkservices.kotlin.inputs.HttpRouteRuleMatchArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.networkservices.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleMatchArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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 fullPathMatch The HTTP request path value should exactly match this value.
 * @property headers Specifies a list of HTTP request headers to match against.
 * Structure is documented below.
 * @property ignoreCase Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
 * @property prefixMatch The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
 * @property queryParameters Specifies a list of query parameters to match against.
 * Structure is documented below.
 * @property regexMatch The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
 */
public data class HttpRouteRuleMatchArgs(
    public val fullPathMatch: Output? = null,
    public val headers: Output>? = null,
    public val ignoreCase: Output? = null,
    public val prefixMatch: Output? = null,
    public val queryParameters: Output>? = null,
    public val regexMatch: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.HttpRouteRuleMatchArgs =
        com.pulumi.gcp.networkservices.inputs.HttpRouteRuleMatchArgs.builder()
            .fullPathMatch(fullPathMatch?.applyValue({ args0 -> args0 }))
            .headers(
                headers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .ignoreCase(ignoreCase?.applyValue({ args0 -> args0 }))
            .prefixMatch(prefixMatch?.applyValue({ args0 -> args0 }))
            .queryParameters(
                queryParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .regexMatch(regexMatch?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HttpRouteRuleMatchArgs].
 */
@PulumiTagMarker
public class HttpRouteRuleMatchArgsBuilder internal constructor() {
    private var fullPathMatch: Output? = null

    private var headers: Output>? = null

    private var ignoreCase: Output? = null

    private var prefixMatch: Output? = null

    private var queryParameters: Output>? = null

    private var regexMatch: Output? = null

    /**
     * @param value The HTTP request path value should exactly match this value.
     */
    @JvmName("nhweyqyigbxteubw")
    public suspend fun fullPathMatch(`value`: Output) {
        this.fullPathMatch = value
    }

    /**
     * @param value Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("bjteuwpbxsttuchv")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

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

    /**
     * @param values Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("wnqankxefffnnbpf")
    public suspend fun headers(values: List>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
     */
    @JvmName("comnkyndfvcobajj")
    public suspend fun ignoreCase(`value`: Output) {
        this.ignoreCase = value
    }

    /**
     * @param value The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
     */
    @JvmName("poaqatogfmrlosjl")
    public suspend fun prefixMatch(`value`: Output) {
        this.prefixMatch = value
    }

    /**
     * @param value Specifies a list of query parameters to match against.
     * Structure is documented below.
     */
    @JvmName("bnmvxclonmeyxuks")
    public suspend fun queryParameters(`value`: Output>) {
        this.queryParameters = value
    }

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

    /**
     * @param values Specifies a list of query parameters to match against.
     * Structure is documented below.
     */
    @JvmName("lmjedesdevjhnuud")
    public suspend fun queryParameters(values: List>) {
        this.queryParameters = Output.all(values)
    }

    /**
     * @param value The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
     */
    @JvmName("dufberfxyvfbrbjo")
    public suspend fun regexMatch(`value`: Output) {
        this.regexMatch = value
    }

    /**
     * @param value The HTTP request path value should exactly match this value.
     */
    @JvmName("bniajwixuuxypnqc")
    public suspend fun fullPathMatch(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fullPathMatch = mapped
    }

    /**
     * @param value Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("pubhxvmuktkgyjok")
    public suspend fun headers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param argument Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("qaawruplnxfaqsot")
    public suspend fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            HttpRouteRuleMatchHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("jrevmcummbpoivin")
    public suspend fun headers(vararg argument: suspend HttpRouteRuleMatchHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            HttpRouteRuleMatchHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("lnuwkmevenkipgir")
    public suspend fun headers(argument: suspend HttpRouteRuleMatchHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            HttpRouteRuleMatchHeaderArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param values Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("aixfgflhkwjwxxdy")
    public suspend fun headers(vararg values: HttpRouteRuleMatchHeaderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
     */
    @JvmName("gnnatqytdragdjwe")
    public suspend fun ignoreCase(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ignoreCase = mapped
    }

    /**
     * @param value The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
     */
    @JvmName("fpwbmtidlxthpajv")
    public suspend fun prefixMatch(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefixMatch = mapped
    }

    /**
     * @param value Specifies a list of query parameters to match against.
     * Structure is documented below.
     */
    @JvmName("rbnnivuvphybsqal")
    public suspend fun queryParameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queryParameters = mapped
    }

    /**
     * @param argument Specifies a list of query parameters to match against.
     * Structure is documented below.
     */
    @JvmName("pyugihtvofhxoiis")
    public suspend fun queryParameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            HttpRouteRuleMatchQueryParameterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.queryParameters = mapped
    }

    /**
     * @param argument Specifies a list of query parameters to match against.
     * Structure is documented below.
     */
    @JvmName("oawjuaorjxilmyih")
    public suspend fun queryParameters(vararg argument: suspend HttpRouteRuleMatchQueryParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            HttpRouteRuleMatchQueryParameterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.queryParameters = mapped
    }

    /**
     * @param argument Specifies a list of query parameters to match against.
     * Structure is documented below.
     */
    @JvmName("emjfieyayrkaindq")
    public suspend fun queryParameters(argument: suspend HttpRouteRuleMatchQueryParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            HttpRouteRuleMatchQueryParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.queryParameters = mapped
    }

    /**
     * @param values Specifies a list of query parameters to match against.
     * Structure is documented below.
     */
    @JvmName("qrmumjjlwnwluxfo")
    public suspend fun queryParameters(vararg values: HttpRouteRuleMatchQueryParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.queryParameters = mapped
    }

    /**
     * @param value The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
     */
    @JvmName("mkolxewggfgtvtra")
    public suspend fun regexMatch(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regexMatch = mapped
    }

    internal fun build(): HttpRouteRuleMatchArgs = HttpRouteRuleMatchArgs(
        fullPathMatch = fullPathMatch,
        headers = headers,
        ignoreCase = ignoreCase,
        prefixMatch = prefixMatch,
        queryParameters = queryParameters,
        regexMatch = regexMatch,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy