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

com.pulumi.gcp.networkservices.kotlin.inputs.TlsRouteRuleArgs.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.TlsRouteRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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 action Required. A detailed rule defining how to route traffic.
 * Structure is documented below.
 * @property matches Matches define the predicate used to match requests to a given action.
 * Structure is documented below.
 */
public data class TlsRouteRuleArgs(
    public val action: Output,
    public val matches: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.TlsRouteRuleArgs =
        com.pulumi.gcp.networkservices.inputs.TlsRouteRuleArgs.builder()
            .action(action.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .matches(
                matches.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [TlsRouteRuleArgs].
 */
@PulumiTagMarker
public class TlsRouteRuleArgsBuilder internal constructor() {
    private var action: Output? = null

    private var matches: Output>? = null

    /**
     * @param value Required. A detailed rule defining how to route traffic.
     * Structure is documented below.
     */
    @JvmName("iakqletyqjcbshcq")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value Matches define the predicate used to match requests to a given action.
     * Structure is documented below.
     */
    @JvmName("jkvasbjwgvjhhpjp")
    public suspend fun matches(`value`: Output>) {
        this.matches = value
    }

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

    /**
     * @param values Matches define the predicate used to match requests to a given action.
     * Structure is documented below.
     */
    @JvmName("uwugrlbdbwcgahat")
    public suspend fun matches(values: List>) {
        this.matches = Output.all(values)
    }

    /**
     * @param value Required. A detailed rule defining how to route traffic.
     * Structure is documented below.
     */
    @JvmName("jpgjtbnnptofacis")
    public suspend fun action(`value`: TlsRouteRuleActionArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param argument Required. A detailed rule defining how to route traffic.
     * Structure is documented below.
     */
    @JvmName("kpgsoxforepmsgll")
    public suspend fun action(argument: suspend TlsRouteRuleActionArgsBuilder.() -> Unit) {
        val toBeMapped = TlsRouteRuleActionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.action = mapped
    }

    /**
     * @param value Matches define the predicate used to match requests to a given action.
     * Structure is documented below.
     */
    @JvmName("svbwshtegpprhmad")
    public suspend fun matches(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matches = mapped
    }

    /**
     * @param argument Matches define the predicate used to match requests to a given action.
     * Structure is documented below.
     */
    @JvmName("vxaqdvfyoymxcxdt")
    public suspend fun matches(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TlsRouteRuleMatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.matches = mapped
    }

    /**
     * @param argument Matches define the predicate used to match requests to a given action.
     * Structure is documented below.
     */
    @JvmName("gfdkebeqtxfpbnls")
    public suspend fun matches(vararg argument: suspend TlsRouteRuleMatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TlsRouteRuleMatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.matches = mapped
    }

    /**
     * @param argument Matches define the predicate used to match requests to a given action.
     * Structure is documented below.
     */
    @JvmName("cwgpyxagnbihsirs")
    public suspend fun matches(argument: suspend TlsRouteRuleMatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TlsRouteRuleMatchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.matches = mapped
    }

    /**
     * @param values Matches define the predicate used to match requests to a given action.
     * Structure is documented below.
     */
    @JvmName("egnpxvkabsrosrma")
    public suspend fun matches(vararg values: TlsRouteRuleMatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matches = mapped
    }

    internal fun build(): TlsRouteRuleArgs = TlsRouteRuleArgs(
        action = action ?: throw PulumiNullFieldException("action"),
        matches = matches ?: throw PulumiNullFieldException("matches"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy