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

com.pulumi.gcp.networkservices.kotlin.inputs.GrpcRouteRuleMatchArgs.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: 8.10.0.0
Show newest version
@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.GrpcRouteRuleMatchArgs.builder
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 headers Specifies a list of HTTP request headers to match against.
 * Structure is documented below.
 * @property method A gRPC method to match against. If this field is empty or omitted, will match all methods.
 * Structure is documented below.
 */
public data class GrpcRouteRuleMatchArgs(
    public val headers: Output>? = null,
    public val method: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleMatchArgs =
        com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleMatchArgs.builder()
            .headers(
                headers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .method(method?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var method: Output? = null

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

    @JvmName("uhrxjfegdjytimwc")
    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("dhopmmvxowreywcw")
    public suspend fun headers(values: List>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value A gRPC method to match against. If this field is empty or omitted, will match all methods.
     * Structure is documented below.
     */
    @JvmName("dtfcuwicejwnsiew")
    public suspend fun method(`value`: Output) {
        this.method = value
    }

    /**
     * @param value Specifies a list of HTTP request headers to match against.
     * Structure is documented below.
     */
    @JvmName("bjmnicbgqxfnwtxb")
    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("wmwvqruwmobcjuyt")
    public suspend fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GrpcRouteRuleMatchHeaderArgsBuilder().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("ujgcjwckvjibfynd")
    public suspend fun headers(vararg argument: suspend GrpcRouteRuleMatchHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GrpcRouteRuleMatchHeaderArgsBuilder().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("xouxsejtwwyqjrhp")
    public suspend fun headers(argument: suspend GrpcRouteRuleMatchHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GrpcRouteRuleMatchHeaderArgsBuilder().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("nwndgxklmxgjoaks")
    public suspend fun headers(vararg values: GrpcRouteRuleMatchHeaderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value A gRPC method to match against. If this field is empty or omitted, will match all methods.
     * Structure is documented below.
     */
    @JvmName("mgctvsnathfnnnxa")
    public suspend fun method(`value`: GrpcRouteRuleMatchMethodArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.method = mapped
    }

    /**
     * @param argument A gRPC method to match against. If this field is empty or omitted, will match all methods.
     * Structure is documented below.
     */
    @JvmName("fffeuahunrlgwpqt")
    public suspend fun method(argument: suspend GrpcRouteRuleMatchMethodArgsBuilder.() -> Unit) {
        val toBeMapped = GrpcRouteRuleMatchMethodArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.method = mapped
    }

    internal fun build(): GrpcRouteRuleMatchArgs = GrpcRouteRuleMatchArgs(
        headers = headers,
        method = method,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy