diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityPerimeterCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityPerimeterCollection.cs
new file mode 100644
index 000000000000..e8fa0b191fb8
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityPerimeterCollection.cs
@@ -0,0 +1,192 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NetworkSecurityPerimeterCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_PutNetworkSecurityPerimeter()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterPut.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this NetworkSecurityPerimeterResource
+ NetworkSecurityPerimeterCollection collection = resourceGroupResource.GetNetworkSecurityPerimeters();
+
+ // invoke the operation
+ string networkSecurityPerimeterName = "nsp1";
+ NetworkSecurityPerimeterData data = new NetworkSecurityPerimeterData(default);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkSecurityPerimeterName, data);
+ NetworkSecurityPerimeterResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NetworkSecurityPerimeterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NetworkSecurityPerimeterGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this NetworkSecurityPerimeterResource
+ NetworkSecurityPerimeterCollection collection = resourceGroupResource.GetNetworkSecurityPerimeters();
+
+ // invoke the operation
+ string networkSecurityPerimeterName = "nsp1";
+ NetworkSecurityPerimeterResource result = await collection.GetAsync(networkSecurityPerimeterName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NetworkSecurityPerimeterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_ListNetworkSecurityPerimeter()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterList.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this NetworkSecurityPerimeterResource
+ NetworkSecurityPerimeterCollection collection = resourceGroupResource.GetNetworkSecurityPerimeters();
+
+ // invoke the operation and iterate over the result
+ await foreach (NetworkSecurityPerimeterResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NetworkSecurityPerimeterData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NetworkSecurityPerimeterGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this NetworkSecurityPerimeterResource
+ NetworkSecurityPerimeterCollection collection = resourceGroupResource.GetNetworkSecurityPerimeters();
+
+ // invoke the operation
+ string networkSecurityPerimeterName = "nsp1";
+ bool result = await collection.ExistsAsync(networkSecurityPerimeterName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NetworkSecurityPerimeterGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this NetworkSecurityPerimeterResource
+ NetworkSecurityPerimeterCollection collection = resourceGroupResource.GetNetworkSecurityPerimeters();
+
+ // invoke the operation
+ string networkSecurityPerimeterName = "nsp1";
+ NullableResponse response = await collection.GetIfExistsAsync(networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NetworkSecurityPerimeterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityPerimeterResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityPerimeterResource.cs
new file mode 100644
index 000000000000..afe19708173a
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityPerimeterResource.cs
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Network.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NetworkSecurityPerimeterResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NetworkSecurityPerimeterGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterGet.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // invoke the operation
+ NetworkSecurityPerimeterResource result = await networkSecurityPerimeter.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NetworkSecurityPerimeterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_NetworkSecurityPerimeterDelete()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterDelete.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "testNSP1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // invoke the operation
+ await networkSecurityPerimeter.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_PatchNetworkSecurityPerimeter()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterPatch.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_Patch" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // invoke the operation
+ NetworkSecurityPerimeterPatch patch = new NetworkSecurityPerimeterPatch
+ {
+ Tags =
+{
+["description"] = "nsp1"
+},
+ };
+ NetworkSecurityPerimeterResource result = await networkSecurityPerimeter.UpdateAsync(patch);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NetworkSecurityPerimeterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAccessRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAccessRuleCollection.cs
new file mode 100644
index 000000000000..35e81b4eb6e4
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAccessRuleCollection.cs
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Network.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspAccessRuleCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_NspAccessRulePut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRulePut.json
+ // this example is just showing the usage of "NspAccessRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // get the collection of this NspAccessRuleResource
+ NspAccessRuleCollection collection = nspProfile.GetNspAccessRules();
+
+ // invoke the operation
+ string accessRuleName = "accessRule1";
+ NspAccessRuleData data = new NspAccessRuleData(default)
+ {
+ Direction = AccessRuleDirection.Inbound,
+ AddressPrefixes = { "10.11.0.0/16", "10.10.1.0/24" },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accessRuleName, data);
+ NspAccessRuleResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAccessRuleData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspAccessRuleGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json
+ // this example is just showing the usage of "NspAccessRules_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // get the collection of this NspAccessRuleResource
+ NspAccessRuleCollection collection = nspProfile.GetNspAccessRules();
+
+ // invoke the operation
+ string accessRuleName = "accessRule1";
+ NspAccessRuleResource result = await collection.GetAsync(accessRuleName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAccessRuleData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_NspAccessRulesList()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleList.json
+ // this example is just showing the usage of "NspAccessRules_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // get the collection of this NspAccessRuleResource
+ NspAccessRuleCollection collection = nspProfile.GetNspAccessRules();
+
+ // invoke the operation and iterate over the result
+ await foreach (NspAccessRuleResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAccessRuleData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NspAccessRuleGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json
+ // this example is just showing the usage of "NspAccessRules_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // get the collection of this NspAccessRuleResource
+ NspAccessRuleCollection collection = nspProfile.GetNspAccessRules();
+
+ // invoke the operation
+ string accessRuleName = "accessRule1";
+ bool result = await collection.ExistsAsync(accessRuleName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NspAccessRuleGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json
+ // this example is just showing the usage of "NspAccessRules_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // get the collection of this NspAccessRuleResource
+ NspAccessRuleCollection collection = nspProfile.GetNspAccessRules();
+
+ // invoke the operation
+ string accessRuleName = "accessRule1";
+ NullableResponse response = await collection.GetIfExistsAsync(accessRuleName);
+ NspAccessRuleResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAccessRuleData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAccessRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAccessRuleResource.cs
new file mode 100644
index 000000000000..7db0cebc83a8
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAccessRuleResource.cs
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Network.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspAccessRuleResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspAccessRuleGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleGet.json
+ // this example is just showing the usage of "NspAccessRules_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAccessRuleResource created on azure
+ // for more information of creating NspAccessRuleResource, please refer to the document of NspAccessRuleResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ string accessRuleName = "accessRule1";
+ ResourceIdentifier nspAccessRuleResourceId = NspAccessRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName, accessRuleName);
+ NspAccessRuleResource nspAccessRule = client.GetNspAccessRuleResource(nspAccessRuleResourceId);
+
+ // invoke the operation
+ NspAccessRuleResource result = await nspAccessRule.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAccessRuleData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_NspAccessRulesDelete()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleDelete.json
+ // this example is just showing the usage of "NspAccessRules_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAccessRuleResource created on azure
+ // for more information of creating NspAccessRuleResource, please refer to the document of NspAccessRuleResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ string accessRuleName = "accessRule1";
+ ResourceIdentifier nspAccessRuleResourceId = NspAccessRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName, accessRuleName);
+ NspAccessRuleResource nspAccessRule = client.GetNspAccessRuleResource(nspAccessRuleResourceId);
+
+ // invoke the operation
+ await nspAccessRule.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_NspAccessRulePut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRulePut.json
+ // this example is just showing the usage of "NspAccessRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAccessRuleResource created on azure
+ // for more information of creating NspAccessRuleResource, please refer to the document of NspAccessRuleResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ string accessRuleName = "accessRule1";
+ ResourceIdentifier nspAccessRuleResourceId = NspAccessRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName, accessRuleName);
+ NspAccessRuleResource nspAccessRule = client.GetNspAccessRuleResource(nspAccessRuleResourceId);
+
+ // invoke the operation
+ NspAccessRuleData data = new NspAccessRuleData(default)
+ {
+ Direction = AccessRuleDirection.Inbound,
+ AddressPrefixes = { "10.11.0.0/16", "10.10.1.0/24" },
+ };
+ ArmOperation lro = await nspAccessRule.UpdateAsync(WaitUntil.Completed, data);
+ NspAccessRuleResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAccessRuleData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task PostNspAccessRulesReconcile_NspAccessRuleReconcile()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAccessRuleReconcile.json
+ // this example is just showing the usage of "NspAccessRulesReconcile_Post" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAccessRuleResource created on azure
+ // for more information of creating NspAccessRuleResource, please refer to the document of NspAccessRuleResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ string accessRuleName = "accessRuleName1";
+ ResourceIdentifier nspAccessRuleResourceId = NspAccessRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName, accessRuleName);
+ NspAccessRuleResource nspAccessRule = client.GetNspAccessRuleResource(nspAccessRuleResourceId);
+
+ // invoke the operation
+ BinaryData unknown = BinaryData.FromObjectAsJson(new
+ {
+ properties = new object(),
+ });
+ BinaryData result = await nspAccessRule.PostNspAccessRulesReconcileAsync(unknown);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAssociationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAssociationCollection.cs
new file mode 100644
index 000000000000..20fdc00c5675
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAssociationCollection.cs
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Network.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspAssociationCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_NspAssociationPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationPut.json
+ // this example is just showing the usage of "NspAssociations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspAssociationResource
+ NspAssociationCollection collection = networkSecurityPerimeter.GetNspAssociations();
+
+ // invoke the operation
+ string associationName = "association1";
+ NspAssociationData data = new NspAssociationData(default)
+ {
+ PrivateLinkResourceId = new ResourceIdentifier("/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"),
+ ProfileId = new ResourceIdentifier("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"),
+ AccessMode = AssociationAccessMode.Enforced,
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, associationName, data);
+ NspAssociationResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAssociationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspAssociationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json
+ // this example is just showing the usage of "NspAssociations_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspAssociationResource
+ NspAssociationCollection collection = networkSecurityPerimeter.GetNspAssociations();
+
+ // invoke the operation
+ string associationName = "association1";
+ NspAssociationResource result = await collection.GetAsync(associationName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAssociationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_NspAssociationList()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationList.json
+ // this example is just showing the usage of "NspAssociations_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspAssociationResource
+ NspAssociationCollection collection = networkSecurityPerimeter.GetNspAssociations();
+
+ // invoke the operation and iterate over the result
+ await foreach (NspAssociationResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAssociationData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NspAssociationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json
+ // this example is just showing the usage of "NspAssociations_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspAssociationResource
+ NspAssociationCollection collection = networkSecurityPerimeter.GetNspAssociations();
+
+ // invoke the operation
+ string associationName = "association1";
+ bool result = await collection.ExistsAsync(associationName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NspAssociationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json
+ // this example is just showing the usage of "NspAssociations_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspAssociationResource
+ NspAssociationCollection collection = networkSecurityPerimeter.GetNspAssociations();
+
+ // invoke the operation
+ string associationName = "association1";
+ NullableResponse response = await collection.GetIfExistsAsync(associationName);
+ NspAssociationResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAssociationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAssociationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAssociationResource.cs
new file mode 100644
index 000000000000..9cadf373ff4f
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspAssociationResource.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Network.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspAssociationResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspAssociationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationGet.json
+ // this example is just showing the usage of "NspAssociations_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAssociationResource created on azure
+ // for more information of creating NspAssociationResource, please refer to the document of NspAssociationResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string associationName = "association1";
+ ResourceIdentifier nspAssociationResourceId = NspAssociationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, associationName);
+ NspAssociationResource nspAssociation = client.GetNspAssociationResource(nspAssociationResourceId);
+
+ // invoke the operation
+ NspAssociationResource result = await nspAssociation.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAssociationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_NspAssociationDelete()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationDelete.json
+ // this example is just showing the usage of "NspAssociations_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAssociationResource created on azure
+ // for more information of creating NspAssociationResource, please refer to the document of NspAssociationResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string associationName = "association1";
+ ResourceIdentifier nspAssociationResourceId = NspAssociationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, associationName);
+ NspAssociationResource nspAssociation = client.GetNspAssociationResource(nspAssociationResourceId);
+
+ // invoke the operation
+ await nspAssociation.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_NspAssociationPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationPut.json
+ // this example is just showing the usage of "NspAssociations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAssociationResource created on azure
+ // for more information of creating NspAssociationResource, please refer to the document of NspAssociationResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string associationName = "association1";
+ ResourceIdentifier nspAssociationResourceId = NspAssociationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, associationName);
+ NspAssociationResource nspAssociation = client.GetNspAssociationResource(nspAssociationResourceId);
+
+ // invoke the operation
+ NspAssociationData data = new NspAssociationData(default)
+ {
+ PrivateLinkResourceId = new ResourceIdentifier("/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"),
+ ProfileId = new ResourceIdentifier("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"),
+ AccessMode = AssociationAccessMode.Enforced,
+ };
+ ArmOperation lro = await nspAssociation.UpdateAsync(WaitUntil.Completed, data);
+ NspAssociationResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspAssociationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task PostNspAssociationReconcile_NspAssociationReconcile()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspAssociationReconcile.json
+ // this example is just showing the usage of "NspAssociationReconcile_Post" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspAssociationResource created on azure
+ // for more information of creating NspAssociationResource, please refer to the document of NspAssociationResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string associationName = "association1";
+ ResourceIdentifier nspAssociationResourceId = NspAssociationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, associationName);
+ NspAssociationResource nspAssociation = client.GetNspAssociationResource(nspAssociationResourceId);
+
+ // invoke the operation
+ BinaryData unknown = BinaryData.FromObjectAsJson(new
+ {
+ properties = new object(),
+ });
+ BinaryData result = await nspAssociation.PostNspAssociationReconcileAsync(unknown);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkCollection.cs
new file mode 100644
index 000000000000..c3cfe8cd5537
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkCollection.cs
@@ -0,0 +1,201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspLinkCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_NspLinksPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkPut.json
+ // this example is just showing the usage of "NspLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkResource
+ NspLinkCollection collection = networkSecurityPerimeter.GetNspLinks();
+
+ // invoke the operation
+ string linkName = "link1";
+ NspLinkData data = new NspLinkData
+ {
+ AutoApprovedRemotePerimeterResourceId = "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2",
+ LocalInboundProfiles = { "*" },
+ RemoteInboundProfiles = { "*" },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkName, data);
+ NspLinkResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspLinksGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json
+ // this example is just showing the usage of "NspLinks_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkResource
+ NspLinkCollection collection = networkSecurityPerimeter.GetNspLinks();
+
+ // invoke the operation
+ string linkName = "link1";
+ NspLinkResource result = await collection.GetAsync(linkName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_NspLinkList()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkList.json
+ // this example is just showing the usage of "NspLinks_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkResource
+ NspLinkCollection collection = networkSecurityPerimeter.GetNspLinks();
+
+ // invoke the operation and iterate over the result
+ await foreach (NspLinkResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NspLinksGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json
+ // this example is just showing the usage of "NspLinks_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkResource
+ NspLinkCollection collection = networkSecurityPerimeter.GetNspLinks();
+
+ // invoke the operation
+ string linkName = "link1";
+ bool result = await collection.ExistsAsync(linkName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NspLinksGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json
+ // this example is just showing the usage of "NspLinks_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkResource
+ NspLinkCollection collection = networkSecurityPerimeter.GetNspLinks();
+
+ // invoke the operation
+ string linkName = "link1";
+ NullableResponse response = await collection.GetIfExistsAsync(linkName);
+ NspLinkResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkReferenceCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkReferenceCollection.cs
new file mode 100644
index 000000000000..46e85c7f475e
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkReferenceCollection.cs
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspLinkReferenceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspLinkReferencesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json
+ // this example is just showing the usage of "NspLinkReferences_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp2";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkReferenceResource
+ NspLinkReferenceCollection collection = networkSecurityPerimeter.GetNspLinkReferences();
+
+ // invoke the operation
+ string linkReferenceName = "link1-guid";
+ NspLinkReferenceResource result = await collection.GetAsync(linkReferenceName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkReferenceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_NspLinkReferenceList()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceList.json
+ // this example is just showing the usage of "NspLinkReferences_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp2";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkReferenceResource
+ NspLinkReferenceCollection collection = networkSecurityPerimeter.GetNspLinkReferences();
+
+ // invoke the operation and iterate over the result
+ await foreach (NspLinkReferenceResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkReferenceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NspLinkReferencesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json
+ // this example is just showing the usage of "NspLinkReferences_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp2";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkReferenceResource
+ NspLinkReferenceCollection collection = networkSecurityPerimeter.GetNspLinkReferences();
+
+ // invoke the operation
+ string linkReferenceName = "link1-guid";
+ bool result = await collection.ExistsAsync(linkReferenceName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NspLinkReferencesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json
+ // this example is just showing the usage of "NspLinkReferences_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp2";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLinkReferenceResource
+ NspLinkReferenceCollection collection = networkSecurityPerimeter.GetNspLinkReferences();
+
+ // invoke the operation
+ string linkReferenceName = "link1-guid";
+ NullableResponse response = await collection.GetIfExistsAsync(linkReferenceName);
+ NspLinkReferenceResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkReferenceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkReferenceResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkReferenceResource.cs
new file mode 100644
index 000000000000..5b6a8e05153c
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkReferenceResource.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspLinkReferenceResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspLinkReferencesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceGet.json
+ // this example is just showing the usage of "NspLinkReferences_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLinkReferenceResource created on azure
+ // for more information of creating NspLinkReferenceResource, please refer to the document of NspLinkReferenceResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp2";
+ string linkReferenceName = "link1-guid";
+ ResourceIdentifier nspLinkReferenceResourceId = NspLinkReferenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, linkReferenceName);
+ NspLinkReferenceResource nspLinkReference = client.GetNspLinkReferenceResource(nspLinkReferenceResourceId);
+
+ // invoke the operation
+ NspLinkReferenceResource result = await nspLinkReference.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkReferenceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_NspLinkReferenceDelete()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkReferenceDelete.json
+ // this example is just showing the usage of "NspLinkReferences_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLinkReferenceResource created on azure
+ // for more information of creating NspLinkReferenceResource, please refer to the document of NspLinkReferenceResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp2";
+ string linkReferenceName = "link1-guid";
+ ResourceIdentifier nspLinkReferenceResourceId = NspLinkReferenceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, linkReferenceName);
+ NspLinkReferenceResource nspLinkReference = client.GetNspLinkReferenceResource(nspLinkReferenceResourceId);
+
+ // invoke the operation
+ await nspLinkReference.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkResource.cs
new file mode 100644
index 000000000000..38c68c4b0839
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLinkResource.cs
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspLinkResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspLinksGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkGet.json
+ // this example is just showing the usage of "NspLinks_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLinkResource created on azure
+ // for more information of creating NspLinkResource, please refer to the document of NspLinkResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string linkName = "link1";
+ ResourceIdentifier nspLinkResourceId = NspLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, linkName);
+ NspLinkResource nspLink = client.GetNspLinkResource(nspLinkResourceId);
+
+ // invoke the operation
+ NspLinkResource result = await nspLink.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_NspLinkDelete()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkDelete.json
+ // this example is just showing the usage of "NspLinks_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLinkResource created on azure
+ // for more information of creating NspLinkResource, please refer to the document of NspLinkResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string linkName = "link1";
+ ResourceIdentifier nspLinkResourceId = NspLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, linkName);
+ NspLinkResource nspLink = client.GetNspLinkResource(nspLinkResourceId);
+
+ // invoke the operation
+ await nspLink.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_NspLinksPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLinkPut.json
+ // this example is just showing the usage of "NspLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLinkResource created on azure
+ // for more information of creating NspLinkResource, please refer to the document of NspLinkResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string linkName = "link1";
+ ResourceIdentifier nspLinkResourceId = NspLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, linkName);
+ NspLinkResource nspLink = client.GetNspLinkResource(nspLinkResourceId);
+
+ // invoke the operation
+ NspLinkData data = new NspLinkData
+ {
+ AutoApprovedRemotePerimeterResourceId = "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp2",
+ LocalInboundProfiles = { "*" },
+ RemoteInboundProfiles = { "*" },
+ };
+ ArmOperation lro = await nspLink.UpdateAsync(WaitUntil.Completed, data);
+ NspLinkResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLoggingConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLoggingConfigurationCollection.cs
new file mode 100644
index 000000000000..ba091336364f
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLoggingConfigurationCollection.cs
@@ -0,0 +1,203 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Network.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspLoggingConfigurationCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_NspLoggingConfigurationPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationPut.json
+ // this example is just showing the usage of "NspLoggingConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLoggingConfigurationResource
+ NspLoggingConfigurationCollection collection = networkSecurityPerimeter.GetNspLoggingConfigurations();
+
+ // invoke the operation
+ string loggingConfigurationName = "instance";
+ NspLoggingConfigurationData data = new NspLoggingConfigurationData
+ {
+ Properties = new NspLoggingConfigurationProperties
+ {
+ EnabledLogCategories = { "NspPublicInboundPerimeterRulesDenied", "NspPublicOutboundPerimeterRulesDenied" },
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, loggingConfigurationName, data);
+ NspLoggingConfigurationResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLoggingConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspLoggingConfigurationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json
+ // this example is just showing the usage of "NspLoggingConfiguration_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLoggingConfigurationResource
+ NspLoggingConfigurationCollection collection = networkSecurityPerimeter.GetNspLoggingConfigurations();
+
+ // invoke the operation
+ string loggingConfigurationName = "instance";
+ NspLoggingConfigurationResource result = await collection.GetAsync(loggingConfigurationName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLoggingConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_NspLoggingConfigurationList()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationList.json
+ // this example is just showing the usage of "NspLoggingConfigurations_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLoggingConfigurationResource
+ NspLoggingConfigurationCollection collection = networkSecurityPerimeter.GetNspLoggingConfigurations();
+
+ // invoke the operation and iterate over the result
+ await foreach (NspLoggingConfigurationResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLoggingConfigurationData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NspLoggingConfigurationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json
+ // this example is just showing the usage of "NspLoggingConfiguration_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLoggingConfigurationResource
+ NspLoggingConfigurationCollection collection = networkSecurityPerimeter.GetNspLoggingConfigurations();
+
+ // invoke the operation
+ string loggingConfigurationName = "instance";
+ bool result = await collection.ExistsAsync(loggingConfigurationName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NspLoggingConfigurationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json
+ // this example is just showing the usage of "NspLoggingConfiguration_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspLoggingConfigurationResource
+ NspLoggingConfigurationCollection collection = networkSecurityPerimeter.GetNspLoggingConfigurations();
+
+ // invoke the operation
+ string loggingConfigurationName = "instance";
+ NullableResponse response = await collection.GetIfExistsAsync(loggingConfigurationName);
+ NspLoggingConfigurationResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLoggingConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLoggingConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLoggingConfigurationResource.cs
new file mode 100644
index 000000000000..398905c41348
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspLoggingConfigurationResource.cs
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Network.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspLoggingConfigurationResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspLoggingConfigurationGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationGet.json
+ // this example is just showing the usage of "NspLoggingConfiguration_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLoggingConfigurationResource created on azure
+ // for more information of creating NspLoggingConfigurationResource, please refer to the document of NspLoggingConfigurationResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string loggingConfigurationName = "instance";
+ ResourceIdentifier nspLoggingConfigurationResourceId = NspLoggingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, loggingConfigurationName);
+ NspLoggingConfigurationResource nspLoggingConfiguration = client.GetNspLoggingConfigurationResource(nspLoggingConfigurationResourceId);
+
+ // invoke the operation
+ NspLoggingConfigurationResource result = await nspLoggingConfiguration.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLoggingConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_NspLoggingConfigurationDelete()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationDelete.json
+ // this example is just showing the usage of "NspLoggingConfiguration_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLoggingConfigurationResource created on azure
+ // for more information of creating NspLoggingConfigurationResource, please refer to the document of NspLoggingConfigurationResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string loggingConfigurationName = "instance";
+ ResourceIdentifier nspLoggingConfigurationResourceId = NspLoggingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, loggingConfigurationName);
+ NspLoggingConfigurationResource nspLoggingConfiguration = client.GetNspLoggingConfigurationResource(nspLoggingConfigurationResourceId);
+
+ // invoke the operation
+ await nspLoggingConfiguration.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_NspLoggingConfigurationPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspLoggingConfigurationPut.json
+ // this example is just showing the usage of "NspLoggingConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspLoggingConfigurationResource created on azure
+ // for more information of creating NspLoggingConfigurationResource, please refer to the document of NspLoggingConfigurationResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string loggingConfigurationName = "instance";
+ ResourceIdentifier nspLoggingConfigurationResourceId = NspLoggingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, loggingConfigurationName);
+ NspLoggingConfigurationResource nspLoggingConfiguration = client.GetNspLoggingConfigurationResource(nspLoggingConfigurationResourceId);
+
+ // invoke the operation
+ NspLoggingConfigurationData data = new NspLoggingConfigurationData
+ {
+ Properties = new NspLoggingConfigurationProperties
+ {
+ EnabledLogCategories = { "NspPublicInboundPerimeterRulesDenied", "NspPublicOutboundPerimeterRulesDenied" },
+ },
+ };
+ ArmOperation lro = await nspLoggingConfiguration.UpdateAsync(WaitUntil.Completed, data);
+ NspLoggingConfigurationResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspLoggingConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspProfileCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspProfileCollection.cs
new file mode 100644
index 000000000000..65e8562704df
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspProfileCollection.cs
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspProfileCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_NspProfilesPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfilePut.json
+ // this example is just showing the usage of "NspProfiles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspProfileResource
+ NspProfileCollection collection = networkSecurityPerimeter.GetNspProfiles();
+
+ // invoke the operation
+ string profileName = "profile1";
+ NspProfileData data = new NspProfileData(default);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, profileName, data);
+ NspProfileResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspProfileData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspProfilesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json
+ // this example is just showing the usage of "NspProfiles_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspProfileResource
+ NspProfileCollection collection = networkSecurityPerimeter.GetNspProfiles();
+
+ // invoke the operation
+ string profileName = "profile1";
+ NspProfileResource result = await collection.GetAsync(profileName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspProfileData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_NspProfilesList()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileList.json
+ // this example is just showing the usage of "NspProfiles_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspProfileResource
+ NspProfileCollection collection = networkSecurityPerimeter.GetNspProfiles();
+
+ // invoke the operation and iterate over the result
+ await foreach (NspProfileResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspProfileData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NspProfilesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json
+ // this example is just showing the usage of "NspProfiles_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspProfileResource
+ NspProfileCollection collection = networkSecurityPerimeter.GetNspProfiles();
+
+ // invoke the operation
+ string profileName = "profile1";
+ bool result = await collection.ExistsAsync(profileName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NspProfilesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json
+ // this example is just showing the usage of "NspProfiles_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NetworkSecurityPerimeterResource created on azure
+ // for more information of creating NetworkSecurityPerimeterResource, please refer to the document of NetworkSecurityPerimeterResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ ResourceIdentifier networkSecurityPerimeterResourceId = NetworkSecurityPerimeterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName);
+ NetworkSecurityPerimeterResource networkSecurityPerimeter = client.GetNetworkSecurityPerimeterResource(networkSecurityPerimeterResourceId);
+
+ // get the collection of this NspProfileResource
+ NspProfileCollection collection = networkSecurityPerimeter.GetNspProfiles();
+
+ // invoke the operation
+ string profileName = "profile1";
+ NullableResponse response = await collection.GetIfExistsAsync(profileName);
+ NspProfileResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspProfileData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspProfileResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspProfileResource.cs
new file mode 100644
index 000000000000..09e92838711d
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NspProfileResource.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_NspProfileResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspProfilesGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileGet.json
+ // this example is just showing the usage of "NspProfiles_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // invoke the operation
+ NspProfileResource result = await nspProfile.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspProfileData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_NspProfilesDelete()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfileDelete.json
+ // this example is just showing the usage of "NspProfiles_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // invoke the operation
+ await nspProfile.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_NspProfilesPut()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspProfilePut.json
+ // this example is just showing the usage of "NspProfiles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this NspProfileResource created on azure
+ // for more information of creating NspProfileResource, please refer to the document of NspProfileResource
+ string subscriptionId = "subId";
+ string resourceGroupName = "rg1";
+ string networkSecurityPerimeterName = "nsp1";
+ string profileName = "profile1";
+ ResourceIdentifier nspProfileResourceId = NspProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkSecurityPerimeterName, profileName);
+ NspProfileResource nspProfile = client.GetNspProfileResource(nspProfileResourceId);
+
+ // invoke the operation
+ NspProfileData data = new NspProfileData(default);
+ ArmOperation lro = await nspProfile.UpdateAsync(WaitUntil.Completed, data);
+ NspProfileResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NspProfileData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OperationStatusResultCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OperationStatusResultCollection.cs
new file mode 100644
index 000000000000..f84ac3ffc5bb
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OperationStatusResultCollection.cs
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_OperationStatusResultCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspOperationStatusGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspOperationStatusGet.json
+ // this example is just showing the usage of "NspOperationStatus_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "subId";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // get the collection of this OperationStatusResultResource
+ OperationStatusResultCollection collection = subscriptionResource.GetOperationStatusResults();
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("location1");
+ string operationId = "operationId1";
+ OperationStatusResultResource result = await collection.GetAsync(location, operationId);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ OperationStatusResultData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_NspOperationStatusGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspOperationStatusGet.json
+ // this example is just showing the usage of "NspOperationStatus_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "subId";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // get the collection of this OperationStatusResultResource
+ OperationStatusResultCollection collection = subscriptionResource.GetOperationStatusResults();
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("location1");
+ string operationId = "operationId1";
+ bool result = await collection.ExistsAsync(location, operationId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_NspOperationStatusGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspOperationStatusGet.json
+ // this example is just showing the usage of "NspOperationStatus_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "subId";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // get the collection of this OperationStatusResultResource
+ OperationStatusResultCollection collection = subscriptionResource.GetOperationStatusResults();
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("location1");
+ string operationId = "operationId1";
+ NullableResponse response = await collection.GetIfExistsAsync(location, operationId);
+ OperationStatusResultResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ OperationStatusResultData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OperationStatusResultResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OperationStatusResultResource.cs
new file mode 100644
index 000000000000..d001b0940eb8
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OperationStatusResultResource.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Network.Samples
+{
+ public partial class Sample_OperationStatusResultResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_NspOperationStatusGet()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NspOperationStatusGet.json
+ // this example is just showing the usage of "NspOperationStatus_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this OperationStatusResultResource created on azure
+ // for more information of creating OperationStatusResultResource, please refer to the document of OperationStatusResultResource
+ string subscriptionId = "subId";
+ AzureLocation location = new AzureLocation("location1");
+ string operationId = "operationId1";
+ ResourceIdentifier operationStatusResultResourceId = OperationStatusResultResource.CreateResourceIdentifier(subscriptionId, location, operationId);
+ OperationStatusResultResource operationStatusResult = client.GetOperationStatusResultResource(operationStatusResultResourceId);
+
+ // invoke the operation
+ OperationStatusResultResource result = await operationStatusResult.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ OperationStatusResultData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
index 36d7cc8c9a3b..7c09006434f8 100644
--- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
+++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -17,6 +17,65 @@ namespace Azure.ResourceManager.Network.Samples
{
public partial class Sample_SubscriptionResourceExtensions
{
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetNetworkSecurityPerimeters_NetworkSecurityPerimetersList()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/NetworkSecurityPerimeterListAll.json
+ // this example is just showing the usage of "NetworkSecurityPerimeters_ListBySubscription" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "subId";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (NetworkSecurityPerimeterResource item in subscriptionResource.GetNetworkSecurityPerimetersAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ NetworkSecurityPerimeterData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetPerimeterAssociableResourceTypes_CheckDnsNameAvailability()
+ {
+ // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-07-01/examples/PerimeterAssociableResourcesList.json
+ // this example is just showing the usage of "PerimeterAssociableResourceTypes_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "subId";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ AzureLocation location = new AzureLocation("westus");
+ await foreach (PerimeterAssociableResource item in subscriptionResource.GetPerimeterAssociableResourceTypesAsync(location))
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
[Test]
[Ignore("Only validating compilation of examples")]
public async Task GetApplicationGateways_ListsAllApplicationGatewaysInASubscription()
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs
index 191b27658c9d..9c0bd9f1940a 100644
--- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs
@@ -19,6 +19,339 @@ namespace Azure.ResourceManager.Network.Models
/// Model factory for models.
public static partial class ArmNetworkModelFactory
{
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The provisioning state of the scope assignment resource.
+ /// perimeter guid of the network security perimeter.
+ /// A new instance for mocking.
+ public static NetworkSecurityPerimeterData NetworkSecurityPerimeterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, NspProvisioningState? provisioningState = null, Guid? perimeterGuid = null)
+ {
+ tags ??= new Dictionary();
+
+ return new NetworkSecurityPerimeterData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ provisioningState,
+ perimeterGuid,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Resource ID.
+ /// Resource name.
+ /// Resource type.
+ /// Resource location.
+ /// Resource tags.
+ /// A new instance for mocking.
+ public static NetworkTrackedResourceData NetworkTrackedResourceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null)
+ {
+ tags ??= new Dictionary();
+
+ return new NetworkTrackedResourceData(
+ id,
+ name,
+ resourceType,
+ location,
+ tags,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Network security perimeter identifier.
+ /// List of tags for Network Security Perimeter.
+ /// A new instance for mocking.
+ public static NetworkSecurityPerimeterPatch NetworkSecurityPerimeterPatch(string id = null, IDictionary tags = null)
+ {
+ tags ??= new Dictionary();
+
+ return new NetworkSecurityPerimeterPatch(id, tags, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// Version number that increases with every update to access rules within the profile.
+ /// Version number that increases with every update to diagnostic settings within the profile.
+ /// A new instance for mocking.
+ public static NspProfileData NspProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string accessRulesVersion = null, string diagnosticSettingsVersion = null)
+ {
+ tags ??= new Dictionary();
+
+ return new NspProfileData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ accessRulesVersion,
+ diagnosticSettingsVersion,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The provisioning state of the scope assignment resource.
+ /// Direction that specifies whether the access rules is inbound/outbound.
+ /// Inbound address prefixes (IPv4/IPv6).
+ /// Outbound rules fully qualified domain name format.
+ /// List of subscription ids.
+ /// Rule specified by the perimeter id.
+ /// Outbound rules email address format.
+ /// Outbound rules phone number format.
+ /// Inbound rules service tag names.
+ /// A new instance for mocking.
+ public static NspAccessRuleData NspAccessRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, NspProvisioningState? provisioningState = null, AccessRuleDirection? direction = null, IEnumerable addressPrefixes = null, IEnumerable fullyQualifiedDomainNames = null, IEnumerable subscriptions = null, IEnumerable networkSecurityPerimeters = null, IEnumerable emailAddresses = null, IEnumerable phoneNumbers = null, IEnumerable serviceTags = null)
+ {
+ tags ??= new Dictionary();
+ addressPrefixes ??= new List();
+ fullyQualifiedDomainNames ??= new List();
+ subscriptions ??= new List();
+ networkSecurityPerimeters ??= new List();
+ emailAddresses ??= new List();
+ phoneNumbers ??= new List();
+ serviceTags ??= new List();
+
+ return new NspAccessRuleData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ provisioningState,
+ direction,
+ addressPrefixes?.ToList(),
+ fullyQualifiedDomainNames?.ToList(),
+ subscriptions?.ToList(),
+ networkSecurityPerimeters?.ToList(),
+ emailAddresses?.ToList(),
+ phoneNumbers?.ToList(),
+ serviceTags?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// NSP id in the ARM id format.
+ /// Resource guid of the NSP supplied.
+ /// Location of the NSP supplied.
+ /// A new instance for mocking.
+ public static PerimeterBasedAccessRule PerimeterBasedAccessRule(string id = null, Guid? perimeterGuid = null, AzureLocation? location = null)
+ {
+ return new PerimeterBasedAccessRule(id, perimeterGuid, location, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The provisioning state of the resource association resource.
+ /// The PaaS resource to be associated.
+ /// Profile id to which the PaaS resource is associated.
+ /// Access mode on the association.
+ /// Specifies if there are provisioning issues.
+ /// A new instance for mocking.
+ public static NspAssociationData NspAssociationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, NspProvisioningState? provisioningState = null, ResourceIdentifier privateLinkResourceId = null, ResourceIdentifier profileId = null, AssociationAccessMode? accessMode = null, string hasProvisioningIssues = null)
+ {
+ tags ??= new Dictionary();
+
+ return new NspAssociationData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ provisioningState,
+ privateLinkResourceId != null ? ResourceManagerModelFactory.WritableSubResource(privateLinkResourceId) : null,
+ profileId != null ? ResourceManagerModelFactory.WritableSubResource(profileId) : null,
+ accessMode,
+ hasProvisioningIssues,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// A friendly name for the properties of perimeter associable resources.
+ /// Public DNS zone names of the resources.
+ /// A new instance for mocking.
+ public static PerimeterAssociableResource PerimeterAssociableResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string displayName = null, IEnumerable publicDnsZones = null)
+ {
+ tags ??= new Dictionary();
+ publicDnsZones ??= new List();
+
+ return new PerimeterAssociableResource(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ displayName,
+ publicDnsZones?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The provisioning state of the NSP Link resource.
+ /// Perimeter ARM Id for the remote NSP with which the link gets created in Auto-approval mode. It should be used when the NSP admin have Microsoft.Network/networkSecurityPerimeters/linkPerimeter/action permission on the remote NSP resource.
+ /// Remote NSP Guid with which the link gets created.
+ /// Remote NSP location with which the link gets created.
+ /// Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles.
+ /// Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it.
+ /// Remote Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. This property can only be updated in auto-approval mode.
+ /// Remote Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it.
+ /// A message passed to the owner of the remote NSP link resource with this connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. Restricted to 140 chars.
+ /// The NSP link state.
+ /// A unique read-only string that changes whenever the resource is updated.
+ /// A new instance for mocking.
+ public static NspLinkData NspLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NspLinkProvisioningState? provisioningState = null, string autoApprovedRemotePerimeterResourceId = null, Guid? remotePerimeterGuid = null, string remotePerimeterLocation = null, IEnumerable localInboundProfiles = null, IEnumerable localOutboundProfiles = null, IEnumerable remoteInboundProfiles = null, IEnumerable remoteOutboundProfiles = null, string description = null, NspLinkStatus? status = null, ETag? etag = null)
+ {
+ localInboundProfiles ??= new List();
+ localOutboundProfiles ??= new List();
+ remoteInboundProfiles ??= new List();
+ remoteOutboundProfiles ??= new List();
+
+ return new NspLinkData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ provisioningState,
+ autoApprovedRemotePerimeterResourceId,
+ remotePerimeterGuid,
+ remotePerimeterLocation,
+ localInboundProfiles?.ToList(),
+ localOutboundProfiles?.ToList(),
+ remoteInboundProfiles?.ToList(),
+ remoteOutboundProfiles?.ToList(),
+ description,
+ status,
+ etag,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The provisioning state of the NSP LinkReference resource.
+ /// Perimeter ARM Id for the remote NSP with which the link is created.
+ /// Remote NSP Guid with which the link is created.
+ /// Remote NSP location with which the link gets created.
+ /// Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles.
+ /// Local Outbound profile names from which Outbound is allowed. In current version, it is readonly property and it's value is set to ['*'] to allow outbound from all profiles. In later version, user will be able to modify it.
+ /// Remote Inbound profile names to which Inbound is allowed. ['*'] value implies inbound is allowed to all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter.
+ /// Remote Outbound profile names from which Outbound is allowed. ['*'] value implies outbound is allowed from all profiles at remote perimeter. This property can only be updated from corresponding link resource present in remote perimeter.
+ /// A message sent by the remote NSP link admin for connection request. In case of Auto-approved flow, it is default to 'Auto Approved'.
+ /// The NSP linkReference state. It cannot be changed if link is created in auto-approval mode.
+ /// A unique read-only string that changes whenever the resource is updated.
+ /// A new instance for mocking.
+ public static NspLinkReferenceData NspLinkReferenceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NspLinkProvisioningState? provisioningState = null, string remotePerimeterResourceId = null, Guid? remotePerimeterGuid = null, string remotePerimeterLocation = null, IEnumerable localInboundProfiles = null, IEnumerable localOutboundProfiles = null, IEnumerable remoteInboundProfiles = null, IEnumerable remoteOutboundProfiles = null, string description = null, NspLinkStatus? status = null, ETag? etag = null)
+ {
+ localInboundProfiles ??= new List();
+ localOutboundProfiles ??= new List();
+ remoteInboundProfiles ??= new List();
+ remoteOutboundProfiles ??= new List();
+
+ return new NspLinkReferenceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ provisioningState,
+ remotePerimeterResourceId,
+ remotePerimeterGuid,
+ remotePerimeterLocation,
+ localInboundProfiles?.ToList(),
+ localOutboundProfiles?.ToList(),
+ remoteInboundProfiles?.ToList(),
+ remoteOutboundProfiles?.ToList(),
+ description,
+ status,
+ etag,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Properties of the NSP logging configuration.
+ /// A unique read-only string that changes whenever the resource is updated.
+ /// A new instance for mocking.
+ public static NspLoggingConfigurationData NspLoggingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NspLoggingConfigurationProperties properties = null, ETag? etag = null)
+ {
+ return new NspLoggingConfigurationData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ etag,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified ID for the async operation.
+ /// Fully qualified ID of the resource against which the original async operation was started.
+ /// Name of the async operation.
+ /// Operation status.
+ /// Percent of the operation that is complete.
+ /// The start time of the operation.
+ /// The end time of the operation.
+ /// The operations list.
+ /// If present, details of the operation error.
+ /// A new instance for mocking.
+ public static OperationStatusResultData OperationStatusResultData(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null)
+ {
+ operations ??= new List();
+
+ return new OperationStatusResultData(
+ id,
+ resourceId,
+ name,
+ status,
+ percentComplete,
+ startOn,
+ endOn,
+ operations?.ToList(),
+ error,
+ serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// Resource ID.
/// Resource name.
@@ -700,26 +1033,6 @@ public static ApplicationSecurityGroupData ApplicationSecurityGroupData(Resource
provisioningState);
}
- /// Initializes a new instance of .
- /// Resource ID.
- /// Resource name.
- /// Resource type.
- /// Resource location.
- /// Resource tags.
- /// A new instance for mocking.
- public static NetworkTrackedResourceData NetworkTrackedResourceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null)
- {
- tags ??= new Dictionary();
-
- return new NetworkTrackedResourceData(
- id,
- name,
- resourceType,
- location,
- tags,
- serializedAdditionalRawData: null);
- }
-
/// Initializes a new instance of .
/// Resource ID.
/// Resource name.
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs
index 0b7c2de7ca6c..b86ebbab233d 100644
--- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs
@@ -34,6 +34,102 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual NetworkSecurityPerimeterResource GetNetworkSecurityPerimeterResource(ResourceIdentifier id)
+ {
+ NetworkSecurityPerimeterResource.ValidateResourceId(id);
+ return new NetworkSecurityPerimeterResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual NspProfileResource GetNspProfileResource(ResourceIdentifier id)
+ {
+ NspProfileResource.ValidateResourceId(id);
+ return new NspProfileResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual NspAccessRuleResource GetNspAccessRuleResource(ResourceIdentifier id)
+ {
+ NspAccessRuleResource.ValidateResourceId(id);
+ return new NspAccessRuleResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual NspAssociationResource GetNspAssociationResource(ResourceIdentifier id)
+ {
+ NspAssociationResource.ValidateResourceId(id);
+ return new NspAssociationResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual NspLinkResource GetNspLinkResource(ResourceIdentifier id)
+ {
+ NspLinkResource.ValidateResourceId(id);
+ return new NspLinkResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual NspLinkReferenceResource GetNspLinkReferenceResource(ResourceIdentifier id)
+ {
+ NspLinkReferenceResource.ValidateResourceId(id);
+ return new NspLinkReferenceResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual NspLoggingConfigurationResource GetNspLoggingConfigurationResource(ResourceIdentifier id)
+ {
+ NspLoggingConfigurationResource.ValidateResourceId(id);
+ return new NspLoggingConfigurationResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual OperationStatusResultResource GetOperationStatusResultResource(ResourceIdentifier id)
+ {
+ OperationStatusResultResource.ValidateResourceId(id);
+ return new OperationStatusResultResource(Client, id);
+ }
+
///
/// Gets an object representing an along with the instance operations that can be performed on it but with no data.
/// You can use to create an from its components.
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs
index 07374533a9bc..5585226c70fc 100644
--- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs
@@ -54,6 +54,75 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}
+ /// Gets a collection of NetworkSecurityPerimeterResources in the ResourceGroupResource.
+ /// An object representing collection of NetworkSecurityPerimeterResources and their operations over a NetworkSecurityPerimeterResource.
+ public virtual NetworkSecurityPerimeterCollection GetNetworkSecurityPerimeters()
+ {
+ return GetCachedClient(client => new NetworkSecurityPerimeterCollection(client, Id));
+ }
+
+ ///
+ /// Gets the specified network security perimeter by the name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the network security perimeter.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetNetworkSecurityPerimeterAsync(string networkSecurityPerimeterName, CancellationToken cancellationToken = default)
+ {
+ return await GetNetworkSecurityPerimeters().GetAsync(networkSecurityPerimeterName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the specified network security perimeter by the name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the network security perimeter.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetNetworkSecurityPerimeter(string networkSecurityPerimeterName, CancellationToken cancellationToken = default)
+ {
+ return GetNetworkSecurityPerimeters().Get(networkSecurityPerimeterName, cancellationToken);
+ }
+
/// Gets a collection of ApplicationGatewayResources in the ResourceGroupResource.
/// An object representing collection of ApplicationGatewayResources and their operations over a ApplicationGatewayResource.
public virtual ApplicationGatewayCollection GetApplicationGateways()
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs
index 93e571a9400c..d2966a34cb53 100644
--- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs
@@ -18,6 +18,10 @@ namespace Azure.ResourceManager.Network.Mocking
/// A class to add extension methods to SubscriptionResource.
public partial class MockableNetworkSubscriptionResource : ArmResource
{
+ private ClientDiagnostics _networkSecurityPerimeterClientDiagnostics;
+ private NetworkSecurityPerimetersRestOperations _networkSecurityPerimeterRestClient;
+ private ClientDiagnostics _perimeterAssociableResourceTypesClientDiagnostics;
+ private PerimeterAssociableResourceTypesRestOperations _perimeterAssociableResourceTypesRestClient;
private ClientDiagnostics _applicationGatewayClientDiagnostics;
private ApplicationGatewaysRestOperations _applicationGatewayRestClient;
private ClientDiagnostics _applicationSecurityGroupClientDiagnostics;
@@ -135,6 +139,10 @@ internal MockableNetworkSubscriptionResource(ArmClient client, ResourceIdentifie
{
}
+ private ClientDiagnostics NetworkSecurityPerimeterClientDiagnostics => _networkSecurityPerimeterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", NetworkSecurityPerimeterResource.ResourceType.Namespace, Diagnostics);
+ private NetworkSecurityPerimetersRestOperations NetworkSecurityPerimeterRestClient => _networkSecurityPerimeterRestClient ??= new NetworkSecurityPerimetersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkSecurityPerimeterResource.ResourceType));
+ private ClientDiagnostics PerimeterAssociableResourceTypesClientDiagnostics => _perimeterAssociableResourceTypesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private PerimeterAssociableResourceTypesRestOperations PerimeterAssociableResourceTypesRestClient => _perimeterAssociableResourceTypesRestClient ??= new PerimeterAssociableResourceTypesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
private ClientDiagnostics ApplicationGatewayClientDiagnostics => _applicationGatewayClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", ApplicationGatewayResource.ResourceType.Namespace, Diagnostics);
private ApplicationGatewaysRestOperations ApplicationGatewayRestClient => _applicationGatewayRestClient ??= new ApplicationGatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ApplicationGatewayResource.ResourceType));
private ClientDiagnostics ApplicationSecurityGroupClientDiagnostics => _applicationSecurityGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", ApplicationSecurityGroupResource.ResourceType.Namespace, Diagnostics);
@@ -246,6 +254,77 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}
+ /// Gets a collection of OperationStatusResultResources in the SubscriptionResource.
+ /// An object representing collection of OperationStatusResultResources and their operations over a OperationStatusResultResource.
+ public virtual OperationStatusResultCollection GetOperationStatusResults()
+ {
+ return GetCachedClient(client => new OperationStatusResultCollection(client, Id));
+ }
+
+ ///
+ /// Gets the operation status for the given operation id.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/networkSecurityPerimeterOperationStatuses/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// NspOperationStatus_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The location of network security perimeter.
+ /// The operation id of the async operation.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetOperationStatusResultAsync(AzureLocation location, string operationId, CancellationToken cancellationToken = default)
+ {
+ return await GetOperationStatusResults().GetAsync(location, operationId, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the operation status for the given operation id.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/networkSecurityPerimeterOperationStatuses/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// NspOperationStatus_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The location of network security perimeter.
+ /// The operation id of the async operation.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetOperationStatusResult(AzureLocation location, string operationId, CancellationToken cancellationToken = default)
+ {
+ return GetOperationStatusResults().Get(location, operationId, cancellationToken);
+ }
+
/// Gets a collection of ApplicationGatewayWafDynamicManifestResources in the SubscriptionResource.
/// The region where the nrp are located at.
/// An object representing collection of ApplicationGatewayWafDynamicManifestResources and their operations over a ApplicationGatewayWafDynamicManifestResource.
@@ -659,6 +738,124 @@ public virtual Response GetNetworkVirtualApp
return GetNetworkVirtualApplianceSkus().Get(skuName, cancellationToken);
}
+ ///
+ /// List all network security perimeters in a subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// An optional query parameter which specifies the maximum number of records to be returned by the server.
+ /// SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetNetworkSecurityPerimetersAsync(int? top = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkSecurityPerimeterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top, skipToken);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkSecurityPerimeterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top, skipToken);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkSecurityPerimeterResource(Client, NetworkSecurityPerimeterData.DeserializeNetworkSecurityPerimeterData(e)), NetworkSecurityPerimeterClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetNetworkSecurityPerimeters", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List all network security perimeters in a subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// An optional query parameter which specifies the maximum number of records to be returned by the server.
+ /// SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetNetworkSecurityPerimeters(int? top = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkSecurityPerimeterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top, skipToken);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkSecurityPerimeterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top, skipToken);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkSecurityPerimeterResource(Client, NetworkSecurityPerimeterData.DeserializeNetworkSecurityPerimeterData(e)), NetworkSecurityPerimeterClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetNetworkSecurityPerimeters", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes
+ ///
+ /// -
+ /// Operation Id
+ /// PerimeterAssociableResourceTypes_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ ///
+ ///
+ /// The location of network security perimeter.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetPerimeterAssociableResourceTypesAsync(AzureLocation location, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => PerimeterAssociableResourceTypesRestClient.CreateListRequest(Id.SubscriptionId, location);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PerimeterAssociableResourceTypesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => PerimeterAssociableResource.DeserializePerimeterAssociableResource(e), PerimeterAssociableResourceTypesClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetPerimeterAssociableResourceTypes", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes
+ ///
+ /// -
+ /// Operation Id
+ /// PerimeterAssociableResourceTypes_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ ///
+ ///
+ /// The location of network security perimeter.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetPerimeterAssociableResourceTypes(AzureLocation location, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => PerimeterAssociableResourceTypesRestClient.CreateListRequest(Id.SubscriptionId, location);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PerimeterAssociableResourceTypesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => PerimeterAssociableResource.DeserializePerimeterAssociableResource(e), PerimeterAssociableResourceTypesClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetPerimeterAssociableResourceTypes", "value", "nextLink", cancellationToken);
+ }
+
///
/// Gets all the application gateways in a subscription.
///
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs
index db16625c0cd2..a91c30783b87 100644
--- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs
@@ -39,6 +39,158 @@ private static MockableNetworkSubscriptionResource GetMockableNetworkSubscriptio
return resource.GetCachedClient(client => new MockableNetworkSubscriptionResource(client, resource.Id));
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static NetworkSecurityPerimeterResource GetNetworkSecurityPerimeterResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetNetworkSecurityPerimeterResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static NspProfileResource GetNspProfileResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetNspProfileResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static NspAccessRuleResource GetNspAccessRuleResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetNspAccessRuleResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static NspAssociationResource GetNspAssociationResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetNspAssociationResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static NspLinkResource GetNspLinkResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetNspLinkResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static NspLinkReferenceResource GetNspLinkReferenceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetNspLinkReferenceResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static NspLoggingConfigurationResource GetNspLoggingConfigurationResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetNspLoggingConfigurationResource(id);
+ }
+
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static OperationStatusResultResource GetOperationStatusResultResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableNetworkArmClient(client).GetOperationStatusResultResource(id);
+ }
+
///
/// Gets an object representing an along with the instance operations that can be performed on it but with no data.
/// You can use to create an from its components.
@@ -2469,6 +2621,99 @@ public static Response GetManag
return GetMockableNetworkManagementGroupResource(managementGroupResource).GetManagementGroupNetworkManagerConnection(networkManagerConnectionName, cancellationToken);
}
+ ///
+ /// Gets a collection of NetworkSecurityPerimeterResources in the ResourceGroupResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// is null.
+ /// An object representing collection of NetworkSecurityPerimeterResources and their operations over a NetworkSecurityPerimeterResource.
+ public static NetworkSecurityPerimeterCollection GetNetworkSecurityPerimeters(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableNetworkResourceGroupResource(resourceGroupResource).GetNetworkSecurityPerimeters();
+ }
+
+ ///
+ /// Gets the specified network security perimeter by the name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the network security perimeter.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetNetworkSecurityPerimeterAsync(this ResourceGroupResource resourceGroupResource, string networkSecurityPerimeterName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableNetworkResourceGroupResource(resourceGroupResource).GetNetworkSecurityPerimeterAsync(networkSecurityPerimeterName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the specified network security perimeter by the name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the network security perimeter.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetNetworkSecurityPerimeter(this ResourceGroupResource resourceGroupResource, string networkSecurityPerimeterName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableNetworkResourceGroupResource(resourceGroupResource).GetNetworkSecurityPerimeter(networkSecurityPerimeterName, cancellationToken);
+ }
+
///
/// Gets a collection of ApplicationGatewayResources in the ResourceGroupResource.
/// -
@@ -7026,6 +7271,101 @@ public static Pageable GetAutoApprovedPrivateLin
return GetMockableNetworkResourceGroupResource(resourceGroupResource).GetAutoApprovedPrivateLinkServicesByResourceGroupPrivateLinkServices(location, cancellationToken);
}
+ ///
+ /// Gets a collection of OperationStatusResultResources in the SubscriptionResource.
+ ///
-
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// is null.
+ /// An object representing collection of OperationStatusResultResources and their operations over a OperationStatusResultResource.
+ public static OperationStatusResultCollection GetOperationStatusResults(this SubscriptionResource subscriptionResource)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableNetworkSubscriptionResource(subscriptionResource).GetOperationStatusResults();
+ }
+
+ ///
+ /// Gets the operation status for the given operation id.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/networkSecurityPerimeterOperationStatuses/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// NspOperationStatus_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The location of network security perimeter.
+ /// The operation id of the async operation.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetOperationStatusResultAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableNetworkSubscriptionResource(subscriptionResource).GetOperationStatusResultAsync(location, operationId, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the operation status for the given operation id.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/networkSecurityPerimeterOperationStatuses/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// NspOperationStatus_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The location of network security perimeter.
+ /// The operation id of the async operation.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetOperationStatusResult(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableNetworkSubscriptionResource(subscriptionResource).GetOperationStatusResult(location, operationId, cancellationToken);
+ }
+
///
/// Gets a collection of ApplicationGatewayWafDynamicManifestResources in the SubscriptionResource.
/// -
@@ -7585,6 +7925,148 @@ public static Response GetNetworkVirtualAppl
return GetMockableNetworkSubscriptionResource(subscriptionResource).GetNetworkVirtualApplianceSku(skuName, cancellationToken);
}
+ ///
+ /// List all network security perimeters in a subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// An optional query parameter which specifies the maximum number of records to be returned by the server.
+ /// SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetNetworkSecurityPerimetersAsync(this SubscriptionResource subscriptionResource, int? top = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableNetworkSubscriptionResource(subscriptionResource).GetNetworkSecurityPerimetersAsync(top, skipToken, cancellationToken);
+ }
+
+ ///
+ /// List all network security perimeters in a subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters
+ ///
+ /// -
+ /// Operation Id
+ /// NetworkSecurityPerimeters_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// An optional query parameter which specifies the maximum number of records to be returned by the server.
+ /// SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetNetworkSecurityPerimeters(this SubscriptionResource subscriptionResource, int? top = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableNetworkSubscriptionResource(subscriptionResource).GetNetworkSecurityPerimeters(top, skipToken, cancellationToken);
+ }
+
+ ///
+ /// Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes
+ ///
+ /// -
+ /// Operation Id
+ /// PerimeterAssociableResourceTypes_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The location of network security perimeter.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetPerimeterAssociableResourceTypesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableNetworkSubscriptionResource(subscriptionResource).GetPerimeterAssociableResourceTypesAsync(location, cancellationToken);
+ }
+
+ ///
+ /// Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes
+ ///
+ /// -
+ /// Operation Id
+ /// PerimeterAssociableResourceTypes_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-07-01
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The location of network security perimeter.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetPerimeterAssociableResourceTypes(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableNetworkSubscriptionResource(subscriptionResource).GetPerimeterAssociableResourceTypes(location, cancellationToken);
+ }
+
///
/// Gets all the application gateways in a subscription.
///
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/NspAssociationOperationSource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/NspAssociationOperationSource.cs
new file mode 100644
index 000000000000..991132957a0a
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/NspAssociationOperationSource.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network
+{
+ internal class NspAssociationOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal NspAssociationOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ NspAssociationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = NspAssociationData.DeserializeNspAssociationData(document.RootElement);
+ return new NspAssociationResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = NspAssociationData.DeserializeNspAssociationData(document.RootElement);
+ return new NspAssociationResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AccessRuleDirection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AccessRuleDirection.cs
new file mode 100644
index 000000000000..7c96b19c686c
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AccessRuleDirection.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Direction that specifies whether the access rules is inbound/outbound.
+ public readonly partial struct AccessRuleDirection : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AccessRuleDirection(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string InboundValue = "Inbound";
+ private const string OutboundValue = "Outbound";
+
+ /// Inbound.
+ public static AccessRuleDirection Inbound { get; } = new AccessRuleDirection(InboundValue);
+ /// Outbound.
+ public static AccessRuleDirection Outbound { get; } = new AccessRuleDirection(OutboundValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AccessRuleDirection left, AccessRuleDirection right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AccessRuleDirection left, AccessRuleDirection right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator AccessRuleDirection(string value) => new AccessRuleDirection(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AccessRuleDirection other && Equals(other);
+ ///
+ public bool Equals(AccessRuleDirection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AssociationAccessMode.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AssociationAccessMode.cs
new file mode 100644
index 000000000000..3b277e86b899
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AssociationAccessMode.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Access mode on the association.
+ public readonly partial struct AssociationAccessMode : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AssociationAccessMode(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string LearningValue = "Learning";
+ private const string EnforcedValue = "Enforced";
+ private const string AuditValue = "Audit";
+
+ /// Learning.
+ public static AssociationAccessMode Learning { get; } = new AssociationAccessMode(LearningValue);
+ /// Enforced.
+ public static AssociationAccessMode Enforced { get; } = new AssociationAccessMode(EnforcedValue);
+ /// Audit.
+ public static AssociationAccessMode Audit { get; } = new AssociationAccessMode(AuditValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AssociationAccessMode left, AssociationAccessMode right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AssociationAccessMode left, AssociationAccessMode right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator AssociationAccessMode(string value) => new AssociationAccessMode(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AssociationAccessMode other && Equals(other);
+ ///
+ public bool Equals(AssociationAccessMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterListResult.Serialization.cs
new file mode 100644
index 000000000000..446a93b4ec61
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterListResult.Serialization.cs
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ internal partial class NetworkSecurityPerimeterListResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterListResult)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsCollectionDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(NextLink))
+ {
+ writer.WritePropertyName("nextLink"u8);
+ writer.WriteStringValue(NextLink);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ NetworkSecurityPerimeterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterListResult)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNetworkSecurityPerimeterListResult(document.RootElement, options);
+ }
+
+ internal static NetworkSecurityPerimeterListResult DeserializeNetworkSecurityPerimeterListResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList value = default;
+ string nextLink = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NetworkSecurityPerimeterData.DeserializeNetworkSecurityPerimeterData(item, options));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new NetworkSecurityPerimeterListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterListResult)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ NetworkSecurityPerimeterListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNetworkSecurityPerimeterListResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterListResult)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterListResult.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterListResult.cs
new file mode 100644
index 000000000000..264e4f11fb1e
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterListResult.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Result of the request to list NetworkSecurityPerimeter. It contains a list of network security perimeters and a URL link to get the next set of results.
+ internal partial class NetworkSecurityPerimeterListResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal NetworkSecurityPerimeterListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// Gets a page of NetworkSecurityPerimeter.
+ /// Gets the URL to get the next page of results.
+ /// Keeps track of any properties unknown to the library.
+ internal NetworkSecurityPerimeterListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ {
+ Value = value;
+ NextLink = nextLink;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Gets a page of NetworkSecurityPerimeter.
+ public IReadOnlyList Value { get; }
+ /// Gets the URL to get the next page of results.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterPatch.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterPatch.Serialization.cs
new file mode 100644
index 000000000000..55d85606a6ac
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterPatch.Serialization.cs
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ public partial class NetworkSecurityPerimeterPatch : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterPatch)} does not support writing '{format}' format.");
+ }
+
+ if (options.Format != "W" && Optional.IsDefined(Id))
+ {
+ writer.WritePropertyName("id"u8);
+ writer.WriteStringValue(Id);
+ }
+ if (Optional.IsCollectionDefined(Tags))
+ {
+ writer.WritePropertyName("tags"u8);
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ NetworkSecurityPerimeterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterPatch)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNetworkSecurityPerimeterPatch(document.RootElement, options);
+ }
+
+ internal static NetworkSecurityPerimeterPatch DeserializeNetworkSecurityPerimeterPatch(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string id = default;
+ IDictionary tags = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("tags"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new NetworkSecurityPerimeterPatch(id, tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterPatch)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ NetworkSecurityPerimeterPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNetworkSecurityPerimeterPatch(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NetworkSecurityPerimeterPatch)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterPatch.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterPatch.cs
new file mode 100644
index 000000000000..9ef504338c4e
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityPerimeterPatch.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Update tags request.
+ public partial class NetworkSecurityPerimeterPatch
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public NetworkSecurityPerimeterPatch()
+ {
+ Tags = new ChangeTrackingDictionary();
+ }
+
+ /// Initializes a new instance of .
+ /// Network security perimeter identifier.
+ /// List of tags for Network Security Perimeter.
+ /// Keeps track of any properties unknown to the library.
+ internal NetworkSecurityPerimeterPatch(string id, IDictionary tags, IDictionary serializedAdditionalRawData)
+ {
+ Id = id;
+ Tags = tags;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Network security perimeter identifier.
+ public string Id { get; }
+ /// List of tags for Network Security Perimeter.
+ public IDictionary Tags { get; }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAccessRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAccessRuleListResult.Serialization.cs
new file mode 100644
index 000000000000..1277e688c872
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAccessRuleListResult.Serialization.cs
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ internal partial class NspAccessRuleListResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspAccessRuleListResult)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsCollectionDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(NextLink))
+ {
+ writer.WritePropertyName("nextLink"u8);
+ writer.WriteStringValue(NextLink);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ NspAccessRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspAccessRuleListResult)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNspAccessRuleListResult(document.RootElement, options);
+ }
+
+ internal static NspAccessRuleListResult DeserializeNspAccessRuleListResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList value = default;
+ string nextLink = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NspAccessRuleData.DeserializeNspAccessRuleData(item, options));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new NspAccessRuleListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NspAccessRuleListResult)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ NspAccessRuleListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNspAccessRuleListResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NspAccessRuleListResult)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAccessRuleListResult.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAccessRuleListResult.cs
new file mode 100644
index 000000000000..c6bc6fb796f4
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAccessRuleListResult.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Result of the request to list NSP access rules. Contains a list of NSP access rules and a URL link to get the next set of results.
+ internal partial class NspAccessRuleListResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal NspAccessRuleListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// Gets a page of NSP access rule.
+ /// Gets the URL to get the next page of results.
+ /// Keeps track of any properties unknown to the library.
+ internal NspAccessRuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ {
+ Value = value;
+ NextLink = nextLink;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Gets a page of NSP access rule.
+ public IReadOnlyList Value { get; }
+ /// Gets the URL to get the next page of results.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAssociationsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAssociationsListResult.Serialization.cs
new file mode 100644
index 000000000000..0a769603e42c
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAssociationsListResult.Serialization.cs
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ internal partial class NspAssociationsListResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspAssociationsListResult)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsCollectionDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(NextLink))
+ {
+ writer.WritePropertyName("nextLink"u8);
+ writer.WriteStringValue(NextLink);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ NspAssociationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspAssociationsListResult)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNspAssociationsListResult(document.RootElement, options);
+ }
+
+ internal static NspAssociationsListResult DeserializeNspAssociationsListResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList value = default;
+ string nextLink = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NspAssociationData.DeserializeNspAssociationData(item, options));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new NspAssociationsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NspAssociationsListResult)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ NspAssociationsListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNspAssociationsListResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NspAssociationsListResult)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAssociationsListResult.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAssociationsListResult.cs
new file mode 100644
index 000000000000..e1d86f9412cf
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspAssociationsListResult.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Result of the request to list NSP resource associations. Contains a list of NSP resource associations and a URL link to get the next set of results.
+ internal partial class NspAssociationsListResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal NspAssociationsListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// Gets a page of NSP resource associations.
+ /// Gets the URL to get the next page of results.
+ /// Keeps track of any properties unknown to the library.
+ internal NspAssociationsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ {
+ Value = value;
+ NextLink = nextLink;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Gets a page of NSP resource associations.
+ public IReadOnlyList Value { get; }
+ /// Gets the URL to get the next page of results.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkListResult.Serialization.cs
new file mode 100644
index 000000000000..fa03d94e78a8
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkListResult.Serialization.cs
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ internal partial class NspLinkListResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspLinkListResult)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsCollectionDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(NextLink))
+ {
+ writer.WritePropertyName("nextLink"u8);
+ writer.WriteStringValue(NextLink);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ NspLinkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspLinkListResult)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNspLinkListResult(document.RootElement, options);
+ }
+
+ internal static NspLinkListResult DeserializeNspLinkListResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList value = default;
+ string nextLink = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NspLinkData.DeserializeNspLinkData(item, options));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new NspLinkListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NspLinkListResult)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ NspLinkListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNspLinkListResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NspLinkListResult)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkListResult.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkListResult.cs
new file mode 100644
index 000000000000..24ec1f42ee2b
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkListResult.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Result of the request to list NSP link resources. Contains a list of NSP link resources and a URL link to get the next set of results.
+ internal partial class NspLinkListResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal NspLinkListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// Gets a page of NSP Link resources.
+ /// Gets the URL to get the next page of results.
+ /// Keeps track of any properties unknown to the library.
+ internal NspLinkListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ {
+ Value = value;
+ NextLink = nextLink;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Gets a page of NSP Link resources.
+ public IReadOnlyList Value { get; }
+ /// Gets the URL to get the next page of results.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkProvisioningState.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkProvisioningState.cs
new file mode 100644
index 000000000000..0fd355ea2244
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkProvisioningState.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// The current provisioning state of NSP Link/LinkReference.
+ public readonly partial struct NspLinkProvisioningState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public NspLinkProvisioningState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string SucceededValue = "Succeeded";
+ private const string CreatingValue = "Creating";
+ private const string UpdatingValue = "Updating";
+ private const string DeletingValue = "Deleting";
+ private const string AcceptedValue = "Accepted";
+ private const string FailedValue = "Failed";
+ private const string WaitForRemoteCompletionValue = "WaitForRemoteCompletion";
+
+ /// Succeeded.
+ public static NspLinkProvisioningState Succeeded { get; } = new NspLinkProvisioningState(SucceededValue);
+ /// Creating.
+ public static NspLinkProvisioningState Creating { get; } = new NspLinkProvisioningState(CreatingValue);
+ /// Updating.
+ public static NspLinkProvisioningState Updating { get; } = new NspLinkProvisioningState(UpdatingValue);
+ /// Deleting.
+ public static NspLinkProvisioningState Deleting { get; } = new NspLinkProvisioningState(DeletingValue);
+ /// Accepted.
+ public static NspLinkProvisioningState Accepted { get; } = new NspLinkProvisioningState(AcceptedValue);
+ /// Failed.
+ public static NspLinkProvisioningState Failed { get; } = new NspLinkProvisioningState(FailedValue);
+ /// WaitForRemoteCompletion.
+ public static NspLinkProvisioningState WaitForRemoteCompletion { get; } = new NspLinkProvisioningState(WaitForRemoteCompletionValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(NspLinkProvisioningState left, NspLinkProvisioningState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(NspLinkProvisioningState left, NspLinkProvisioningState right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator NspLinkProvisioningState(string value) => new NspLinkProvisioningState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is NspLinkProvisioningState other && Equals(other);
+ ///
+ public bool Equals(NspLinkProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkReferenceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkReferenceListResult.Serialization.cs
new file mode 100644
index 000000000000..48036d15375d
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkReferenceListResult.Serialization.cs
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ internal partial class NspLinkReferenceListResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspLinkReferenceListResult)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsCollectionDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(NextLink))
+ {
+ writer.WritePropertyName("nextLink"u8);
+ writer.WriteStringValue(NextLink);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ NspLinkReferenceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspLinkReferenceListResult)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNspLinkReferenceListResult(document.RootElement, options);
+ }
+
+ internal static NspLinkReferenceListResult DeserializeNspLinkReferenceListResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList value = default;
+ string nextLink = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NspLinkReferenceData.DeserializeNspLinkReferenceData(item, options));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new NspLinkReferenceListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NspLinkReferenceListResult)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ NspLinkReferenceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNspLinkReferenceListResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NspLinkReferenceListResult)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkReferenceListResult.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkReferenceListResult.cs
new file mode 100644
index 000000000000..0755a5a474f9
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkReferenceListResult.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// Result of the request to list NSP linkReference resources. Contains a list of NSP linkReference resources and a URL link to get the next set of results.
+ internal partial class NspLinkReferenceListResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ internal NspLinkReferenceListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// Gets a page of NSP LinkReference resources.
+ /// Gets the URL to get the next page of results.
+ /// Keeps track of any properties unknown to the library.
+ internal NspLinkReferenceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData)
+ {
+ Value = value;
+ NextLink = nextLink;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Gets a page of NSP LinkReference resources.
+ public IReadOnlyList Value { get; }
+ /// Gets the URL to get the next page of results.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkStatus.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkStatus.cs
new file mode 100644
index 000000000000..a618360042fb
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLinkStatus.cs
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ /// The NSP link state.
+ public readonly partial struct NspLinkStatus : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public NspLinkStatus(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string ApprovedValue = "Approved";
+ private const string PendingValue = "Pending";
+ private const string RejectedValue = "Rejected";
+ private const string DisconnectedValue = "Disconnected";
+
+ /// Approved.
+ public static NspLinkStatus Approved { get; } = new NspLinkStatus(ApprovedValue);
+ /// Pending.
+ public static NspLinkStatus Pending { get; } = new NspLinkStatus(PendingValue);
+ /// Rejected.
+ public static NspLinkStatus Rejected { get; } = new NspLinkStatus(RejectedValue);
+ /// Disconnected.
+ public static NspLinkStatus Disconnected { get; } = new NspLinkStatus(DisconnectedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(NspLinkStatus left, NspLinkStatus right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(NspLinkStatus left, NspLinkStatus right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator NspLinkStatus(string value) => new NspLinkStatus(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is NspLinkStatus other && Equals(other);
+ ///
+ public bool Equals(NspLinkStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLoggingConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLoggingConfigurationListResult.Serialization.cs
new file mode 100644
index 000000000000..13f5f37a2f72
--- /dev/null
+++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NspLoggingConfigurationListResult.Serialization.cs
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Network.Models
+{
+ internal partial class NspLoggingConfigurationListResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspLoggingConfigurationListResult)} does not support writing '{format}' format.");
+ }
+
+ if (Optional.IsCollectionDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStartArray();
+ foreach (var item in Value)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(NextLink))
+ {
+ writer.WritePropertyName("nextLink"u8);
+ writer.WriteStringValue(NextLink);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ NspLoggingConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NspLoggingConfigurationListResult)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNspLoggingConfigurationListResult(document.RootElement, options);
+ }
+
+ internal static NspLoggingConfigurationListResult DeserializeNspLoggingConfigurationListResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList value = default;
+ string nextLink = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary