diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 09fd6d33a97d..7ac507611325 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -645,10 +645,10 @@
# ServiceOwners: @omziv @anatse @raronen @ischrei @danhadari @azmonapplicationinsights
# PRLabel: %Monitor - Distro
-/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/ @rajkumar-rangaraj
+/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/ @rajkumar-rangaraj
# PRLabel: %Monitor - Distro
-/sdk/monitor/Azure.Monitor.OpenTelemetry.sln @rajkumar-rangaraj
+/sdk/monitor/Azure.Monitor.OpenTelemetry.sln @rajkumar-rangaraj
# ServiceLabel: %Monitor - Distro
# ServiceOwners: @rajkumar-rangaraj
@@ -918,6 +918,9 @@
# ServiceLabel: %VideoAnalyzer
# ServiceOwners: @giakas
+# ServiceLabel: %VirtualEnclaves
+# ServiceOwners: @jchavaherrera @Azure/azure-virtual-enclaves
+
# ServiceLabel: %Web Apps
# ServiceOwners: @AzureAppServiceCLI @antcp
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/Azure.ResourceManager.VirtualEnclaves.sln b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/Azure.ResourceManager.VirtualEnclaves.sln
new file mode 100644
index 000000000000..37aa9333cde9
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/Azure.ResourceManager.VirtualEnclaves.sln
@@ -0,0 +1,65 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30309.148
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{7DC62A36-7488-49E0-98B0-BCA292B9AA9B}") = "Azure.ResourceManager.VirtualEnclaves", "src\Azure.ResourceManager.VirtualEnclaves.csproj", "{673B38FB-4D42-43E4-BF91-3413C03BCD28}"
+EndProject
+Project("{7DC62A36-7488-49E0-98B0-BCA292B9AA9B}") = "Azure.ResourceManager.VirtualEnclaves.Tests", "tests\Azure.ResourceManager.VirtualEnclaves.Tests.csproj", "{C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}"
+EndProject
+Project("{7DC62A36-7488-49E0-98B0-BCA292B9AA9B}") = "Azure.ResourceManager.VirtualEnclaves.Samples", "samples\Azure.ResourceManager.VirtualEnclaves.Samples.csproj", "{B21B4156-A1F9-47C2-8960-A4F4644857C1}"
+EndProject
+Global
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {7B5F25F2-D050-4B7C-8816-38873D77FE09}
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Debug|x64.Build.0 = Debug|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Debug|x86.Build.0 = Debug|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Release|Any CPU.Build.0 = Release|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Release|x64.ActiveCfg = Release|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Release|x64.Build.0 = Release|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Release|x86.ActiveCfg = Release|Any CPU
+ {673B38FB-4D42-43E4-BF91-3413C03BCD28}.Release|x86.Build.0 = Release|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Debug|x64.Build.0 = Debug|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Debug|x86.Build.0 = Debug|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Release|x64.ActiveCfg = Release|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Release|x64.Build.0 = Release|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Release|x86.ActiveCfg = Release|Any CPU
+ {C7DAA011-2AF0-453B-B88D-D1C9C6FF5222}.Release|x86.Build.0 = Release|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Debug|x64.Build.0 = Debug|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Debug|x86.Build.0 = Debug|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Release|x64.ActiveCfg = Release|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Release|x64.Build.0 = Release|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Release|x86.ActiveCfg = Release|Any CPU
+ {B21B4156-A1F9-47C2-8960-A4F4644857C1}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/CHANGELOG.md b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/CHANGELOG.md
new file mode 100644
index 000000000000..1a85987a15b9
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/CHANGELOG.md
@@ -0,0 +1,19 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+
+
+### Features Added
+
+This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues).
+
+> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet).
\ No newline at end of file
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/Directory.Build.props b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/Directory.Build.props
new file mode 100644
index 000000000000..1a9611bd4924
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/README.md b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/README.md
new file mode 100644
index 000000000000..9137888fe41b
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/README.md
@@ -0,0 +1,80 @@
+# Microsoft Azure VirtualEnclaves management client library for .NET
+
+**Azure Virtual Enclaves provide secure, isolated execution environments within Azure, enabling organizations to run sensitive workloads with enhanced confidentiality and integrity. This SDK allows developers and administrators to manage Virtual Enclave resources, configure enclave properties, and integrate secure enclaves with other Azure services through a consistent .NET API.**
+
+This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+## Getting started
+
+### Install the package
+
+Install the Microsoft Azure VirtualEnclaves management library for .NET with [NuGet](https://www.nuget.org/):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.VirtualEnclaves --prerelease
+```
+
+### Prerequisites
+
+* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/).
+
+### Authenticate the Client
+
+To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+
+## Key concepts
+
+Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html)
+
+## Documentation
+
+Documentation is available to help you learn how to use this package:
+
+- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet).
+- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md).
+
+## Examples
+
+Code samples for using the management library for .NET can be found in the following locations
+- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples)
+
+## Troubleshooting
+
+- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues).
+- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags.
+
+## Next steps
+
+For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/).
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing
+guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions
+require you to agree to a Contributor License Agreement (CLA) declaring
+that you have the right to, and actually do, grant us the rights to use
+your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine
+whether you need to provide a CLA and decorate the PR appropriately
+(for example, label, comment). Follow the instructions provided by the
+bot. You'll only need to do this action once across all repositories
+using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For
+more information, see the [Code of Conduct FAQ][coc_faq] or contact
+ with any other questions or comments.
+
+
+[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
\ No newline at end of file
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/assets.json b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/assets.json
new file mode 100644
index 000000000000..61a40753d2df
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/assets.json
@@ -0,0 +1,6 @@
+{
+ "AssetsRepo": "Azure/azure-sdk-assets",
+ "AssetsRepoPrefixPath": "net",
+ "TagPrefix": "net/virtualenclaves/Azure.ResourceManager.VirtualEnclaves",
+ "Tag": ""
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/samples/Azure.ResourceManager.VirtualEnclaves.Samples.csproj b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/samples/Azure.ResourceManager.VirtualEnclaves.Samples.csproj
new file mode 100644
index 000000000000..a0d3f65fcb44
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/samples/Azure.ResourceManager.VirtualEnclaves.Samples.csproj
@@ -0,0 +1,12 @@
+
+
+ Exe
+ net8.0
+ Azure.ResourceManager.VirtualEnclaves.Samples.Sample01_CreateCommunity
+
+
+
+
+
+
+
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/samples/Sample01_CreateCommunity.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/samples/Sample01_CreateCommunity.cs
new file mode 100644
index 000000000000..e3cfdd8a0d34
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/samples/Sample01_CreateCommunity.cs
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System;
+using System.Diagnostics;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.VirtualEnclaves;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves.Samples
+{
+ public class Sample01_CreateCommunity
+ {
+ public static async Task Main(string[] args)
+ {
+ try
+ {
+ // Initialize the client with logging
+ var options = new ArmClientOptions();
+ options.Diagnostics.IsLoggingEnabled = true;
+ options.Diagnostics.IsDistributedTracingEnabled = true;
+
+ var credential = new DefaultAzureCredential();
+ var client = new ArmClient(credential, default, options);
+
+ // Get specific subscription
+ string subscriptionId = "1fbade44-8ae7-42be-a05b-7919a3938975";
+ var subscription = await client.GetSubscriptions().GetAsync(subscriptionId);
+
+ // Get existing resource group
+ string resourceGroupName = "jorgechav_rg";
+ Console.WriteLine($"Getting resource group {resourceGroupName}...");
+ var resourceGroup = await subscription.Value.GetResourceGroupAsync(resourceGroupName);
+
+ // Create community configuration
+ var communityData = new CommunityResourceData(AzureLocation.WestUS)
+ {
+ Properties = new CommunityProperties
+ {
+ // Configure DNS servers (using same value as test)
+ DnsServers = { "168.63.129.16" },
+
+ // Configure address space with valid subnet mask between /8 and /17
+ AddressSpace = "10.0.0.0/16"
+ },
+ Tags =
+ {
+ ["purpose"] = "demo",
+ ["environment"] = "development"
+ }
+ };
+
+ // Create the community
+ string communityName = "jorgechav-community2";
+ Console.WriteLine($"Creating community {communityName}...");
+
+ var communities = resourceGroup.Value.GetCommunityResources();
+ var operation = await communities.CreateOrUpdateAsync(
+ WaitUntil.Completed,
+ communityName,
+ communityData);
+
+ var community = operation.Value;
+ Console.WriteLine($"Created community with ID: {community.Data.Id}");
+
+ // Verify address space availability
+ var addressSpaceCheck = new CheckAddressSpaceAvailabilityContent(
+ community.Id,
+ new EnclaveVirtualNetworkModel
+ {
+ NetworkSize = "small",
+ CustomCidrRange = "10.0.0.0/16",
+ SubnetConfigurations = { new SubnetConfiguration("default", 20) },
+ AllowSubnetCommunication = true
+ });
+
+ Console.WriteLine("Checking address space availability...");
+ var availabilityResponse = await community.CheckAddressSpaceAvailabilityAsync(addressSpaceCheck);
+ Console.WriteLine($"Address space availability check result: {availabilityResponse.Value.Value}");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Error: {ex.Message}");
+ Console.WriteLine(ex.StackTrace);
+ }
+ }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Azure.ResourceManager.VirtualEnclaves.csproj b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Azure.ResourceManager.VirtualEnclaves.csproj
new file mode 100644
index 000000000000..a2d2bfb775c7
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Azure.ResourceManager.VirtualEnclaves.csproj
@@ -0,0 +1,9 @@
+
+
+ 1.0.0-beta.1
+ Azure.ResourceManager.VirtualEnclaves
+ Azure Resource Manager client SDK for Azure resource provider VirtualEnclaves.
+ azure;management;arm;resource manager;virtualenclaves
+ AZC0030,AZC0012,AZC0034
+
+
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResource.Serialization.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResource.Serialization.cs
new file mode 100644
index 000000000000..3e1615a05936
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResource.Serialization.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ public partial class ApprovalResource : IJsonModel
+ {
+ private static ApprovalResourceData s_dataDeserializationInstance;
+ private static ApprovalResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new();
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ ApprovalResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerVirtualEnclavesContext.Default);
+
+ ApprovalResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerVirtualEnclavesContext.Default);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResource.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResource.cs
new file mode 100644
index 000000000000..3fb190d4bdfc
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResource.cs
@@ -0,0 +1,438 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A Class representing an ApprovalResource along with the instance operations that can be performed on it.
+ /// If you have a you can construct an
+ /// from an instance of using the GetApprovalResource method.
+ /// Otherwise you can get one from its parent resource using the GetApprovalResource method.
+ ///
+ public partial class ApprovalResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The resourceUri.
+ /// The approvalName.
+ public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string approvalName)
+ {
+ var resourceId = $"{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _approvalResourceApprovalClientDiagnostics;
+ private readonly ApprovalRestOperations _approvalResourceApprovalRestClient;
+ private readonly ApprovalResourceData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Mission/approvals";
+
+ /// Initializes a new instance of the class for mocking.
+ public ApprovalResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ApprovalResource(ArmClient client, ApprovalResourceData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal ApprovalResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _approvalResourceApprovalClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.VirtualEnclaves", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string approvalResourceApprovalApiVersion);
+ _approvalResourceApprovalRestClient = new ApprovalRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, approvalResourceApprovalApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual ApprovalResourceData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ApprovalResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.Get(Id.Parent, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ApprovalResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(_approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(_approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApprovalResourcePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.UpdateAsync(Id.Parent, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalResourceOperationSource(Client), _approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, ApprovalResourcePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.Update(Id.Parent, Id.Name, patch, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalResourceOperationSource(Client), _approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Upon receiving approval or rejection from approver, this facilitates actions on approval resource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}/notifyInitiator
+ ///
+ /// -
+ /// Operation Id
+ /// Approval_NotifyInitiator
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> NotifyInitiatorAsync(WaitUntil waitUntil, ApprovalActionContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.NotifyInitiator");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.NotifyInitiatorAsync(Id.Parent, Id.Name, content, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalActionResponseOperationSource(), _approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateNotifyInitiatorRequest(Id.Parent, Id.Name, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Upon receiving approval or rejection from approver, this facilitates actions on approval resource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}/notifyInitiator
+ ///
+ /// -
+ /// Operation Id
+ /// Approval_NotifyInitiator
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation NotifyInitiator(WaitUntil waitUntil, ApprovalActionContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResource.NotifyInitiator");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.NotifyInitiator(Id.Parent, Id.Name, content, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalActionResponseOperationSource(), _approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateNotifyInitiatorRequest(Id.Parent, Id.Name, content).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceCollection.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceCollection.cs
new file mode 100644
index 000000000000..2e27eafe801d
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceCollection.cs
@@ -0,0 +1,483 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get an instance call the GetApprovalResources method from an instance of .
+ ///
+ public partial class ApprovalResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _approvalResourceApprovalClientDiagnostics;
+ private readonly ApprovalRestOperations _approvalResourceApprovalRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ApprovalResourceCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal ApprovalResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _approvalResourceApprovalClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.VirtualEnclaves", ApprovalResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ApprovalResource.ResourceType, out string approvalResourceApprovalApiVersion);
+ _approvalResourceApprovalRestClient = new ApprovalRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, approvalResourceApprovalApiVersion);
+ }
+
+ ///
+ /// Create a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the approvals resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string approvalName, ApprovalResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.CreateOrUpdateAsync(Id, approvalName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalResourceOperationSource(Client), _approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateCreateOrUpdateRequest(Id, approvalName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the approvals resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string approvalName, ApprovalResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.CreateOrUpdate(Id, approvalName, data, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalResourceOperationSource(Client), _approvalResourceApprovalClientDiagnostics, Pipeline, _approvalResourceApprovalRestClient.CreateCreateOrUpdateRequest(Id, approvalName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the approvals resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string approvalName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.GetAsync(Id, approvalName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ApprovalResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a ApprovalResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the approvals resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string approvalName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.Get(Id, approvalName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ApprovalResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List ApprovalResource resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_ListByParent
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _approvalResourceApprovalRestClient.CreateListByParentRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _approvalResourceApprovalRestClient.CreateListByParentNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ApprovalResource(Client, ApprovalResourceData.DeserializeApprovalResourceData(e)), _approvalResourceApprovalClientDiagnostics, Pipeline, "ApprovalResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List ApprovalResource resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_ListByParent
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _approvalResourceApprovalRestClient.CreateListByParentRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _approvalResourceApprovalRestClient.CreateListByParentNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ApprovalResource(Client, ApprovalResourceData.DeserializeApprovalResourceData(e)), _approvalResourceApprovalClientDiagnostics, Pipeline, "ApprovalResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the approvals resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string approvalName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.GetAsync(Id, approvalName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the approvals resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string approvalName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.Get(Id, approvalName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the approvals resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string approvalName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _approvalResourceApprovalRestClient.GetAsync(Id, approvalName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ApprovalResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.Mission/approvals/{approvalName}
+ ///
+ /// -
+ /// Operation Id
+ /// ApprovalResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the approvals resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string approvalName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(approvalName, nameof(approvalName));
+
+ using var scope = _approvalResourceApprovalClientDiagnostics.CreateScope("ApprovalResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _approvalResourceApprovalRestClient.Get(Id, approvalName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ApprovalResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceData.Serialization.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceData.Serialization.cs
new file mode 100644
index 000000000000..0a59761c5862
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceData.Serialization.cs
@@ -0,0 +1,156 @@
+// 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;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ public partial class ApprovalResourceData : 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 override 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(ApprovalResourceData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ ApprovalResourceData 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(ApprovalResourceData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeApprovalResourceData(document.RootElement, options);
+ }
+
+ internal static ApprovalResourceData DeserializeApprovalResourceData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ApprovalProperties properties = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = ApprovalProperties.DeserializeApprovalProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerVirtualEnclavesContext.Default);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ApprovalResourceData(
+ id,
+ name,
+ type,
+ systemData,
+ properties,
+ 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, AzureResourceManagerVirtualEnclavesContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(ApprovalResourceData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ApprovalResourceData 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, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeApprovalResourceData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ApprovalResourceData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceData.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceData.cs
new file mode 100644
index 000000000000..f769fb656fe8
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ApprovalResourceData.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A class representing the ApprovalResource data model.
+ /// Approval Model Resource
+ ///
+ public partial class ApprovalResourceData : ResourceData
+ {
+ ///
+ /// 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 ApprovalResourceData()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The resource-specific properties for this resource.
+ /// Keeps track of any properties unknown to the library.
+ internal ApprovalResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApprovalProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public ApprovalProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ArmVirtualEnclavesModelFactory.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ArmVirtualEnclavesModelFactory.cs
new file mode 100644
index 000000000000..bd87cb39386d
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/ArmVirtualEnclavesModelFactory.cs
@@ -0,0 +1,562 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.Resources.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves.Models
+{
+ /// Model factory for models.
+ public static partial class ArmVirtualEnclavesModelFactory
+ {
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static WorkloadResourceData WorkloadResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WorkloadProperties properties = null)
+ {
+ tags ??= new Dictionary();
+
+ return new WorkloadResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Provisioning State.
+ /// List of resource group ids.
+ /// Managed On Behalf Of Configuration.
+ /// A new instance for mocking.
+ public static WorkloadProperties WorkloadProperties(ProvisioningState? provisioningState = null, IEnumerable resourceGroupCollection = null, IEnumerable managedOnBehalfOfMoboBrokerResources = null)
+ {
+ resourceGroupCollection ??= new List();
+ managedOnBehalfOfMoboBrokerResources ??= new List();
+
+ return new WorkloadProperties(provisioningState, resourceGroupCollection?.ToList(), managedOnBehalfOfMoboBrokerResources != null ? new ManagedOnBehalfOfConfiguration(managedOnBehalfOfMoboBrokerResources?.ToList(), serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// The managed service identities assigned to this resource.
+ /// A new instance for mocking.
+ public static EnclaveResourceData EnclaveResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, VirtualEnclaveProperties properties = null, ManagedServiceIdentity identity = null)
+ {
+ tags ??= new Dictionary();
+
+ return new EnclaveResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ identity,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Provisioning State.
+ /// Virtual Network.
+ /// Enclave Address Spaces.
+ /// Community Resource Id.
+ /// List of resource ids created by Virtual Enclave.
+ /// Managed resource group name.
+ /// Managed On Behalf Of Configuration.
+ /// Deploy Bastion service (True or False).
+ /// Enclave role assignments.
+ /// Workload role assignments.
+ /// Enclave specific policies.
+ /// Enclave default settings.
+ /// Maintenance Mode configuration.
+ /// A new instance for mocking.
+ public static VirtualEnclaveProperties VirtualEnclaveProperties(ProvisioningState? provisioningState = null, EnclaveVirtualNetworkModel enclaveVirtualNetwork = null, EnclaveAddressSpacesModel enclaveAddressSpaces = null, ResourceIdentifier communityResourceId = null, IEnumerable resourceCollection = null, string managedResourceGroupName = null, IEnumerable managedOnBehalfOfMoboBrokerResources = null, bool? bastionEnabled = null, IEnumerable enclaveRoleAssignments = null, IEnumerable workloadRoleAssignments = null, IEnumerable governedServiceList = null, EnclaveDefaultSettingsModel enclaveDefaultSettings = null, MaintenanceModeConfigurationModel maintenanceModeConfiguration = null)
+ {
+ resourceCollection ??= new List();
+ managedOnBehalfOfMoboBrokerResources ??= new List();
+ enclaveRoleAssignments ??= new List();
+ workloadRoleAssignments ??= new List();
+ governedServiceList ??= new List();
+
+ return new VirtualEnclaveProperties(
+ provisioningState,
+ enclaveVirtualNetwork,
+ enclaveAddressSpaces,
+ communityResourceId,
+ resourceCollection?.ToList(),
+ managedResourceGroupName,
+ managedOnBehalfOfMoboBrokerResources != null ? new ManagedOnBehalfOfConfiguration(managedOnBehalfOfMoboBrokerResources?.ToList(), serializedAdditionalRawData: null) : null,
+ bastionEnabled,
+ enclaveRoleAssignments?.ToList(),
+ workloadRoleAssignments?.ToList(),
+ governedServiceList?.ToList(),
+ enclaveDefaultSettings,
+ maintenanceModeConfiguration,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Subnet name.
+ /// Subnet Resource ID.
+ /// Network prefix size.
+ /// Subnet delegation.
+ /// Address prefix.
+ /// Network security group ID.
+ /// A new instance for mocking.
+ public static SubnetConfiguration SubnetConfiguration(string subnetName = null, ResourceIdentifier subnetResourceId = null, int networkPrefixSize = default, string subnetDelegation = null, string addressPrefix = null, ResourceIdentifier networkSecurityGroupResourceId = null)
+ {
+ return new SubnetConfiguration(
+ subnetName,
+ subnetResourceId,
+ networkPrefixSize,
+ subnetDelegation,
+ addressPrefix,
+ networkSecurityGroupResourceId,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Enclave Address Space.
+ /// Managed Address Space.
+ /// A new instance for mocking.
+ public static EnclaveAddressSpacesModel EnclaveAddressSpacesModel(string enclaveAddressSpace = null, string managedAddressSpace = null)
+ {
+ return new EnclaveAddressSpacesModel(enclaveAddressSpace, managedAddressSpace, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Service ID.
+ /// Service name.
+ /// Governance option for this service (Allow, Deny, ExceptionOnly, or NotApplicable).
+ /// Initiative enforcement (Enabled or Disabled).
+ /// Enforcement mode for policy. AuditOnly, Enforce, or None.
+ /// Initiatives associated with this service.
+ /// A new instance for mocking.
+ public static GovernedServiceItem GovernedServiceItem(ServiceIdentifier serviceId = default, string serviceName = null, GovernedServiceItemOption? option = null, GovernedServiceItemEnforcement? enforcement = null, GovernedServiceItemPolicyAction? policyAction = null, IEnumerable initiatives = null)
+ {
+ initiatives ??= new List();
+
+ return new GovernedServiceItem(
+ serviceId,
+ serviceName,
+ option,
+ enforcement,
+ policyAction,
+ initiatives?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Key Vault Resource Id.
+ /// Storage Account Resource Id.
+ /// Log Analytics Resource Ids.
+ /// Diagnostic Destination.
+ /// A new instance for mocking.
+ public static EnclaveDefaultSettingsModel EnclaveDefaultSettingsModel(ResourceIdentifier keyVaultResourceId = null, ResourceIdentifier storageAccountResourceId = null, IEnumerable logAnalyticsResourceIdCollection = null, DiagnosticDestination? diagnosticDestination = null)
+ {
+ logAnalyticsResourceIdCollection ??= new List();
+
+ return new EnclaveDefaultSettingsModel(keyVaultResourceId, storageAccountResourceId, logAnalyticsResourceIdCollection?.ToList(), diagnosticDestination, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Virtual Network.
+ /// Deploy Bastion service (True or False).
+ /// Enclave role assignments.
+ /// Workload role assignments.
+ /// Enclave specific policies.
+ /// Enclave default settings.
+ /// Maintenance Mode configuration.
+ /// A new instance for mocking.
+ public static VirtualEnclavePatchProperties VirtualEnclavePatchProperties(EnclaveVirtualNetworkModel enclaveVirtualNetwork = null, bool? bastionEnabled = null, IEnumerable enclaveRoleAssignments = null, IEnumerable workloadRoleAssignments = null, IEnumerable governedServiceList = null, DiagnosticDestination? enclaveDefaultDiagnosticDestination = null, MaintenanceModeConfigurationPatchModel maintenanceModeConfiguration = null)
+ {
+ enclaveRoleAssignments ??= new List();
+ workloadRoleAssignments ??= new List();
+ governedServiceList ??= new List();
+
+ return new VirtualEnclavePatchProperties(
+ enclaveVirtualNetwork,
+ bastionEnabled,
+ enclaveRoleAssignments?.ToList(),
+ workloadRoleAssignments?.ToList(),
+ governedServiceList?.ToList(),
+ enclaveDefaultDiagnosticDestination != null ? new EnclaveDefaultSettingsPatchModel(enclaveDefaultDiagnosticDestination, serializedAdditionalRawData: null) : null,
+ maintenanceModeConfiguration,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Current mode of Maintenance Mode Configuration.
+ /// The user, group or service principal object affected by Maintenance Mode.
+ /// Justification for entering or exiting Maintenance Mode.
+ /// A new instance for mocking.
+ public static MaintenanceModeConfigurationPatchModel MaintenanceModeConfigurationPatchModel(MaintenanceModeConfigurationModelMode mode = default, IEnumerable principals = null, MaintenanceModeConfigurationModelJustification? justification = null)
+ {
+ principals ??= new List();
+
+ return new MaintenanceModeConfigurationPatchModel(mode, principals?.ToList(), justification, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Resource request action indicating action which needed to be performed upon calling approval-callback post action.
+ /// Approval status indicating 'Approved' or 'Rejected'.
+ /// Payload requested by client upon approval action.
+ /// A new instance for mocking.
+ public static ApprovalCallbackRequest ApprovalCallbackRequest(ApprovalCallbackRequestResourceRequestAction resourceRequestAction = default, ApprovalCallbackRequestApprovalStatus approvalStatus = default, string approvalCallbackPayload = null)
+ {
+ return new ApprovalCallbackRequest(resourceRequestAction, approvalStatus, approvalCallbackPayload, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Confirmation message indicating the result of the operation.
+ /// A new instance for mocking.
+ public static ApprovalActionResponse ApprovalActionResponse(string message = null)
+ {
+ return new ApprovalActionResponse(message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// The managed service identities assigned to this resource.
+ /// A new instance for mocking.
+ public static CommunityResourceData CommunityResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CommunityProperties properties = null, ManagedServiceIdentity identity = null)
+ {
+ tags ??= new Dictionary();
+
+ return new CommunityResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ identity,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Address Space.
+ /// DNS Servers.
+ /// Provisioning State.
+ /// List of resource ids created by communities.
+ /// Managed resource group name.
+ /// Managed On Behalf Of Configuration.
+ /// List of services governed by a community.
+ /// Policy override setting for the community. Specifies whether to apply enclave-specific policies or disable policy enforcement.
+ /// Community role assignments.
+ /// SKU of the community's Azure Firewall (Basic, Standard, Premium). Standard is the default.
+ /// Approval requirements for various actions on the community's resources.
+ /// Maintenance Mode configuration.
+ /// A new instance for mocking.
+ public static CommunityProperties CommunityProperties(string addressSpace = null, IEnumerable dnsServers = null, ProvisioningState? provisioningState = null, IEnumerable resourceCollection = null, string managedResourceGroupName = null, IEnumerable managedOnBehalfOfMoboBrokerResources = null, IEnumerable governedServiceList = null, CommunityPropertiesPolicyOverride? policyOverride = null, IEnumerable communityRoleAssignments = null, FirewallSKU? firewallSku = null, ApprovalSettings approvalSettings = null, MaintenanceModeConfigurationModel maintenanceModeConfiguration = null)
+ {
+ dnsServers ??= new List();
+ resourceCollection ??= new List();
+ managedOnBehalfOfMoboBrokerResources ??= new List();
+ governedServiceList ??= new List();
+ communityRoleAssignments ??= new List();
+
+ return new CommunityProperties(
+ addressSpace,
+ dnsServers?.ToList(),
+ provisioningState,
+ resourceCollection?.ToList(),
+ managedResourceGroupName,
+ managedOnBehalfOfMoboBrokerResources != null ? new ManagedOnBehalfOfConfiguration(managedOnBehalfOfMoboBrokerResources?.ToList(), serializedAdditionalRawData: null) : null,
+ governedServiceList?.ToList(),
+ policyOverride,
+ communityRoleAssignments?.ToList(),
+ firewallSku,
+ approvalSettings,
+ maintenanceModeConfiguration,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Boolean representing whether the address space is available.
+ /// A new instance for mocking.
+ public static CheckAddressSpaceAvailabilityResponse CheckAddressSpaceAvailabilityResponse(bool value = default)
+ {
+ return new CheckAddressSpaceAvailabilityResponse(value, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static TransitHubResourceData TransitHubResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, TransitHubProperties properties = null)
+ {
+ tags ??= new Dictionary();
+
+ return new TransitHubResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The status of the last operation.
+ /// The state of the transitHub.
+ /// The TransitOption of the transitHub.
+ /// List of resource ids modified by transitHubs.
+ /// A new instance for mocking.
+ public static TransitHubProperties TransitHubProperties(ProvisioningState? provisioningState = null, TransitHubState? state = null, TransitOption transitOption = null, IEnumerable resourceCollection = null)
+ {
+ resourceCollection ??= new List();
+
+ return new TransitHubProperties(provisioningState, state, transitOption, resourceCollection?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static EnclaveConnectionResourceData EnclaveConnectionResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EnclaveConnectionProperties properties = null)
+ {
+ tags ??= new Dictionary();
+
+ return new EnclaveConnectionResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The state of the enclaveConnection.
+ /// Community Resource Id.
+ /// Source Resource Id.
+ /// Source CIDR.
+ /// Destination Endpoint Resource Id.
+ /// Provisioning State.
+ /// List of resource ids modified by enclave Connections.
+ /// A new instance for mocking.
+ public static EnclaveConnectionProperties EnclaveConnectionProperties(EnclaveConnectionState? state = null, ResourceIdentifier communityResourceId = null, ResourceIdentifier sourceResourceId = null, string sourceCidr = null, ResourceIdentifier destinationEndpointId = null, ProvisioningState? provisioningState = null, IEnumerable resourceCollection = null)
+ {
+ resourceCollection ??= new List();
+
+ return new EnclaveConnectionProperties(
+ state,
+ communityResourceId,
+ sourceResourceId,
+ sourceCidr,
+ destinationEndpointId,
+ provisioningState,
+ resourceCollection?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static EnclaveEndpointResourceData EnclaveEndpointResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EnclaveEndpointProperties properties = null)
+ {
+ tags ??= new Dictionary();
+
+ return new EnclaveEndpointResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Enclave Endpoint Rule Collection.
+ /// List of resource ids created by community endpoint.
+ /// Provisioning State.
+ /// A new instance for mocking.
+ public static EnclaveEndpointProperties EnclaveEndpointProperties(IEnumerable ruleCollection = null, IEnumerable resourceCollection = null, ProvisioningState? provisioningState = null)
+ {
+ ruleCollection ??= new List();
+ resourceCollection ??= new List();
+
+ return new EnclaveEndpointProperties(ruleCollection?.ToList(), resourceCollection?.ToList(), provisioningState, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static CommunityEndpointResourceData CommunityEndpointResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CommunityEndpointProperties properties = null)
+ {
+ tags ??= new Dictionary();
+
+ return new CommunityEndpointResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Community Endpoint Rule Collection.
+ /// List of resource ids created by community endpoint.
+ /// Provisioning State.
+ /// A new instance for mocking.
+ public static CommunityEndpointProperties CommunityEndpointProperties(IEnumerable ruleCollection = null, IEnumerable resourceCollection = null, ProvisioningState? provisioningState = null)
+ {
+ ruleCollection ??= new List();
+ resourceCollection ??= new List();
+
+ return new CommunityEndpointProperties(ruleCollection?.ToList(), resourceCollection?.ToList(), provisioningState, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ApprovalResourceData ApprovalResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApprovalProperties properties = null)
+ {
+ return new ApprovalResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of for mocking.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ /// A new instance for mocking.
+ public static ApprovalResource ApprovalResource(ArmClient client = null, ApprovalResourceData data = null)
+ {
+ return new ApprovalResource(client, data);
+ }
+
+ /// Initializes a new instance of .
+ /// Provisioning State.
+ /// Parameter for optimizing query results.
+ /// Parameter for optimizing query results.
+ /// List of approvers for the approval request.
+ /// Ticket ID for the approval request.
+ /// Approval request creation time.
+ /// Approval request state change time, time at which approval request state changed from pending to approved or rejected.
+ /// Request metadata for the approval request.
+ /// A new instance for mocking.
+ public static ApprovalProperties ApprovalProperties(ProvisioningState? provisioningState = null, ResourceIdentifier parentResourceId = null, ResourceIdentifier grandparentResourceId = null, IEnumerable approvers = null, string ticketId = null, DateTimeOffset? createdOn = null, DateTimeOffset? stateChangedOn = null, RequestMetadata requestMetadata = null)
+ {
+ approvers ??= new List();
+
+ return new ApprovalProperties(
+ provisioningState,
+ parentResourceId,
+ grandparentResourceId,
+ approvers?.ToList(),
+ ticketId,
+ createdOn,
+ stateChangedOn,
+ requestMetadata,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Parameter for optimizing query results.
+ /// Parameter for optimizing query results.
+ /// List of approvers for the approval request.
+ /// Ticket ID for the approval request.
+ /// Approval request creation time.
+ /// Approval request state change time, time at which approval request state changed from pending to approved or rejected.
+ /// Request metadata for the approval request.
+ /// A new instance for mocking.
+ public static ApprovalPatchProperties ApprovalPatchProperties(ResourceIdentifier parentResourceId = null, ResourceIdentifier grandparentResourceId = null, IEnumerable approvers = null, string ticketId = null, DateTimeOffset? createdOn = null, DateTimeOffset? stateChangedOn = null, RequestMetadataUpdatableProperties requestMetadata = null)
+ {
+ approvers ??= new List();
+
+ return new ApprovalPatchProperties(
+ parentResourceId,
+ grandparentResourceId,
+ approvers?.ToList(),
+ ticketId,
+ createdOn,
+ stateChangedOn,
+ requestMetadata,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Resource Action of the item being approved or declined.
+ /// Route name for the approval callback.
+ /// Payload to be sent upon any action on approval request.
+ /// Status of the approval. Uses ApprovalStatus enum.
+ /// A new instance for mocking.
+ public static RequestMetadataUpdatableProperties RequestMetadataUpdatableProperties(string resourceAction = null, string approvalCallbackRoute = null, string approvalCallbackPayload = null, ApprovalStatus? approvalStatus = null)
+ {
+ return new RequestMetadataUpdatableProperties(resourceAction, approvalCallbackRoute, approvalCallbackPayload, approvalStatus, serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResource.Serialization.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResource.Serialization.cs
new file mode 100644
index 000000000000..555c21173fec
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResource.Serialization.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ public partial class CommunityEndpointResource : IJsonModel
+ {
+ private static CommunityEndpointResourceData s_dataDeserializationInstance;
+ private static CommunityEndpointResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new();
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ CommunityEndpointResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerVirtualEnclavesContext.Default);
+
+ CommunityEndpointResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerVirtualEnclavesContext.Default);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResource.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResource.cs
new file mode 100644
index 000000000000..44fc9fa80a25
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResource.cs
@@ -0,0 +1,891 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A Class representing a CommunityEndpointResource along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetCommunityEndpointResource method.
+ /// Otherwise you can get one from its parent resource using the GetCommunityEndpointResource method.
+ ///
+ public partial class CommunityEndpointResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The communityName.
+ /// The communityEndpointName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string communityName, string communityEndpointName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _communityEndpointResourceCommunityEndpointsClientDiagnostics;
+ private readonly CommunityEndpointsRestOperations _communityEndpointResourceCommunityEndpointsRestClient;
+ private readonly CommunityEndpointResourceData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Mission/communities/communityEndpoints";
+
+ /// Initializes a new instance of the class for mocking.
+ public CommunityEndpointResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal CommunityEndpointResource(ArmClient client, CommunityEndpointResourceData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal CommunityEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _communityEndpointResourceCommunityEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.VirtualEnclaves", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string communityEndpointResourceCommunityEndpointsApiVersion);
+ _communityEndpointResourceCommunityEndpointsRestClient = new CommunityEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, communityEndpointResourceCommunityEndpointsApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual CommunityEndpointResourceData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityEndpointResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityEndpointResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(_communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(_communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, CommunityEndpointResourcePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new CommunityEndpointResourceOperationSource(Client), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, CommunityEndpointResourcePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new CommunityEndpointResourceOperationSource(Client), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Callback that triggers on approval state change.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}/handleApprovalCreation
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpoints_HandleApprovalCreation
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> HandleApprovalCreationAsync(WaitUntil waitUntil, ApprovalCallbackRequest body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(body, nameof(body));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.HandleApprovalCreation");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.HandleApprovalCreationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalActionResponseOperationSource(), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateHandleApprovalCreationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Callback that triggers on approval state change.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}/handleApprovalCreation
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpoints_HandleApprovalCreation
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation HandleApprovalCreation(WaitUntil waitUntil, ApprovalCallbackRequest body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(body, nameof(body));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.HandleApprovalCreation");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.HandleApprovalCreation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalActionResponseOperationSource(), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateHandleApprovalCreationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Callback that triggers on approval deletion state change.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}/handleApprovalDeletion
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpoints_HandleApprovalDeletion
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> HandleApprovalDeletionAsync(WaitUntil waitUntil, VirtualEnclavesApprovalDeletionCallbackRequestContent body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(body, nameof(body));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.HandleApprovalDeletion");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.HandleApprovalDeletionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalActionResponseOperationSource(), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateHandleApprovalDeletionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Callback that triggers on approval deletion state change.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}/handleApprovalDeletion
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpoints_HandleApprovalDeletion
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation HandleApprovalDeletion(WaitUntil waitUntil, VirtualEnclavesApprovalDeletionCallbackRequestContent body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(body, nameof(body));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.HandleApprovalDeletion");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.HandleApprovalDeletion(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new ApprovalActionResponseOperationSource(), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateHandleApprovalDeletionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues[key] = value;
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _communityEndpointResourceCommunityEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new CommunityEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new CommunityEndpointResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues[key] = value;
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _communityEndpointResourceCommunityEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ return Response.FromValue(new CommunityEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new CommunityEndpointResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _communityEndpointResourceCommunityEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new CommunityEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new CommunityEndpointResourcePatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken);
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _communityEndpointResourceCommunityEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ return Response.FromValue(new CommunityEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new CommunityEndpointResourcePatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.Remove(key);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _communityEndpointResourceCommunityEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new CommunityEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new CommunityEndpointResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.Remove(key);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _communityEndpointResourceCommunityEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ return Response.FromValue(new CommunityEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new CommunityEndpointResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceCollection.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceCollection.cs
new file mode 100644
index 000000000000..f4b5c8322fb1
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceCollection.cs
@@ -0,0 +1,493 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetCommunityEndpointResources method from an instance of .
+ ///
+ public partial class CommunityEndpointResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _communityEndpointResourceCommunityEndpointsClientDiagnostics;
+ private readonly CommunityEndpointsRestOperations _communityEndpointResourceCommunityEndpointsRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected CommunityEndpointResourceCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal CommunityEndpointResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _communityEndpointResourceCommunityEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.VirtualEnclaves", CommunityEndpointResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(CommunityEndpointResource.ResourceType, out string communityEndpointResourceCommunityEndpointsApiVersion);
+ _communityEndpointResourceCommunityEndpointsRestClient = new CommunityEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, communityEndpointResourceCommunityEndpointsApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != CommunityResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CommunityResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Community Endpoint Resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string communityEndpointName, CommunityEndpointResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new CommunityEndpointResourceOperationSource(Client), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Community Endpoint Resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string communityEndpointName, CommunityEndpointResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, data, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new CommunityEndpointResourceOperationSource(Client), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, _communityEndpointResourceCommunityEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityEndpointResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityEndpointResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List CommunityEndpointResource resources by CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_ListByCommunityResource
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _communityEndpointResourceCommunityEndpointsRestClient.CreateListByCommunityResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _communityEndpointResourceCommunityEndpointsRestClient.CreateListByCommunityResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CommunityEndpointResource(Client, CommunityEndpointResourceData.DeserializeCommunityEndpointResourceData(e)), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, "CommunityEndpointResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List CommunityEndpointResource resources by CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_ListByCommunityResource
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _communityEndpointResourceCommunityEndpointsRestClient.CreateListByCommunityResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _communityEndpointResourceCommunityEndpointsRestClient.CreateListByCommunityResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CommunityEndpointResource(Client, CommunityEndpointResourceData.DeserializeCommunityEndpointResourceData(e)), _communityEndpointResourceCommunityEndpointsClientDiagnostics, Pipeline, "CommunityEndpointResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _communityEndpointResourceCommunityEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new CommunityEndpointResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityEndpointName, nameof(communityEndpointName));
+
+ using var scope = _communityEndpointResourceCommunityEndpointsClientDiagnostics.CreateScope("CommunityEndpointResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _communityEndpointResourceCommunityEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, communityEndpointName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new CommunityEndpointResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceData.Serialization.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceData.Serialization.cs
new file mode 100644
index 000000000000..8e7f322b1469
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceData.Serialization.cs
@@ -0,0 +1,179 @@
+// 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;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ public partial class CommunityEndpointResourceData : 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 override 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(CommunityEndpointResourceData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ CommunityEndpointResourceData 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(CommunityEndpointResourceData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeCommunityEndpointResourceData(document.RootElement, options);
+ }
+
+ internal static CommunityEndpointResourceData DeserializeCommunityEndpointResourceData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ CommunityEndpointProperties properties = default;
+ IDictionary tags = default;
+ AzureLocation location = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = CommunityEndpointProperties.DeserializeCommunityEndpointProperties(property.Value, options);
+ 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 (property.NameEquals("location"u8))
+ {
+ location = new AzureLocation(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerVirtualEnclavesContext.Default);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new CommunityEndpointResourceData(
+ id,
+ name,
+ type,
+ systemData,
+ tags ?? new ChangeTrackingDictionary(),
+ location,
+ properties,
+ 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, AzureResourceManagerVirtualEnclavesContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(CommunityEndpointResourceData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ CommunityEndpointResourceData 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, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeCommunityEndpointResourceData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(CommunityEndpointResourceData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceData.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceData.cs
new file mode 100644
index 000000000000..a1493b1adf6a
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityEndpointResourceData.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A class representing the CommunityEndpointResource data model.
+ /// CommunityEndpoint Model Resource
+ ///
+ public partial class CommunityEndpointResourceData : TrackedResourceData
+ {
+ ///
+ /// 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 .
+ /// The location.
+ public CommunityEndpointResourceData(AzureLocation location) : base(location)
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// Keeps track of any properties unknown to the library.
+ internal CommunityEndpointResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CommunityEndpointProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal CommunityEndpointResourceData()
+ {
+ }
+
+ /// The resource-specific properties for this resource.
+ public CommunityEndpointProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResource.Serialization.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResource.Serialization.cs
new file mode 100644
index 000000000000..9d10d0afc0ea
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResource.Serialization.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ public partial class CommunityResource : IJsonModel
+ {
+ private static CommunityResourceData s_dataDeserializationInstance;
+ private static CommunityResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new();
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ CommunityResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerVirtualEnclavesContext.Default);
+
+ CommunityResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerVirtualEnclavesContext.Default);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResource.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResource.cs
new file mode 100644
index 000000000000..a5e6e454b471
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResource.cs
@@ -0,0 +1,929 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.VirtualEnclaves.Models;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A Class representing a CommunityResource along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetCommunityResource method.
+ /// Otherwise you can get one from its parent resource using the GetCommunityResource method.
+ ///
+ public partial class CommunityResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The communityName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string communityName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _communityResourceCommunityClientDiagnostics;
+ private readonly CommunityRestOperations _communityResourceCommunityRestClient;
+ private readonly CommunityResourceData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Mission/communities";
+
+ /// Initializes a new instance of the class for mocking.
+ public CommunityResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal CommunityResource(ArmClient client, CommunityResourceData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal CommunityResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _communityResourceCommunityClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.VirtualEnclaves", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string communityResourceCommunityApiVersion);
+ _communityResourceCommunityRestClient = new CommunityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, communityResourceCommunityApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual CommunityResourceData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ /// Gets a collection of TransitHubResources in the CommunityResource.
+ /// An object representing collection of TransitHubResources and their operations over a TransitHubResource.
+ public virtual TransitHubResourceCollection GetTransitHubResources()
+ {
+ return GetCachedClient(client => new TransitHubResourceCollection(client, Id));
+ }
+
+ ///
+ /// Get a TransitHubResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/transitHubs/{transitHubName}
+ ///
+ /// -
+ /// Operation Id
+ /// TransitHubResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the TransitHub Resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetTransitHubResourceAsync(string transitHubName, CancellationToken cancellationToken = default)
+ {
+ return await GetTransitHubResources().GetAsync(transitHubName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a TransitHubResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/transitHubs/{transitHubName}
+ ///
+ /// -
+ /// Operation Id
+ /// TransitHubResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the TransitHub Resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetTransitHubResource(string transitHubName, CancellationToken cancellationToken = default)
+ {
+ return GetTransitHubResources().Get(transitHubName, cancellationToken);
+ }
+
+ /// Gets a collection of CommunityEndpointResources in the CommunityResource.
+ /// An object representing collection of CommunityEndpointResources and their operations over a CommunityEndpointResource.
+ public virtual CommunityEndpointResourceCollection GetCommunityEndpointResources()
+ {
+ return GetCachedClient(client => new CommunityEndpointResourceCollection(client, Id));
+ }
+
+ ///
+ /// Get a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetCommunityEndpointResourceAsync(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ return await GetCommunityEndpointResources().GetAsync(communityEndpointName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a CommunityEndpointResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/communityEndpoints/{communityEndpointName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityEndpointResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Community Endpoint Resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetCommunityEndpointResource(string communityEndpointName, CancellationToken cancellationToken = default)
+ {
+ return GetCommunityEndpointResources().Get(communityEndpointName, cancellationToken);
+ }
+
+ ///
+ /// Get a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(_communityResourceCommunityClientDiagnostics, Pipeline, _communityResourceCommunityRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(_communityResourceCommunityClientDiagnostics, Pipeline, _communityResourceCommunityRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, CommunityResourcePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new CommunityResourceOperationSource(Client), _communityResourceCommunityClientDiagnostics, Pipeline, _communityResourceCommunityRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, CommunityResourcePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new CommunityResourceOperationSource(Client), _communityResourceCommunityClientDiagnostics, Pipeline, _communityResourceCommunityRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks that the IP Address Space to be allocated for this Community is available.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/checkAddressSpaceAvailability
+ ///
+ /// -
+ /// Operation Id
+ /// Community_CheckAddressSpaceAvailability
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Check IP Address Space request body.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> CheckAddressSpaceAvailabilityAsync(CheckAddressSpaceAvailabilityContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.CheckAddressSpaceAvailability");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.CheckAddressSpaceAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks that the IP Address Space to be allocated for this Community is available.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}/checkAddressSpaceAvailability
+ ///
+ /// -
+ /// Operation Id
+ /// Community_CheckAddressSpaceAvailability
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Check IP Address Space request body.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response CheckAddressSpaceAvailability(CheckAddressSpaceAvailabilityContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.CheckAddressSpaceAvailability");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.CheckAddressSpaceAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues[key] = value;
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _communityResourceCommunityRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new CommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new CommunityResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues[key] = value;
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _communityResourceCommunityRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new CommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new CommunityResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _communityResourceCommunityRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new CommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new CommunityResourcePatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken);
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _communityResourceCommunityRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new CommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new CommunityResourcePatch();
+ patch.Tags.ReplaceWith(tags);
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.Remove(key);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _communityResourceCommunityRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new CommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new CommunityResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.Remove(key);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _communityResourceCommunityRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new CommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new CommunityResourcePatch();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken);
+ return Response.FromValue(result.Value, result.GetRawResponse());
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResourceCollection.cs b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResourceCollection.cs
new file mode 100644
index 000000000000..10c75c61bd3d
--- /dev/null
+++ b/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/src/Generated/CommunityResourceCollection.cs
@@ -0,0 +1,494 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.VirtualEnclaves
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetCommunityResources method from an instance of .
+ ///
+ public partial class CommunityResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _communityResourceCommunityClientDiagnostics;
+ private readonly CommunityRestOperations _communityResourceCommunityRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected CommunityResourceCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal CommunityResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _communityResourceCommunityClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.VirtualEnclaves", CommunityResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(CommunityResource.ResourceType, out string communityResourceCommunityApiVersion);
+ _communityResourceCommunityRestClient = new CommunityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, communityResourceCommunityApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceGroupResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the communityResource Resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string communityName, CommunityResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, communityName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new VirtualEnclavesArmOperation(new CommunityResourceOperationSource(Client), _communityResourceCommunityClientDiagnostics, Pipeline, _communityResourceCommunityRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, communityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the communityResource Resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string communityName, CommunityResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, communityName, data, cancellationToken);
+ var operation = new VirtualEnclavesArmOperation(new CommunityResourceOperationSource(Client), _communityResourceCommunityClientDiagnostics, Pipeline, _communityResourceCommunityRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, communityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the communityResource Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string communityName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, communityName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a CommunityResource
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the communityResource Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string communityName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, communityName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CommunityResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List CommunityResource resources by resource group
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _communityResourceCommunityRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _communityResourceCommunityRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CommunityResource(Client, CommunityResourceData.DeserializeCommunityResourceData(e)), _communityResourceCommunityClientDiagnostics, Pipeline, "CommunityResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List CommunityResource resources by resource group
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _communityResourceCommunityRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _communityResourceCommunityRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CommunityResource(Client, CommunityResourceData.DeserializeCommunityResourceData(e)), _communityResourceCommunityClientDiagnostics, Pipeline, "CommunityResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the communityResource Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string communityName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, communityName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the communityResource Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string communityName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, communityName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the communityResource Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string communityName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _communityResourceCommunityRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, communityName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new CommunityResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Mission/communities/{communityName}
+ ///
+ /// -
+ /// Operation Id
+ /// CommunityResource_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2025-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the communityResource Resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string communityName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(communityName, nameof(communityName));
+
+ using var scope = _communityResourceCommunityClientDiagnostics.CreateScope("CommunityResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _communityResourceCommunityRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, communityName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new CommunityResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable