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

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

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

package com.pulumi.azurenative.network.kotlin

import com.pulumi.azurenative.network.VirtualNetworkArgs.builder
import com.pulumi.azurenative.network.kotlin.inputs.AddressSpaceArgs
import com.pulumi.azurenative.network.kotlin.inputs.AddressSpaceArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.DhcpOptionsArgs
import com.pulumi.azurenative.network.kotlin.inputs.DhcpOptionsArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.network.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.SubnetArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubnetArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.VirtualNetworkBgpCommunitiesArgs
import com.pulumi.azurenative.network.kotlin.inputs.VirtualNetworkBgpCommunitiesArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.VirtualNetworkEncryptionArgs
import com.pulumi.azurenative.network.kotlin.inputs.VirtualNetworkEncryptionArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.VirtualNetworkPeeringArgs
import com.pulumi.azurenative.network.kotlin.inputs.VirtualNetworkPeeringArgsBuilder
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

/**
 * Virtual Network resource.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
 * Other available API versions: 2015-05-01-preview, 2019-06-01, 2019-08-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
 * ## Example Usage
 * ### Create virtual network
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         FlowTimeoutInMinutes = 10,
 *         Location = "eastus",
 *         ResourceGroupName = "rg1",
 *         VirtualNetworkName = "test-vnet",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			FlowTimeoutInMinutes: pulumi.Int(10),
 * 			Location:             pulumi.String("eastus"),
 * 			ResourceGroupName:    pulumi.String("rg1"),
 * 			VirtualNetworkName:   pulumi.String("test-vnet"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .flowTimeoutInMinutes(10)
 *             .location("eastus")
 *             .resourceGroupName("rg1")
 *             .virtualNetworkName("test-vnet")
 *             .build());
 *     }
 * }
 * ```
 * ### Create virtual network with Bgp Communities
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         BgpCommunities = new AzureNative.Network.Inputs.VirtualNetworkBgpCommunitiesArgs
 *         {
 *             VirtualNetworkCommunity = "12076:20000",
 *         },
 *         Location = "eastus",
 *         ResourceGroupName = "rg1",
 *         Subnets = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubnetArgs
 *             {
 *                 AddressPrefix = "10.0.0.0/24",
 *                 Name = "test-1",
 *             },
 *         },
 *         VirtualNetworkName = "test-vnet",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			BgpCommunities: &network.VirtualNetworkBgpCommunitiesArgs{
 * 				VirtualNetworkCommunity: pulumi.String("12076:20000"),
 * 			},
 * 			Location:          pulumi.String("eastus"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Subnets: network.SubnetTypeArray{
 * 				&network.SubnetTypeArgs{
 * 					AddressPrefix: pulumi.String("10.0.0.0/24"),
 * 					Name:          pulumi.String("test-1"),
 * 				},
 * 			},
 * 			VirtualNetworkName: pulumi.String("test-vnet"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * import com.pulumi.azurenative.network.inputs.VirtualNetworkBgpCommunitiesArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .bgpCommunities(VirtualNetworkBgpCommunitiesArgs.builder()
 *                 .virtualNetworkCommunity("12076:20000")
 *                 .build())
 *             .location("eastus")
 *             .resourceGroupName("rg1")
 *             .subnets(SubnetArgs.builder()
 *                 .addressPrefix("10.0.0.0/24")
 *                 .name("test-1")
 *                 .build())
 *             .virtualNetworkName("test-vnet")
 *             .build());
 *     }
 * }
 * ```
 * ### Create virtual network with delegated subnets
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         Location = "westcentralus",
 *         ResourceGroupName = "rg1",
 *         Subnets = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubnetArgs
 *             {
 *                 AddressPrefix = "10.0.0.0/24",
 *                 Delegations = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.DelegationArgs
 *                     {
 *                         Name = "myDelegation",
 *                         ServiceName = "Microsoft.Sql/managedInstances",
 *                     },
 *                 },
 *                 Name = "test-1",
 *             },
 *         },
 *         VirtualNetworkName = "test-vnet",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			Location:          pulumi.String("westcentralus"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Subnets: network.SubnetTypeArray{
 * 				&network.SubnetTypeArgs{
 * 					AddressPrefix: pulumi.String("10.0.0.0/24"),
 * 					Delegations: network.DelegationArray{
 * 						&network.DelegationArgs{
 * 							Name:        pulumi.String("myDelegation"),
 * 							ServiceName: pulumi.String("Microsoft.Sql/managedInstances"),
 * 						},
 * 					},
 * 					Name: pulumi.String("test-1"),
 * 				},
 * 			},
 * 			VirtualNetworkName: pulumi.String("test-vnet"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .location("westcentralus")
 *             .resourceGroupName("rg1")
 *             .subnets(SubnetArgs.builder()
 *                 .addressPrefix("10.0.0.0/24")
 *                 .delegations(DelegationArgs.builder()
 *                     .name("myDelegation")
 *                     .serviceName("Microsoft.Sql/managedInstances")
 *                     .build())
 *                 .name("test-1")
 *                 .build())
 *             .virtualNetworkName("test-vnet")
 *             .build());
 *     }
 * }
 * ```
 * ### Create virtual network with encryption
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         Encryption = new AzureNative.Network.Inputs.VirtualNetworkEncryptionArgs
 *         {
 *             Enabled = true,
 *             Enforcement = AzureNative.Network.VirtualNetworkEncryptionEnforcement.AllowUnencrypted,
 *         },
 *         Location = "eastus",
 *         ResourceGroupName = "rg1",
 *         Subnets = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubnetArgs
 *             {
 *                 AddressPrefix = "10.0.0.0/24",
 *                 Name = "test-1",
 *             },
 *         },
 *         VirtualNetworkName = "test-vnet",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			Encryption: &network.VirtualNetworkEncryptionArgs{
 * 				Enabled:     pulumi.Bool(true),
 * 				Enforcement: pulumi.String(network.VirtualNetworkEncryptionEnforcementAllowUnencrypted),
 * 			},
 * 			Location:          pulumi.String("eastus"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Subnets: network.SubnetTypeArray{
 * 				&network.SubnetTypeArgs{
 * 					AddressPrefix: pulumi.String("10.0.0.0/24"),
 * 					Name:          pulumi.String("test-1"),
 * 				},
 * 			},
 * 			VirtualNetworkName: pulumi.String("test-vnet"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * import com.pulumi.azurenative.network.inputs.VirtualNetworkEncryptionArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .encryption(VirtualNetworkEncryptionArgs.builder()
 *                 .enabled(true)
 *                 .enforcement("AllowUnencrypted")
 *                 .build())
 *             .location("eastus")
 *             .resourceGroupName("rg1")
 *             .subnets(SubnetArgs.builder()
 *                 .addressPrefix("10.0.0.0/24")
 *                 .name("test-1")
 *                 .build())
 *             .virtualNetworkName("test-vnet")
 *             .build());
 *     }
 * }
 * ```
 * ### Create virtual network with service endpoints
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         Location = "eastus",
 *         ResourceGroupName = "vnetTest",
 *         Subnets = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubnetArgs
 *             {
 *                 AddressPrefix = "10.0.0.0/16",
 *                 Name = "test-1",
 *                 ServiceEndpoints = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.ServiceEndpointPropertiesFormatArgs
 *                     {
 *                         Service = "Microsoft.Storage",
 *                     },
 *                 },
 *             },
 *         },
 *         VirtualNetworkName = "vnet1",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			Location:          pulumi.String("eastus"),
 * 			ResourceGroupName: pulumi.String("vnetTest"),
 * 			Subnets: network.SubnetTypeArray{
 * 				&network.SubnetTypeArgs{
 * 					AddressPrefix: pulumi.String("10.0.0.0/16"),
 * 					Name:          pulumi.String("test-1"),
 * 					ServiceEndpoints: network.ServiceEndpointPropertiesFormatArray{
 * 						&network.ServiceEndpointPropertiesFormatArgs{
 * 							Service: pulumi.String("Microsoft.Storage"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 			VirtualNetworkName: pulumi.String("vnet1"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .location("eastus")
 *             .resourceGroupName("vnetTest")
 *             .subnets(SubnetArgs.builder()
 *                 .addressPrefix("10.0.0.0/16")
 *                 .name("test-1")
 *                 .serviceEndpoints(ServiceEndpointPropertiesFormatArgs.builder()
 *                     .service("Microsoft.Storage")
 *                     .build())
 *                 .build())
 *             .virtualNetworkName("vnet1")
 *             .build());
 *     }
 * }
 * ```
 * ### Create virtual network with service endpoints and service endpoint policy
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         Location = "eastus2euap",
 *         ResourceGroupName = "vnetTest",
 *         Subnets = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubnetArgs
 *             {
 *                 AddressPrefix = "10.0.0.0/16",
 *                 Name = "test-1",
 *                 ServiceEndpointPolicies = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.ServiceEndpointPolicyArgs
 *                     {
 *                         Id = "/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1",
 *                     },
 *                 },
 *                 ServiceEndpoints = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.ServiceEndpointPropertiesFormatArgs
 *                     {
 *                         Service = "Microsoft.Storage",
 *                     },
 *                 },
 *             },
 *         },
 *         VirtualNetworkName = "vnet1",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			Location:          pulumi.String("eastus2euap"),
 * 			ResourceGroupName: pulumi.String("vnetTest"),
 * 			Subnets: network.SubnetTypeArray{
 * 				&network.SubnetTypeArgs{
 * 					AddressPrefix: pulumi.String("10.0.0.0/16"),
 * 					Name:          pulumi.String("test-1"),
 * 					ServiceEndpointPolicies: network.ServiceEndpointPolicyTypeArray{
 * 						&network.ServiceEndpointPolicyTypeArgs{
 * 							Id: pulumi.String("/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1"),
 * 						},
 * 					},
 * 					ServiceEndpoints: network.ServiceEndpointPropertiesFormatArray{
 * 						&network.ServiceEndpointPropertiesFormatArgs{
 * 							Service: pulumi.String("Microsoft.Storage"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 			VirtualNetworkName: pulumi.String("vnet1"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .location("eastus2euap")
 *             .resourceGroupName("vnetTest")
 *             .subnets(SubnetArgs.builder()
 *                 .addressPrefix("10.0.0.0/16")
 *                 .name("test-1")
 *                 .serviceEndpointPolicies(ServiceEndpointPolicyArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1")
 *                     .build())
 *                 .serviceEndpoints(ServiceEndpointPropertiesFormatArgs.builder()
 *                     .service("Microsoft.Storage")
 *                     .build())
 *                 .build())
 *             .virtualNetworkName("vnet1")
 *             .build());
 *     }
 * }
 * ```
 * ### Create virtual network with subnet
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         Location = "eastus",
 *         ResourceGroupName = "rg1",
 *         Subnets = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubnetArgs
 *             {
 *                 AddressPrefix = "10.0.0.0/24",
 *                 Name = "test-1",
 *             },
 *         },
 *         VirtualNetworkName = "test-vnet",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			Location:          pulumi.String("eastus"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Subnets: network.SubnetTypeArray{
 * 				&network.SubnetTypeArgs{
 * 					AddressPrefix: pulumi.String("10.0.0.0/24"),
 * 					Name:          pulumi.String("test-1"),
 * 				},
 * 			},
 * 			VirtualNetworkName: pulumi.String("test-vnet"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .location("eastus")
 *             .resourceGroupName("rg1")
 *             .subnets(SubnetArgs.builder()
 *                 .addressPrefix("10.0.0.0/24")
 *                 .name("test-1")
 *                 .build())
 *             .virtualNetworkName("test-vnet")
 *             .build());
 *     }
 * }
 * ```
 * ### Create virtual network with subnet containing address prefixes
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetwork = new AzureNative.Network.VirtualNetwork("virtualNetwork", new()
 *     {
 *         AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.0.0.0/16",
 *             },
 *         },
 *         Location = "eastus",
 *         ResourceGroupName = "rg1",
 *         Subnets = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubnetArgs
 *             {
 *                 AddressPrefixes = new[]
 *                 {
 *                     "10.0.0.0/28",
 *                     "10.0.1.0/28",
 *                 },
 *                 Name = "test-2",
 *             },
 *         },
 *         VirtualNetworkName = "test-vnet",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetwork(ctx, "virtualNetwork", &network.VirtualNetworkArgs{
 * 			AddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/16"),
 * 				},
 * 			},
 * 			Location:          pulumi.String("eastus"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Subnets: network.SubnetTypeArray{
 * 				&network.SubnetTypeArgs{
 * 					AddressPrefixes: pulumi.StringArray{
 * 						pulumi.String("10.0.0.0/28"),
 * 						pulumi.String("10.0.1.0/28"),
 * 					},
 * 					Name: pulumi.String("test-2"),
 * 				},
 * 			},
 * 			VirtualNetworkName: pulumi.String("test-vnet"),
 * 		})
 * 		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.VirtualNetwork;
 * import com.pulumi.azurenative.network.VirtualNetworkArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * import com.pulumi.azurenative.network.inputs.SubnetArgs;
 * 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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
 *             .addressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.0.0.0/16")
 *                 .build())
 *             .location("eastus")
 *             .resourceGroupName("rg1")
 *             .subnets(SubnetArgs.builder()
 *                 .addressPrefixes(
 *                     "10.0.0.0/28",
 *                     "10.0.1.0/28")
 *                 .name("test-2")
 *                 .build())
 *             .virtualNetworkName("test-vnet")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:VirtualNetwork test-vnet /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}
 * ```
 * @property addressSpace The AddressSpace that contains an array of IP address ranges that can be used by subnets.
 * @property bgpCommunities Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
 * @property ddosProtectionPlan The DDoS protection plan associated with the virtual network.
 * @property dhcpOptions The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
 * @property enableDdosProtection Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
 * @property enableVmProtection Indicates if VM protection is enabled for all the subnets in the virtual network.
 * @property encryption Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet.
 * @property extendedLocation The extended location of the virtual network.
 * @property flowTimeoutInMinutes The FlowTimeout value (in minutes) for the Virtual Network
 * @property id Resource ID.
 * @property ipAllocations Array of IpAllocation which reference this VNET.
 * @property location Resource location.
 * @property resourceGroupName The name of the resource group.
 * @property subnets A list of subnets in a Virtual Network.
 * 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 tags Resource tags.
 * @property virtualNetworkName The name of the virtual network.
 * @property virtualNetworkPeerings A list of peerings in a Virtual Network.
 * 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.
 */
public data class VirtualNetworkArgs(
    public val addressSpace: Output? = null,
    public val bgpCommunities: Output? = null,
    public val ddosProtectionPlan: Output? = null,
    public val dhcpOptions: Output? = null,
    public val enableDdosProtection: Output? = null,
    public val enableVmProtection: Output? = null,
    public val encryption: Output? = null,
    public val extendedLocation: Output? = null,
    public val flowTimeoutInMinutes: Output? = null,
    public val id: Output? = null,
    public val ipAllocations: Output>? = null,
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val subnets: Output>? = null,
    public val tags: Output>? = null,
    public val virtualNetworkName: Output? = null,
    public val virtualNetworkPeerings: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.VirtualNetworkArgs =
        com.pulumi.azurenative.network.VirtualNetworkArgs.builder()
            .addressSpace(addressSpace?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .bgpCommunities(bgpCommunities?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ddosProtectionPlan(
                ddosProtectionPlan?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .dhcpOptions(dhcpOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enableDdosProtection(enableDdosProtection?.applyValue({ args0 -> args0 }))
            .enableVmProtection(enableVmProtection?.applyValue({ args0 -> args0 }))
            .encryption(encryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .flowTimeoutInMinutes(flowTimeoutInMinutes?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .ipAllocations(
                ipAllocations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .subnets(
                subnets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .virtualNetworkName(virtualNetworkName?.applyValue({ args0 -> args0 }))
            .virtualNetworkPeerings(
                virtualNetworkPeerings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [VirtualNetworkArgs].
 */
@PulumiTagMarker
public class VirtualNetworkArgsBuilder internal constructor() {
    private var addressSpace: Output? = null

    private var bgpCommunities: Output? = null

    private var ddosProtectionPlan: Output? = null

    private var dhcpOptions: Output? = null

    private var enableDdosProtection: Output? = null

    private var enableVmProtection: Output? = null

    private var encryption: Output? = null

    private var extendedLocation: Output? = null

    private var flowTimeoutInMinutes: Output? = null

    private var id: Output? = null

    private var ipAllocations: Output>? = null

    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var subnets: Output>? = null

    private var tags: Output>? = null

    private var virtualNetworkName: Output? = null

    private var virtualNetworkPeerings: Output>? = null

    /**
     * @param value The AddressSpace that contains an array of IP address ranges that can be used by subnets.
     */
    @JvmName("bnlqkflhgyumcsck")
    public suspend fun addressSpace(`value`: Output) {
        this.addressSpace = value
    }

    /**
     * @param value Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
     */
    @JvmName("rencmyjtfiglvfkl")
    public suspend fun bgpCommunities(`value`: Output) {
        this.bgpCommunities = value
    }

    /**
     * @param value The DDoS protection plan associated with the virtual network.
     */
    @JvmName("ottrpumpbusdnrov")
    public suspend fun ddosProtectionPlan(`value`: Output) {
        this.ddosProtectionPlan = value
    }

    /**
     * @param value The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
     */
    @JvmName("ddjwuhibbherpucg")
    public suspend fun dhcpOptions(`value`: Output) {
        this.dhcpOptions = value
    }

    /**
     * @param value Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
     */
    @JvmName("vsdrsndxwbwjhpad")
    public suspend fun enableDdosProtection(`value`: Output) {
        this.enableDdosProtection = value
    }

    /**
     * @param value Indicates if VM protection is enabled for all the subnets in the virtual network.
     */
    @JvmName("lrhrxptitpjtvntx")
    public suspend fun enableVmProtection(`value`: Output) {
        this.enableVmProtection = value
    }

    /**
     * @param value Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet.
     */
    @JvmName("xmewhdgbnvxmavwa")
    public suspend fun encryption(`value`: Output) {
        this.encryption = value
    }

    /**
     * @param value The extended location of the virtual network.
     */
    @JvmName("vrwtebujcbkswyva")
    public suspend fun extendedLocation(`value`: Output) {
        this.extendedLocation = value
    }

    /**
     * @param value The FlowTimeout value (in minutes) for the Virtual Network
     */
    @JvmName("eloouahahqinaopi")
    public suspend fun flowTimeoutInMinutes(`value`: Output) {
        this.flowTimeoutInMinutes = value
    }

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

    /**
     * @param value Array of IpAllocation which reference this VNET.
     */
    @JvmName("xsdlpepilcwxtspw")
    public suspend fun ipAllocations(`value`: Output>) {
        this.ipAllocations = value
    }

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

    /**
     * @param values Array of IpAllocation which reference this VNET.
     */
    @JvmName("xeoytdjryickgntp")
    public suspend fun ipAllocations(values: List>) {
        this.ipAllocations = Output.all(values)
    }

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

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

    /**
     * @param value A list of subnets in a Virtual Network.
     * 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("oytamdrukvshnydl")
    public suspend fun subnets(`value`: Output>) {
        this.subnets = value
    }

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

    /**
     * @param values A list of subnets in a Virtual Network.
     * 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("anvlnoueddbisfgn")
    public suspend fun subnets(values: List>) {
        this.subnets = Output.all(values)
    }

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

    /**
     * @param value The name of the virtual network.
     */
    @JvmName("eonnvliccrnreoas")
    public suspend fun virtualNetworkName(`value`: Output) {
        this.virtualNetworkName = value
    }

    /**
     * @param value A list of peerings in a Virtual Network.
     * 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("tkgkgawxbrpfamfa")
    public suspend fun virtualNetworkPeerings(`value`: Output>) {
        this.virtualNetworkPeerings = value
    }

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

    /**
     * @param values A list of peerings in a Virtual Network.
     * 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("pmelxrubcquojgst")
    public suspend fun virtualNetworkPeerings(values: List>) {
        this.virtualNetworkPeerings = Output.all(values)
    }

    /**
     * @param value The AddressSpace that contains an array of IP address ranges that can be used by subnets.
     */
    @JvmName("hrmvbugmdhbmrxpl")
    public suspend fun addressSpace(`value`: AddressSpaceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addressSpace = mapped
    }

    /**
     * @param argument The AddressSpace that contains an array of IP address ranges that can be used by subnets.
     */
    @JvmName("jdrwjjuttqudhagt")
    public suspend fun addressSpace(argument: suspend AddressSpaceArgsBuilder.() -> Unit) {
        val toBeMapped = AddressSpaceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.addressSpace = mapped
    }

    /**
     * @param value Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
     */
    @JvmName("uxbkiqhaikloyfyn")
    public suspend fun bgpCommunities(`value`: VirtualNetworkBgpCommunitiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bgpCommunities = mapped
    }

    /**
     * @param argument Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
     */
    @JvmName("rvnevfhpysdqkrhf")
    public suspend fun bgpCommunities(argument: suspend VirtualNetworkBgpCommunitiesArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualNetworkBgpCommunitiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.bgpCommunities = mapped
    }

    /**
     * @param value The DDoS protection plan associated with the virtual network.
     */
    @JvmName("amatqbdirxqibhyb")
    public suspend fun ddosProtectionPlan(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ddosProtectionPlan = mapped
    }

    /**
     * @param argument The DDoS protection plan associated with the virtual network.
     */
    @JvmName("mdhkyeqfvgntqfid")
    public suspend fun ddosProtectionPlan(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ddosProtectionPlan = mapped
    }

    /**
     * @param value The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
     */
    @JvmName("vkddhrvwrstmdcst")
    public suspend fun dhcpOptions(`value`: DhcpOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dhcpOptions = mapped
    }

    /**
     * @param argument The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
     */
    @JvmName("uolyjtevouluooby")
    public suspend fun dhcpOptions(argument: suspend DhcpOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = DhcpOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dhcpOptions = mapped
    }

    /**
     * @param value Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
     */
    @JvmName("obbflbsjidcmurfp")
    public suspend fun enableDdosProtection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableDdosProtection = mapped
    }

    /**
     * @param value Indicates if VM protection is enabled for all the subnets in the virtual network.
     */
    @JvmName("mpbhxivssjsofcsm")
    public suspend fun enableVmProtection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableVmProtection = mapped
    }

    /**
     * @param value Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet.
     */
    @JvmName("fohvwvqeiqklvutk")
    public suspend fun encryption(`value`: VirtualNetworkEncryptionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryption = mapped
    }

    /**
     * @param argument Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet.
     */
    @JvmName("hdamecxjtligkpgl")
    public suspend fun encryption(argument: suspend VirtualNetworkEncryptionArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualNetworkEncryptionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.encryption = mapped
    }

    /**
     * @param value The extended location of the virtual network.
     */
    @JvmName("svkmnbsmuoxstljp")
    public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedLocation = mapped
    }

    /**
     * @param argument The extended location of the virtual network.
     */
    @JvmName("sxuuogbjioocdlln")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value The FlowTimeout value (in minutes) for the Virtual Network
     */
    @JvmName("ojdnbmcjbwcpdyow")
    public suspend fun flowTimeoutInMinutes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.flowTimeoutInMinutes = mapped
    }

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

    /**
     * @param value Array of IpAllocation which reference this VNET.
     */
    @JvmName("vsixpgnnpivqufwl")
    public suspend fun ipAllocations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipAllocations = mapped
    }

    /**
     * @param argument Array of IpAllocation which reference this VNET.
     */
    @JvmName("mhxhytulwfyaumvu")
    public suspend fun ipAllocations(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipAllocations = mapped
    }

    /**
     * @param argument Array of IpAllocation which reference this VNET.
     */
    @JvmName("jfmrbjbocrtbchwk")
    public suspend fun ipAllocations(vararg argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipAllocations = mapped
    }

    /**
     * @param argument Array of IpAllocation which reference this VNET.
     */
    @JvmName("qraiqfmfkvhreilv")
    public suspend fun ipAllocations(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SubResourceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipAllocations = mapped
    }

    /**
     * @param values Array of IpAllocation which reference this VNET.
     */
    @JvmName("psnqwpxjbyfxfolx")
    public suspend fun ipAllocations(vararg values: SubResourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipAllocations = mapped
    }

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

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

    /**
     * @param value A list of subnets in a Virtual Network.
     * 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("epuxnvhadlfafuto")
    public suspend fun subnets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    /**
     * @param argument A list of subnets in a Virtual Network.
     * 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("uussumujmggmnidg")
    public suspend fun subnets(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SubnetArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.subnets = mapped
    }

    /**
     * @param argument A list of subnets in a Virtual Network.
     * 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("oppuboasvppticat")
    public suspend fun subnets(vararg argument: suspend SubnetArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SubnetArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.subnets = mapped
    }

    /**
     * @param argument A list of subnets in a Virtual Network.
     * 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("rtjbnqfyyablxveu")
    public suspend fun subnets(argument: suspend SubnetArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SubnetArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.subnets = mapped
    }

    /**
     * @param values A list of subnets in a Virtual Network.
     * 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("wwuefjpyiesyjiqu")
    public suspend fun subnets(vararg values: SubnetArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

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

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

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

    /**
     * @param value A list of peerings in a Virtual Network.
     * 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("mkcknwovydbdxoxx")
    public suspend fun virtualNetworkPeerings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworkPeerings = mapped
    }

    /**
     * @param argument A list of peerings in a Virtual Network.
     * 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("jcmiijjhmbvyyrqk")
    public suspend fun virtualNetworkPeerings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VirtualNetworkPeeringArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkPeerings = mapped
    }

    /**
     * @param argument A list of peerings in a Virtual Network.
     * 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("mntwjcsygvahbbjf")
    public suspend fun virtualNetworkPeerings(vararg argument: suspend VirtualNetworkPeeringArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VirtualNetworkPeeringArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkPeerings = mapped
    }

    /**
     * @param argument A list of peerings in a Virtual Network.
     * 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("nvbgrtwmthagsxuh")
    public suspend fun virtualNetworkPeerings(argument: suspend VirtualNetworkPeeringArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VirtualNetworkPeeringArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.virtualNetworkPeerings = mapped
    }

    /**
     * @param values A list of peerings in a Virtual Network.
     * 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("lkniommsnoyccknq")
    public suspend fun virtualNetworkPeerings(vararg values: VirtualNetworkPeeringArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.virtualNetworkPeerings = mapped
    }

    internal fun build(): VirtualNetworkArgs = VirtualNetworkArgs(
        addressSpace = addressSpace,
        bgpCommunities = bgpCommunities,
        ddosProtectionPlan = ddosProtectionPlan,
        dhcpOptions = dhcpOptions,
        enableDdosProtection = enableDdosProtection,
        enableVmProtection = enableVmProtection,
        encryption = encryption,
        extendedLocation = extendedLocation,
        flowTimeoutInMinutes = flowTimeoutInMinutes,
        id = id,
        ipAllocations = ipAllocations,
        location = location,
        resourceGroupName = resourceGroupName,
        subnets = subnets,
        tags = tags,
        virtualNetworkName = virtualNetworkName,
        virtualNetworkPeerings = virtualNetworkPeerings,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy