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

com.pulumi.azurenative.network.kotlin.VpnGatewayArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.network.kotlin

import com.pulumi.azurenative.network.VpnGatewayArgs.builder
import com.pulumi.azurenative.network.kotlin.inputs.BgpSettingsArgs
import com.pulumi.azurenative.network.kotlin.inputs.BgpSettingsArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.VpnConnectionArgs
import com.pulumi.azurenative.network.kotlin.inputs.VpnConnectionArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.VpnGatewayNatRuleArgs
import com.pulumi.azurenative.network.kotlin.inputs.VpnGatewayNatRuleArgsBuilder
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.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * VpnGateway Resource.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
 * Other available API versions: 2018-07-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
 * ## Example Usage
 * ### VpnGatewayPut
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var vpnGateway = new AzureNative.Network.VpnGateway("vpnGateway", new()
 *     {
 *         BgpSettings = new AzureNative.Network.Inputs.BgpSettingsArgs
 *         {
 *             Asn = 65515,
 *             BgpPeeringAddresses = new[]
 *             {
 *                 new AzureNative.Network.Inputs.IPConfigurationBgpPeeringAddressArgs
 *                 {
 *                     CustomBgpIpAddresses = new[]
 *                     {
 *                         "169.254.21.5",
 *                     },
 *                     IpconfigurationId = "Instance0",
 *                 },
 *                 new AzureNative.Network.Inputs.IPConfigurationBgpPeeringAddressArgs
 *                 {
 *                     CustomBgpIpAddresses = new[]
 *                     {
 *                         "169.254.21.10",
 *                     },
 *                     IpconfigurationId = "Instance1",
 *                 },
 *             },
 *             PeerWeight = 0,
 *         },
 *         Connections = new[]
 *         {
 *             new AzureNative.Network.Inputs.VpnConnectionArgs
 *             {
 *                 Name = "vpnConnection1",
 *                 RemoteVpnSite = new AzureNative.Network.Inputs.SubResourceArgs
 *                 {
 *                     Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1",
 *                 },
 *                 VpnLinkConnections = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.VpnSiteLinkConnectionArgs
 *                     {
 *                         ConnectionBandwidth = 200,
 *                         EgressNatRules = new[]
 *                         {
 *                             new AzureNative.Network.Inputs.SubResourceArgs
 *                             {
 *                                 Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03",
 *                             },
 *                         },
 *                         Name = "Connection-Link1",
 *                         SharedKey = "key",
 *                         VpnConnectionProtocolType = AzureNative.Network.VirtualNetworkGatewayConnectionProtocol.IKEv2,
 *                         VpnSiteLink = new AzureNative.Network.Inputs.SubResourceArgs
 *                         {
 *                             Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1",
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *         EnableBgpRouteTranslationForNat = false,
 *         GatewayName = "gateway1",
 *         IsRoutingPreferenceInternet = false,
 *         Location = "westcentralus",
 *         NatRules = new[]
 *         {
 *             new AzureNative.Network.Inputs.VpnGatewayNatRuleArgs
 *             {
 *                 ExternalMappings = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.VpnNatRuleMappingArgs
 *                     {
 *                         AddressSpace = "192.168.0.0/26",
 *                     },
 *                 },
 *                 InternalMappings = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.VpnNatRuleMappingArgs
 *                     {
 *                         AddressSpace = "0.0.0.0/26",
 *                     },
 *                 },
 *                 IpConfigurationId = "",
 *                 Mode = AzureNative.Network.VpnNatRuleMode.EgressSnat,
 *                 Name = "nat03",
 *                 Type = AzureNative.Network.VpnNatRuleType.Static,
 *             },
 *         },
 *         ResourceGroupName = "rg1",
 *         Tags =
 *         {
 *             { "key1", "value1" },
 *         },
 *         VirtualHub = new AzureNative.Network.Inputs.SubResourceArgs
 *         {
 *             Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := network.NewVpnGateway(ctx, "vpnGateway", &network.VpnGatewayArgs{
 * 			BgpSettings: &network.BgpSettingsArgs{
 * 				Asn: pulumi.Float64(65515),
 * 				BgpPeeringAddresses: network.IPConfigurationBgpPeeringAddressArray{
 * 					&network.IPConfigurationBgpPeeringAddressArgs{
 * 						CustomBgpIpAddresses: pulumi.StringArray{
 * 							pulumi.String("169.254.21.5"),
 * 						},
 * 						IpconfigurationId: pulumi.String("Instance0"),
 * 					},
 * 					&network.IPConfigurationBgpPeeringAddressArgs{
 * 						CustomBgpIpAddresses: pulumi.StringArray{
 * 							pulumi.String("169.254.21.10"),
 * 						},
 * 						IpconfigurationId: pulumi.String("Instance1"),
 * 					},
 * 				},
 * 				PeerWeight: pulumi.Int(0),
 * 			},
 * 			Connections: network.VpnConnectionTypeArray{
 * 				&network.VpnConnectionTypeArgs{
 * 					Name: pulumi.String("vpnConnection1"),
 * 					RemoteVpnSite: &network.SubResourceArgs{
 * 						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1"),
 * 					},
 * 					VpnLinkConnections: network.VpnSiteLinkConnectionArray{
 * 						&network.VpnSiteLinkConnectionArgs{
 * 							ConnectionBandwidth: pulumi.Int(200),
 * 							EgressNatRules: network.SubResourceArray{
 * 								&network.SubResourceArgs{
 * 									Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03"),
 * 								},
 * 							},
 * 							Name:                      pulumi.String("Connection-Link1"),
 * 							SharedKey:                 pulumi.String("key"),
 * 							VpnConnectionProtocolType: pulumi.String(network.VirtualNetworkGatewayConnectionProtocolIKEv2),
 * 							VpnSiteLink: &network.SubResourceArgs{
 * 								Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 			EnableBgpRouteTranslationForNat: pulumi.Bool(false),
 * 			GatewayName:                     pulumi.String("gateway1"),
 * 			IsRoutingPreferenceInternet:     pulumi.Bool(false),
 * 			Location:                        pulumi.String("westcentralus"),
 * 			NatRules: network.VpnGatewayNatRuleArray{
 * 				&network.VpnGatewayNatRuleArgs{
 * 					ExternalMappings: network.VpnNatRuleMappingArray{
 * 						&network.VpnNatRuleMappingArgs{
 * 							AddressSpace: pulumi.String("192.168.0.0/26"),
 * 						},
 * 					},
 * 					InternalMappings: network.VpnNatRuleMappingArray{
 * 						&network.VpnNatRuleMappingArgs{
 * 							AddressSpace: pulumi.String("0.0.0.0/26"),
 * 						},
 * 					},
 * 					IpConfigurationId: pulumi.String(""),
 * 					Mode:              pulumi.String(network.VpnNatRuleModeEgressSnat),
 * 					Name:              pulumi.String("nat03"),
 * 					Type:              pulumi.String(network.VpnNatRuleTypeStatic),
 * 				},
 * 			},
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Tags: pulumi.StringMap{
 * 				"key1": pulumi.String("value1"),
 * 			},
 * 			VirtualHub: &network.SubResourceArgs{
 * 				Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.VpnGateway;
 * import com.pulumi.azurenative.network.VpnGatewayArgs;
 * import com.pulumi.azurenative.network.inputs.BgpSettingsArgs;
 * import com.pulumi.azurenative.network.inputs.VpnConnectionArgs;
 * import com.pulumi.azurenative.network.inputs.SubResourceArgs;
 * import com.pulumi.azurenative.network.inputs.VpnGatewayNatRuleArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var vpnGateway = new VpnGateway("vpnGateway", VpnGatewayArgs.builder()
 *             .bgpSettings(BgpSettingsArgs.builder()
 *                 .asn(65515)
 *                 .bgpPeeringAddresses(
 *                     IPConfigurationBgpPeeringAddressArgs.builder()
 *                         .customBgpIpAddresses("169.254.21.5")
 *                         .ipconfigurationId("Instance0")
 *                         .build(),
 *                     IPConfigurationBgpPeeringAddressArgs.builder()
 *                         .customBgpIpAddresses("169.254.21.10")
 *                         .ipconfigurationId("Instance1")
 *                         .build())
 *                 .peerWeight(0)
 *                 .build())
 *             .connections(VpnConnectionArgs.builder()
 *                 .name("vpnConnection1")
 *                 .remoteVpnSite(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1")
 *                     .build())
 *                 .vpnLinkConnections(VpnSiteLinkConnectionArgs.builder()
 *                     .connectionBandwidth(200)
 *                     .egressNatRules(SubResourceArgs.builder()
 *                         .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03")
 *                         .build())
 *                     .name("Connection-Link1")
 *                     .sharedKey("key")
 *                     .vpnConnectionProtocolType("IKEv2")
 *                     .vpnSiteLink(SubResourceArgs.builder()
 *                         .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .enableBgpRouteTranslationForNat(false)
 *             .gatewayName("gateway1")
 *             .isRoutingPreferenceInternet(false)
 *             .location("westcentralus")
 *             .natRules(VpnGatewayNatRuleArgs.builder()
 *                 .externalMappings(VpnNatRuleMappingArgs.builder()
 *                     .addressSpace("192.168.0.0/26")
 *                     .build())
 *                 .internalMappings(VpnNatRuleMappingArgs.builder()
 *                     .addressSpace("0.0.0.0/26")
 *                     .build())
 *                 .ipConfigurationId("")
 *                 .mode("EgressSnat")
 *                 .name("nat03")
 *                 .type("Static")
 *                 .build())
 *             .resourceGroupName("rg1")
 *             .tags(Map.of("key1", "value1"))
 *             .virtualHub(SubResourceArgs.builder()
 *                 .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:VpnGateway gateway1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}
 * ```
 * @property bgpSettings Local network gateway's BGP speaker settings.
 * @property connections List of all vpn connections to the gateway.
 * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
 * @property enableBgpRouteTranslationForNat Enable BGP routes translation for NAT on this VpnGateway.
 * @property gatewayName The name of the gateway.
 * @property id Resource ID.
 * @property isRoutingPreferenceInternet Enable Routing Preference property for the Public IP Interface of the VpnGateway.
 * @property location Resource location.
 * @property natRules List of all the nat Rules associated with the gateway.
 * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
 * @property resourceGroupName The resource group name of the VpnGateway.
 * @property tags Resource tags.
 * @property virtualHub The VirtualHub to which the gateway belongs.
 * @property vpnGatewayScaleUnit The scale unit for this vpn gateway.
 */
public data class VpnGatewayArgs(
    public val bgpSettings: Output? = null,
    public val connections: Output>? = null,
    public val enableBgpRouteTranslationForNat: Output? = null,
    public val gatewayName: Output? = null,
    public val id: Output? = null,
    public val isRoutingPreferenceInternet: Output? = null,
    public val location: Output? = null,
    public val natRules: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val virtualHub: Output? = null,
    public val vpnGatewayScaleUnit: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.VpnGatewayArgs =
        com.pulumi.azurenative.network.VpnGatewayArgs.builder()
            .bgpSettings(bgpSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .connections(
                connections?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enableBgpRouteTranslationForNat(enableBgpRouteTranslationForNat?.applyValue({ args0 -> args0 }))
            .gatewayName(gatewayName?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .isRoutingPreferenceInternet(isRoutingPreferenceInternet?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .natRules(
                natRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .virtualHub(virtualHub?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vpnGatewayScaleUnit(vpnGatewayScaleUnit?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VpnGatewayArgs].
 */
@PulumiTagMarker
public class VpnGatewayArgsBuilder internal constructor() {
    private var bgpSettings: Output? = null

    private var connections: Output>? = null

    private var enableBgpRouteTranslationForNat: Output? = null

    private var gatewayName: Output? = null

    private var id: Output? = null

    private var isRoutingPreferenceInternet: Output? = null

    private var location: Output? = null

    private var natRules: Output>? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var virtualHub: Output? = null

    private var vpnGatewayScaleUnit: Output? = null

    /**
     * @param value Local network gateway's BGP speaker settings.
     */
    @JvmName("httobtubqjhnooyb")
    public suspend fun bgpSettings(`value`: Output) {
        this.bgpSettings = value
    }

    /**
     * @param value List of all vpn connections to the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("heqvyprenbbomids")
    public suspend fun connections(`value`: Output>) {
        this.connections = value
    }

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

    /**
     * @param values List of all vpn connections to the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("eeyvcmxqwpfwgvay")
    public suspend fun connections(values: List>) {
        this.connections = Output.all(values)
    }

    /**
     * @param value Enable BGP routes translation for NAT on this VpnGateway.
     */
    @JvmName("fuixieasyakmxygt")
    public suspend fun enableBgpRouteTranslationForNat(`value`: Output) {
        this.enableBgpRouteTranslationForNat = value
    }

    /**
     * @param value The name of the gateway.
     */
    @JvmName("ohtrxqihlnttifax")
    public suspend fun gatewayName(`value`: Output) {
        this.gatewayName = value
    }

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

    /**
     * @param value Enable Routing Preference property for the Public IP Interface of the VpnGateway.
     */
    @JvmName("hxrsmbvmjumrecyw")
    public suspend fun isRoutingPreferenceInternet(`value`: Output) {
        this.isRoutingPreferenceInternet = value
    }

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

    /**
     * @param value List of all the nat Rules associated with the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("dicixtxiliawgwok")
    public suspend fun natRules(`value`: Output>) {
        this.natRules = value
    }

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

    /**
     * @param values List of all the nat Rules associated with the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("waywbfvvxgrqjqgf")
    public suspend fun natRules(values: List>) {
        this.natRules = Output.all(values)
    }

    /**
     * @param value The resource group name of the VpnGateway.
     */
    @JvmName("tvvdyfoikewuoube")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("exvdaugnskmudsor")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The VirtualHub to which the gateway belongs.
     */
    @JvmName("uryxpmwycdsnceib")
    public suspend fun virtualHub(`value`: Output) {
        this.virtualHub = value
    }

    /**
     * @param value The scale unit for this vpn gateway.
     */
    @JvmName("fqmxwijvcvsqnhmb")
    public suspend fun vpnGatewayScaleUnit(`value`: Output) {
        this.vpnGatewayScaleUnit = value
    }

    /**
     * @param value Local network gateway's BGP speaker settings.
     */
    @JvmName("kjngaxtoikxwkaoe")
    public suspend fun bgpSettings(`value`: BgpSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bgpSettings = mapped
    }

    /**
     * @param argument Local network gateway's BGP speaker settings.
     */
    @JvmName("aijpyhufvqnwiflg")
    public suspend fun bgpSettings(argument: suspend BgpSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = BgpSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.bgpSettings = mapped
    }

    /**
     * @param value List of all vpn connections to the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("kdiamaxlqsnmimrg")
    public suspend fun connections(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connections = mapped
    }

    /**
     * @param argument List of all vpn connections to the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("magwgwyovhqlejam")
    public suspend fun connections(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VpnConnectionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.connections = mapped
    }

    /**
     * @param argument List of all vpn connections to the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("rybtdblagkmvgcog")
    public suspend fun connections(vararg argument: suspend VpnConnectionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VpnConnectionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.connections = mapped
    }

    /**
     * @param argument List of all vpn connections to the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("nrhffeamfciwvxej")
    public suspend fun connections(argument: suspend VpnConnectionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VpnConnectionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.connections = mapped
    }

    /**
     * @param values List of all vpn connections to the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("frcbneqjmurxivsg")
    public suspend fun connections(vararg values: VpnConnectionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.connections = mapped
    }

    /**
     * @param value Enable BGP routes translation for NAT on this VpnGateway.
     */
    @JvmName("whuicssqdbnolbkl")
    public suspend fun enableBgpRouteTranslationForNat(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableBgpRouteTranslationForNat = mapped
    }

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

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

    /**
     * @param value Enable Routing Preference property for the Public IP Interface of the VpnGateway.
     */
    @JvmName("snigilqaumstqiat")
    public suspend fun isRoutingPreferenceInternet(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isRoutingPreferenceInternet = mapped
    }

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

    /**
     * @param value List of all the nat Rules associated with the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("intajsrjmiupcamv")
    public suspend fun natRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.natRules = mapped
    }

    /**
     * @param argument List of all the nat Rules associated with the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("agehrwjvtdfyxfgi")
    public suspend fun natRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VpnGatewayNatRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.natRules = mapped
    }

    /**
     * @param argument List of all the nat Rules associated with the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("pucpgqedqrxvkltp")
    public suspend fun natRules(vararg argument: suspend VpnGatewayNatRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VpnGatewayNatRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.natRules = mapped
    }

    /**
     * @param argument List of all the nat Rules associated with the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("qgmnexfgdqnkltxl")
    public suspend fun natRules(argument: suspend VpnGatewayNatRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VpnGatewayNatRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.natRules = mapped
    }

    /**
     * @param values List of all the nat Rules associated with the gateway.
     * These are also available as standalone resources. Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
     */
    @JvmName("hmsmqovuyigapwlq")
    public suspend fun natRules(vararg values: VpnGatewayNatRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.natRules = mapped
    }

    /**
     * @param value The resource group name of the VpnGateway.
     */
    @JvmName("ethphoumqwqleuck")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

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

    /**
     * @param values Resource tags.
     */
    @JvmName("iipasgtiecfrkujb")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The VirtualHub to which the gateway belongs.
     */
    @JvmName("dywoknmlvdjqrrfi")
    public suspend fun virtualHub(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualHub = mapped
    }

    /**
     * @param argument The VirtualHub to which the gateway belongs.
     */
    @JvmName("lkueqjmkhmstrpnw")
    public suspend fun virtualHub(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.virtualHub = mapped
    }

    /**
     * @param value The scale unit for this vpn gateway.
     */
    @JvmName("bsxuhbiyknvxexva")
    public suspend fun vpnGatewayScaleUnit(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpnGatewayScaleUnit = mapped
    }

    internal fun build(): VpnGatewayArgs = VpnGatewayArgs(
        bgpSettings = bgpSettings,
        connections = connections,
        enableBgpRouteTranslationForNat = enableBgpRouteTranslationForNat,
        gatewayName = gatewayName,
        id = id,
        isRoutingPreferenceInternet = isRoutingPreferenceInternet,
        location = location,
        natRules = natRules,
        resourceGroupName = resourceGroupName,
        tags = tags,
        virtualHub = virtualHub,
        vpnGatewayScaleUnit = vpnGatewayScaleUnit,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy