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

com.pulumi.gcp.compute.kotlin.inputs.RouterRoutePolicyTermArgs.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.13.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RouterRoutePolicyTermArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property actions 'CEL expressions to evaluate to modify a route when this term matches.'\
 * Structure is documented below.
 * @property match CEL expression evaluated against a route to determine if this term applies (see Policy Language). When not set, the term applies to all routes.
 * Structure is documented below.
 * @property priority The evaluation priority for this term, which must be between 0 (inclusive) and 231 (exclusive), and unique within the list.
 */
public data class RouterRoutePolicyTermArgs(
    public val actions: Output>? = null,
    public val match: Output? = null,
    public val priority: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.RouterRoutePolicyTermArgs =
        com.pulumi.gcp.compute.inputs.RouterRoutePolicyTermArgs.builder()
            .actions(
                actions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .match(match?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .priority(priority.applyValue({ args0 -> args0 })).build()
}

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

    private var match: Output? = null

    private var priority: Output? = null

    /**
     * @param value 'CEL expressions to evaluate to modify a route when this term matches.'\
     * Structure is documented below.
     */
    @JvmName("ymnnkdujqqgeyuav")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values 'CEL expressions to evaluate to modify a route when this term matches.'\
     * Structure is documented below.
     */
    @JvmName("ityqbwrxtbskarfc")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

    /**
     * @param value CEL expression evaluated against a route to determine if this term applies (see Policy Language). When not set, the term applies to all routes.
     * Structure is documented below.
     */
    @JvmName("xekixwxfydyijnnd")
    public suspend fun match(`value`: Output) {
        this.match = value
    }

    /**
     * @param value The evaluation priority for this term, which must be between 0 (inclusive) and 231 (exclusive), and unique within the list.
     */
    @JvmName("esqjwcaahfnjqyja")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value 'CEL expressions to evaluate to modify a route when this term matches.'\
     * Structure is documented below.
     */
    @JvmName("blhkwvrmtshlxnqp")
    public suspend fun actions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param argument 'CEL expressions to evaluate to modify a route when this term matches.'\
     * Structure is documented below.
     */
    @JvmName("mkdqhseqxsuntrhy")
    public suspend fun actions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RouterRoutePolicyTermActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument 'CEL expressions to evaluate to modify a route when this term matches.'\
     * Structure is documented below.
     */
    @JvmName("xompsddtmenpkmgd")
    public suspend fun actions(vararg argument: suspend RouterRoutePolicyTermActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RouterRoutePolicyTermActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument 'CEL expressions to evaluate to modify a route when this term matches.'\
     * Structure is documented below.
     */
    @JvmName("enaghsuemlnbculk")
    public suspend fun actions(argument: suspend RouterRoutePolicyTermActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RouterRoutePolicyTermActionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param values 'CEL expressions to evaluate to modify a route when this term matches.'\
     * Structure is documented below.
     */
    @JvmName("goxlneotkogwrxww")
    public suspend fun actions(vararg values: RouterRoutePolicyTermActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value CEL expression evaluated against a route to determine if this term applies (see Policy Language). When not set, the term applies to all routes.
     * Structure is documented below.
     */
    @JvmName("rsdbvoiuwdixxvpt")
    public suspend fun match(`value`: RouterRoutePolicyTermMatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.match = mapped
    }

    /**
     * @param argument CEL expression evaluated against a route to determine if this term applies (see Policy Language). When not set, the term applies to all routes.
     * Structure is documented below.
     */
    @JvmName("ahjkdeawgahhjvij")
    public suspend fun match(argument: suspend RouterRoutePolicyTermMatchArgsBuilder.() -> Unit) {
        val toBeMapped = RouterRoutePolicyTermMatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.match = mapped
    }

    /**
     * @param value The evaluation priority for this term, which must be between 0 (inclusive) and 231 (exclusive), and unique within the list.
     */
    @JvmName("okdvqppuwwqpdukx")
    public suspend fun priority(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    internal fun build(): RouterRoutePolicyTermArgs = RouterRoutePolicyTermArgs(
        actions = actions,
        match = match,
        priority = priority ?: throw PulumiNullFieldException("priority"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy