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

com.pulumi.awsnative.vpclattice.kotlin.inputs.RuleHttpMatchArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.vpclattice.kotlin.inputs

import com.pulumi.awsnative.vpclattice.inputs.RuleHttpMatchArgs.builder
import com.pulumi.awsnative.vpclattice.kotlin.enums.RuleHttpMatchMethod
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property headerMatches The header matches. Matches incoming requests with rule based on request header value before applying rule action.
 * @property method The HTTP method type.
 * @property pathMatch The path match.
 */
public data class RuleHttpMatchArgs(
    public val headerMatches: Output>? = null,
    public val method: Output? = null,
    public val pathMatch: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.vpclattice.inputs.RuleHttpMatchArgs =
        com.pulumi.awsnative.vpclattice.inputs.RuleHttpMatchArgs.builder()
            .headerMatches(
                headerMatches?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .method(method?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .pathMatch(pathMatch?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var method: Output? = null

    private var pathMatch: Output? = null

    /**
     * @param value The header matches. Matches incoming requests with rule based on request header value before applying rule action.
     */
    @JvmName("ifrbpyaofmbamdyx")
    public suspend fun headerMatches(`value`: Output>) {
        this.headerMatches = value
    }

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

    /**
     * @param values The header matches. Matches incoming requests with rule based on request header value before applying rule action.
     */
    @JvmName("ejxkkkgumrkcleed")
    public suspend fun headerMatches(values: List>) {
        this.headerMatches = Output.all(values)
    }

    /**
     * @param value The HTTP method type.
     */
    @JvmName("wsgdtimxhrwdoixj")
    public suspend fun method(`value`: Output) {
        this.method = value
    }

    /**
     * @param value The path match.
     */
    @JvmName("kuvsysksvgdmufgs")
    public suspend fun pathMatch(`value`: Output) {
        this.pathMatch = value
    }

    /**
     * @param value The header matches. Matches incoming requests with rule based on request header value before applying rule action.
     */
    @JvmName("hykuqcvknxhqjvge")
    public suspend fun headerMatches(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headerMatches = mapped
    }

    /**
     * @param argument The header matches. Matches incoming requests with rule based on request header value before applying rule action.
     */
    @JvmName("dpcsfcprhnpdsyeu")
    public suspend fun headerMatches(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RuleHeaderMatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headerMatches = mapped
    }

    /**
     * @param argument The header matches. Matches incoming requests with rule based on request header value before applying rule action.
     */
    @JvmName("uvwhprntsebhxxis")
    public suspend fun headerMatches(vararg argument: suspend RuleHeaderMatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RuleHeaderMatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headerMatches = mapped
    }

    /**
     * @param argument The header matches. Matches incoming requests with rule based on request header value before applying rule action.
     */
    @JvmName("npaxpdbeyjxrlpew")
    public suspend fun headerMatches(argument: suspend RuleHeaderMatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(RuleHeaderMatchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.headerMatches = mapped
    }

    /**
     * @param values The header matches. Matches incoming requests with rule based on request header value before applying rule action.
     */
    @JvmName("qaxdixnuejmovhpn")
    public suspend fun headerMatches(vararg values: RuleHeaderMatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headerMatches = mapped
    }

    /**
     * @param value The HTTP method type.
     */
    @JvmName("ocfamsmeusteepmg")
    public suspend fun method(`value`: RuleHttpMatchMethod?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.method = mapped
    }

    /**
     * @param value The path match.
     */
    @JvmName("dxtotinqxkiikbms")
    public suspend fun pathMatch(`value`: RulePathMatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pathMatch = mapped
    }

    /**
     * @param argument The path match.
     */
    @JvmName("vyrehepmbceupwmp")
    public suspend fun pathMatch(argument: suspend RulePathMatchArgsBuilder.() -> Unit) {
        val toBeMapped = RulePathMatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.pathMatch = mapped
    }

    internal fun build(): RuleHttpMatchArgs = RuleHttpMatchArgs(
        headerMatches = headerMatches,
        method = method,
        pathMatch = pathMatch,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy