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

com.pulumi.azurenative.network.kotlin.inputs.VpnGatewayNatRuleArgs.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.VpnGatewayNatRuleArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.VpnNatRuleMode
import com.pulumi.azurenative.network.kotlin.enums.VpnNatRuleType
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

/**
 * VpnGatewayNatRule Resource.
 * @property externalMappings The private IP address external mapping for NAT.
 * @property id Resource ID.
 * @property internalMappings The private IP address internal mapping for NAT.
 * @property ipConfigurationId The IP Configuration ID this NAT rule applies to.
 * @property mode The Source NAT direction of a VPN NAT.
 * @property name The name of the resource that is unique within a resource group. This name can be used to access the resource.
 * @property type The type of NAT rule for VPN NAT.
 */
public data class VpnGatewayNatRuleArgs(
    public val externalMappings: Output>? = null,
    public val id: Output? = null,
    public val internalMappings: Output>? = null,
    public val ipConfigurationId: Output? = null,
    public val mode: Output>? = null,
    public val name: Output? = null,
    public val type: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.inputs.VpnGatewayNatRuleArgs =
        com.pulumi.azurenative.network.inputs.VpnGatewayNatRuleArgs.builder()
            .externalMappings(
                externalMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .id(id?.applyValue({ args0 -> args0 }))
            .internalMappings(
                internalMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .ipConfigurationId(ipConfigurationId?.applyValue({ args0 -> args0 }))
            .mode(
                mode?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .type(
                type?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var id: Output? = null

    private var internalMappings: Output>? = null

    private var ipConfigurationId: Output? = null

    private var mode: Output>? = null

    private var name: Output? = null

    private var type: Output>? = null

    /**
     * @param value The private IP address external mapping for NAT.
     */
    @JvmName("ctlkojaebonlyewn")
    public suspend fun externalMappings(`value`: Output>) {
        this.externalMappings = value
    }

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

    /**
     * @param values The private IP address external mapping for NAT.
     */
    @JvmName("hsjmllodpcqfyjwi")
    public suspend fun externalMappings(values: List>) {
        this.externalMappings = Output.all(values)
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("jbdykpelfkeinhly")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value The private IP address internal mapping for NAT.
     */
    @JvmName("smgfiyjrrvnhsmwm")
    public suspend fun internalMappings(`value`: Output>) {
        this.internalMappings = value
    }

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

    /**
     * @param values The private IP address internal mapping for NAT.
     */
    @JvmName("uwjkindmigbxsigt")
    public suspend fun internalMappings(values: List>) {
        this.internalMappings = Output.all(values)
    }

    /**
     * @param value The IP Configuration ID this NAT rule applies to.
     */
    @JvmName("covitcmoorsyaldv")
    public suspend fun ipConfigurationId(`value`: Output) {
        this.ipConfigurationId = value
    }

    /**
     * @param value The Source NAT direction of a VPN NAT.
     */
    @JvmName("pxtfdyberqbjtljw")
    public suspend fun mode(`value`: Output>) {
        this.mode = value
    }

    /**
     * @param value The name of the resource that is unique within a resource group. This name can be used to access the resource.
     */
    @JvmName("klwapofpysvadbjp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The type of NAT rule for VPN NAT.
     */
    @JvmName("dgcicubmqpmvpmad")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value The private IP address external mapping for NAT.
     */
    @JvmName("coeahhqelvmgyryy")
    public suspend fun externalMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalMappings = mapped
    }

    /**
     * @param argument The private IP address external mapping for NAT.
     */
    @JvmName("mtuxiseeauxpnacx")
    public suspend fun externalMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VpnNatRuleMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.externalMappings = mapped
    }

    /**
     * @param argument The private IP address external mapping for NAT.
     */
    @JvmName("wrvfyqscokyccgif")
    public suspend fun externalMappings(vararg argument: suspend VpnNatRuleMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VpnNatRuleMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.externalMappings = mapped
    }

    /**
     * @param argument The private IP address external mapping for NAT.
     */
    @JvmName("dnpycgtqenlvlqtq")
    public suspend fun externalMappings(argument: suspend VpnNatRuleMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VpnNatRuleMappingArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.externalMappings = mapped
    }

    /**
     * @param values The private IP address external mapping for NAT.
     */
    @JvmName("ckptgjblajxjyqdm")
    public suspend fun externalMappings(vararg values: VpnNatRuleMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.externalMappings = mapped
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("fprwutujtykjynok")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value The private IP address internal mapping for NAT.
     */
    @JvmName("rcgxiyydgnoshuej")
    public suspend fun internalMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.internalMappings = mapped
    }

    /**
     * @param argument The private IP address internal mapping for NAT.
     */
    @JvmName("hpyttxvxtqkhcqlt")
    public suspend fun internalMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VpnNatRuleMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.internalMappings = mapped
    }

    /**
     * @param argument The private IP address internal mapping for NAT.
     */
    @JvmName("hjvkvvwhkdkucxln")
    public suspend fun internalMappings(vararg argument: suspend VpnNatRuleMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VpnNatRuleMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.internalMappings = mapped
    }

    /**
     * @param argument The private IP address internal mapping for NAT.
     */
    @JvmName("tparwbwsvfdbrdxw")
    public suspend fun internalMappings(argument: suspend VpnNatRuleMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VpnNatRuleMappingArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.internalMappings = mapped
    }

    /**
     * @param values The private IP address internal mapping for NAT.
     */
    @JvmName("jjneypeuegkstwsn")
    public suspend fun internalMappings(vararg values: VpnNatRuleMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.internalMappings = mapped
    }

    /**
     * @param value The IP Configuration ID this NAT rule applies to.
     */
    @JvmName("sxpdufbgipboowij")
    public suspend fun ipConfigurationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipConfigurationId = mapped
    }

    /**
     * @param value The Source NAT direction of a VPN NAT.
     */
    @JvmName("wwlkpfgwlmgxyjii")
    public suspend fun mode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The Source NAT direction of a VPN NAT.
     */
    @JvmName("rbhlotaesgnjwumw")
    public fun mode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The Source NAT direction of a VPN NAT.
     */
    @JvmName("ttbifusijxbqcyas")
    public fun mode(`value`: VpnNatRuleMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The name of the resource that is unique within a resource group. This name can be used to access the resource.
     */
    @JvmName("uimtpkjchuulnxav")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The type of NAT rule for VPN NAT.
     */
    @JvmName("yohejosegalkxyle")
    public suspend fun type(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The type of NAT rule for VPN NAT.
     */
    @JvmName("rnsltcgyrfermjqn")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The type of NAT rule for VPN NAT.
     */
    @JvmName("kchcobtnkranoigc")
    public fun type(`value`: VpnNatRuleType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): VpnGatewayNatRuleArgs = VpnGatewayNatRuleArgs(
        externalMappings = externalMappings,
        id = id,
        internalMappings = internalMappings,
        ipConfigurationId = ipConfigurationId,
        mode = mode,
        name = name,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy