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

com.pulumi.azurenative.network.kotlin.inputs.RouteMapRuleArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.network.kotlin.inputs

import com.pulumi.azurenative.network.inputs.RouteMapRuleArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.NextStep
import com.pulumi.core.Either
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A RouteMap Rule.
 * @property actions List of actions which will be applied on a match.
 * @property matchCriteria List of matching criterion which will be applied to traffic.
 * @property name The unique name for the rule.
 * @property nextStepIfMatched Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'.
 */
public data class RouteMapRuleArgs(
    public val actions: Output>? = null,
    public val matchCriteria: Output>? = null,
    public val name: Output? = null,
    public val nextStepIfMatched: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.inputs.RouteMapRuleArgs =
        com.pulumi.azurenative.network.inputs.RouteMapRuleArgs.builder()
            .actions(
                actions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .matchCriteria(
                matchCriteria?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .nextStepIfMatched(
                nextStepIfMatched?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            ).build()
}

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

    private var matchCriteria: Output>? = null

    private var name: Output? = null

    private var nextStepIfMatched: Output>? = null

    /**
     * @param value List of actions which will be applied on a match.
     */
    @JvmName("osqwcmharrtjufgh")
    public suspend fun actions(`value`: Output>) {
        this.actions = value
    }

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

    /**
     * @param values List of actions which will be applied on a match.
     */
    @JvmName("hjwarqyvvrtbrewm")
    public suspend fun actions(values: List>) {
        this.actions = Output.all(values)
    }

    /**
     * @param value List of matching criterion which will be applied to traffic.
     */
    @JvmName("grywsjsqeykqiets")
    public suspend fun matchCriteria(`value`: Output>) {
        this.matchCriteria = value
    }

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

    /**
     * @param values List of matching criterion which will be applied to traffic.
     */
    @JvmName("yeqclmtilwuklffw")
    public suspend fun matchCriteria(values: List>) {
        this.matchCriteria = Output.all(values)
    }

    /**
     * @param value The unique name for the rule.
     */
    @JvmName("mtcamdxrfrarsjhw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'.
     */
    @JvmName("rxdatdmglynradhb")
    public suspend fun nextStepIfMatched(`value`: Output>) {
        this.nextStepIfMatched = value
    }

    /**
     * @param value List of actions which will be applied on a match.
     */
    @JvmName("mumljplhccdooaup")
    public suspend fun actions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param argument List of actions which will be applied on a match.
     */
    @JvmName("kdappyivlxxlhrrt")
    public suspend fun actions(argument: List Unit>) {
        val toBeMapped = argument.toList().map { ActionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument List of actions which will be applied on a match.
     */
    @JvmName("rbcjvvwgeciyewoi")
    public suspend fun actions(vararg argument: suspend ActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { ActionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param argument List of actions which will be applied on a match.
     */
    @JvmName("fouqaumxlgdtcenf")
    public suspend fun actions(argument: suspend ActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ActionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.actions = mapped
    }

    /**
     * @param values List of actions which will be applied on a match.
     */
    @JvmName("kamjaqgvugukenmg")
    public suspend fun actions(vararg values: ActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value List of matching criterion which will be applied to traffic.
     */
    @JvmName("npreinlrybpqqjbi")
    public suspend fun matchCriteria(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchCriteria = mapped
    }

    /**
     * @param argument List of matching criterion which will be applied to traffic.
     */
    @JvmName("unepyluhyibfvpmo")
    public suspend fun matchCriteria(argument: List Unit>) {
        val toBeMapped = argument.toList().map { CriterionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.matchCriteria = mapped
    }

    /**
     * @param argument List of matching criterion which will be applied to traffic.
     */
    @JvmName("ticbnfurscsfyprm")
    public suspend fun matchCriteria(vararg argument: suspend CriterionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { CriterionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.matchCriteria = mapped
    }

    /**
     * @param argument List of matching criterion which will be applied to traffic.
     */
    @JvmName("ausjwlpwvrlyjfom")
    public suspend fun matchCriteria(argument: suspend CriterionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CriterionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.matchCriteria = mapped
    }

    /**
     * @param values List of matching criterion which will be applied to traffic.
     */
    @JvmName("pylwvynoesnetvxd")
    public suspend fun matchCriteria(vararg values: CriterionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchCriteria = mapped
    }

    /**
     * @param value The unique name for the rule.
     */
    @JvmName("dbriawhxsgcfiqoo")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'.
     */
    @JvmName("jejefnrrrpuvsluk")
    public suspend fun nextStepIfMatched(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nextStepIfMatched = mapped
    }

    /**
     * @param value Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'.
     */
    @JvmName("ajouggoqmpqukgwb")
    public fun nextStepIfMatched(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nextStepIfMatched = mapped
    }

    /**
     * @param value Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'.
     */
    @JvmName("ohxhhahlniryxewx")
    public fun nextStepIfMatched(`value`: NextStep) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nextStepIfMatched = mapped
    }

    internal fun build(): RouteMapRuleArgs = RouteMapRuleArgs(
        actions = actions,
        matchCriteria = matchCriteria,
        name = name,
        nextStepIfMatched = nextStepIfMatched,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy