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

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

package com.pulumi.azure.network.kotlin.inputs

import com.pulumi.azure.network.inputs.RouteMapRuleActionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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

/**
 *
 * @property parameters A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
 * @property type The type of the action to be taken. Possible values are `Add`, `Drop`, `Remove`, `Replace` and `Unknown`.
 */
public data class RouteMapRuleActionArgs(
    public val parameters: Output>? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.inputs.RouteMapRuleActionArgs =
        com.pulumi.azure.network.inputs.RouteMapRuleActionArgs.builder()
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 })).build()
}

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

    private var type: Output? = null

    /**
     * @param value A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
     */
    @JvmName("sasieukkotjxpqws")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param values A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
     */
    @JvmName("xkvakbmlxkwcsogh")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value The type of the action to be taken. Possible values are `Add`, `Drop`, `Remove`, `Replace` and `Unknown`.
     */
    @JvmName("kogbxyjbbyuqrosp")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
     */
    @JvmName("dtisrgbjsayoytfx")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
     */
    @JvmName("oniejoswaucjjenw")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RouteMapRuleActionParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
     */
    @JvmName("nuthovdfweurvubs")
    public suspend fun parameters(vararg argument: suspend RouteMapRuleActionParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RouteMapRuleActionParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
     */
    @JvmName("nbcfvutqmsphigkb")
    public suspend fun parameters(argument: suspend RouteMapRuleActionParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RouteMapRuleActionParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values A `parameter` block as defined below. Required if `type` is anything other than `Drop`.
     */
    @JvmName("bayvqxsbnjcybslh")
    public suspend fun parameters(vararg values: RouteMapRuleActionParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The type of the action to be taken. Possible values are `Add`, `Drop`, `Remove`, `Replace` and `Unknown`.
     */
    @JvmName("hynuerigsnstnhgd")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): RouteMapRuleActionArgs = RouteMapRuleActionArgs(
        parameters = parameters,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy