diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Azure.ResourceManager.ComputeFleet.sln b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Azure.ResourceManager.ComputeFleet.sln
new file mode 100644
index 000000000000..c5dc18f0662c
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Azure.ResourceManager.ComputeFleet.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.ComputeFleet", "src\Azure.ResourceManager.ComputeFleet.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.ComputeFleet.Tests", "tests\Azure.ResourceManager.ComputeFleet.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/CHANGELOG.md b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/CHANGELOG.md
new file mode 100644
index 000000000000..13dd08af78ab
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Directory.Build.props b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/README.md b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/README.md
new file mode 100644
index 000000000000..db5b7d21f435
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/README.md
@@ -0,0 +1,86 @@
+# Azure.ResourceManager.ComputeFleet client library for .NET
+
+Azure.ResourceManager.ComputeFleet is a managed service that helps developers get secret simply and securely.
+
+Use the client library for to:
+
+* [Get secret](https://docs.microsoft.com/azure)
+
+[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples]
+
+ [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure)
+
+## Getting started
+
+This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
+
+### Install the package
+
+First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository.
+
+Install the client library for .NET with [NuGet](https://www.nuget.org/ ):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.ComputeFleet --prerelease
+```
+
+### Prerequisites
+
+Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
+
+> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`.
+
+### Authenticate the client
+
+If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
+
+For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
+
+## Key concepts
+
+The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
+
+Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of:
+
+### Thread safety
+
+We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
+
+### Additional concepts
+
+[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) |
+[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) |
+[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) |
+[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) |
+[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) |
+[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) |
+[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/)
+
+
+## Examples
+
+You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/computefleet/Azure.ResourceManager.ComputeFleet/samples).
+
+## Troubleshooting
+
+Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
+
+Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
+
+If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
+
+## Next steps
+
+* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
+* If appropriate, point users to other packages that might be useful.
+* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
+
+## Contributing
+
+This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
+
+
+[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
+[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide
+
+
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Azure.ResourceManager.ComputeFleet.csproj b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Azure.ResourceManager.ComputeFleet.csproj
new file mode 100644
index 000000000000..281b606b1560
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Azure.ResourceManager.ComputeFleet.csproj
@@ -0,0 +1,21 @@
+
+
+ This is the Azure.ResourceManager.ComputeFleet client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.ResourceManager.ComputeFleet for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.ResourceManager.ComputeFleet
+ $(RequiredTargetFrameworks)
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs
new file mode 100644
index 000000000000..61792af23bb0
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ArmComputeFleetModelFactory.cs
@@ -0,0 +1,373 @@
+// 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;
+
+namespace Azure.ResourceManager.ComputeFleet.Models
+{
+ /// Model factory for models.
+ public static partial class ArmComputeFleetModelFactory
+ {
+ /// Initializes a new instance of .
+ /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations.
+ /// Localized display information for this particular operation.
+ /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system".
+ /// Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ /// A new instance for mocking.
+ public static Operation Operation(string name = null, bool? isDataAction = null, OperationDisplay display = null, Origin? origin = null, ActionType? actionType = null)
+ {
+ return new Operation(
+ name,
+ isDataAction,
+ display,
+ origin,
+ actionType,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute".
+ /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections".
+ /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine".
+ /// The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ /// A new instance for mocking.
+ public static OperationDisplay OperationDisplay(string provider = null, string resource = null, string operation = null, string description = null)
+ {
+ return new OperationDisplay(provider, resource, operation, description, 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.
+ /// Zones in which the Compute Fleet is available.
+ /// The managed service identities assigned to this resource.
+ /// Details of the resource plan.
+ /// A new instance for mocking.
+ public static FleetData FleetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, FleetProperties properties = null, IEnumerable zones = null, ManagedServiceIdentity identity = null, ArmPlan plan = null)
+ {
+ tags ??= new Dictionary();
+ zones ??= new List();
+
+ return new FleetData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ zones?.ToList(),
+ identity,
+ plan,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The status of the last operation.
+ /// Configuration Options for Spot instances in Compute Fleet.
+ /// Configuration Options for Regular instances in Compute Fleet.
+ /// List of VM sizes supported for Compute Fleet.
+ /// Compute Profile to use for running user's workloads.
+ /// Specifies the time at which the Compute Fleet is created.
+ /// Specifies the ID which uniquely identifies a Compute Fleet.
+ /// A new instance for mocking.
+ public static FleetProperties FleetProperties(ProvisioningState? provisioningState = null, SpotPriorityProfile spotPriorityProfile = null, RegularPriorityProfile regularPriorityProfile = null, IEnumerable vmSizesProfile = null, ComputeProfile computeProfile = null, DateTimeOffset? timeCreated = null, string uniqueId = null)
+ {
+ vmSizesProfile ??= new List();
+
+ return new FleetProperties(
+ provisioningState,
+ spotPriorityProfile,
+ regularPriorityProfile,
+ vmSizesProfile?.ToList(),
+ computeProfile,
+ timeCreated,
+ uniqueId,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// Specifies the operating system settings for the virtual machines in the scale
+ /// set.
+ ///
+ /// Specifies the storage settings for the virtual machine disks.
+ ///
+ /// Specifies properties of the network interfaces of the virtual machines in the
+ /// scale set.
+ ///
+ ///
+ /// Specifies the Security related profile settings for the virtual machines in the
+ /// scale set.
+ ///
+ /// Specifies the boot diagnostic settings state.
+ ///
+ /// Specifies a collection of settings for extensions installed on virtual machines
+ /// in the scale set.
+ ///
+ ///
+ /// Specifies that the image or disk that is being used was licensed on-premises.
+ /// <br><br> Possible values for Windows Server operating system are: <br><br>
+ /// Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux
+ /// Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS
+ /// (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for
+ /// Windows
+ /// Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
+ /// <br><br> [Azure Hybrid Use Benefit for Linux
+ /// Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
+ /// <br><br> Minimum api-version: 2015-06-15
+ ///
+ /// Specifies Scheduled Event related configurations.
+ ///
+ /// UserData for the virtual machines in the scale set, which must be base-64
+ /// encoded. Customer should not pass any secrets in here. Minimum api-version:
+ /// 2021-03-01.
+ ///
+ ///
+ /// Specifies the capacity reservation related details of a scale set. Minimum
+ /// api-version: 2021-04-01.
+ ///
+ /// Specifies the gallery applications that should be made available to the VM/VMSS.
+ ///
+ /// Specifies the hardware profile related details of a scale set. Minimum
+ /// api-version: 2021-11-01.
+ ///
+ ///
+ /// Specifies the service artifact reference id used to set same image version for
+ /// all virtual machines in the scale set when using 'latest' image version.
+ /// Minimum api-version: 2022-11-01
+ ///
+ ///
+ /// Specifies the security posture to be used for all virtual machines in the scale
+ /// set. Minimum api-version: 2023-03-01
+ ///
+ ///
+ /// Specifies the time in which this VM profile for the Virtual Machine Scale Set
+ /// was created. Minimum API version for this property is 2023-09-01. This value
+ /// will be added to VMSS Flex VM tags when creating/updating the VMSS VM Profile
+ /// with minimum api-version 2023-09-01. Examples: "2024-07-01T00:00:01.1234567+00:00"
+ ///
+ /// A new instance for mocking.
+ public static BaseVirtualMachineProfile BaseVirtualMachineProfile(VirtualMachineScaleSetOSProfile osProfile = null, VirtualMachineScaleSetStorageProfile storageProfile = null, VirtualMachineScaleSetNetworkProfile networkProfile = null, SecurityProfile securityProfile = null, BootDiagnostics bootDiagnostics = null, VirtualMachineScaleSetExtensionProfile extensionProfile = null, string licenseType = null, ScheduledEventsProfile scheduledEventsProfile = null, string userData = null, ResourceIdentifier capacityReservationGroupId = null, IEnumerable galleryApplications = null, VmSizeProperties hardwareVmSizeProperties = null, ResourceIdentifier serviceArtifactReferenceId = null, SecurityPostureReference securityPostureReference = null, DateTimeOffset? timeCreated = null)
+ {
+ galleryApplications ??= new List();
+
+ return new BaseVirtualMachineProfile(
+ osProfile,
+ storageProfile,
+ networkProfile,
+ securityProfile,
+ bootDiagnostics != null ? new DiagnosticsProfile(bootDiagnostics, serializedAdditionalRawData: null) : null,
+ extensionProfile,
+ licenseType,
+ scheduledEventsProfile,
+ userData,
+ capacityReservationGroupId != null ? new CapacityReservationProfile(ResourceManagerModelFactory.WritableSubResource(capacityReservationGroupId), serializedAdditionalRawData: null) : null,
+ galleryApplications != null ? new ApplicationProfile(galleryApplications?.ToList(), serializedAdditionalRawData: null) : null,
+ hardwareVmSizeProperties != null ? new VirtualMachineScaleSetHardwareProfile(hardwareVmSizeProperties, serializedAdditionalRawData: null) : null,
+ serviceArtifactReferenceId != null ? ResourceManagerModelFactory.WritableSubResource(serviceArtifactReferenceId) : null,
+ securityPostureReference,
+ timeCreated,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Resource Id.
+ /// The image publisher.
+ ///
+ /// Specifies the offer of the platform image or marketplace image used to create
+ /// the virtual machine.
+ ///
+ /// The image SKU.
+ ///
+ /// Specifies the version of the platform image or marketplace image used to create
+ /// the virtual machine. The allowed formats are Major.Minor.Build or 'latest'.
+ /// Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest
+ /// version of an image available at deploy time. Even if you use 'latest', the VM
+ /// image will not automatically update after deploy time even if a new version
+ /// becomes available. Please do not use field 'version' for gallery image
+ /// deployment, gallery image should always use 'id' field for deployment, to use 'latest'
+ /// version of gallery image, just set
+ /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'
+ /// in the 'id' field without version input.
+ ///
+ ///
+ /// Specifies in decimal numbers, the version of platform image or marketplace
+ /// image used to create the virtual machine. This readonly field differs from 'version',
+ /// only if the value specified in 'version' field is 'latest'.
+ ///
+ ///
+ /// Specified the shared gallery image unique id for vm deployment. This can be
+ /// fetched from shared gallery image GET call.
+ ///
+ ///
+ /// Specified the community gallery image unique id for vm deployment. This can be
+ /// fetched from community gallery image GET call.
+ ///
+ /// A new instance for mocking.
+ public static ImageReference ImageReference(ResourceIdentifier id = null, string publisher = null, string offer = null, string sku = null, string version = null, string exactVersion = null, string sharedGalleryImageId = null, string communityGalleryImageId = null)
+ {
+ return new ImageReference(
+ id,
+ publisher,
+ offer,
+ sku,
+ version,
+ exactVersion,
+ sharedGalleryImageId,
+ communityGalleryImageId,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Resource Id.
+ /// The name of the extension.
+ /// Resource type.
+ /// Describes the properties of a Virtual Machine Scale Set Extension.
+ /// A new instance for mocking.
+ public static VirtualMachineScaleSetExtension VirtualMachineScaleSetExtension(ResourceIdentifier id = null, string name = null, string type = null, VirtualMachineScaleSetExtensionProperties properties = null)
+ {
+ return new VirtualMachineScaleSetExtension(id, name, type, properties, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// If a value is provided and is different from the previous value, the extension
+ /// handler will be forced to update even if the extension configuration has not
+ /// changed.
+ ///
+ /// The name of the extension handler publisher.
+ /// Specifies the type of the extension; an example is "CustomScriptExtension".
+ /// Specifies the version of the script handler.
+ ///
+ /// Indicates whether the extension should use a newer minor version if one is
+ /// available at deployment time. Once deployed, however, the extension will not
+ /// upgrade minor versions unless redeployed, even with this property set to true.
+ ///
+ ///
+ /// Indicates whether the extension should be automatically upgraded by the
+ /// platform if there is a newer version of the extension available.
+ ///
+ /// Json formatted public settings for the extension.
+ ///
+ /// The extension can contain either protectedSettings or
+ /// protectedSettingsFromKeyVault or no protected settings at all.
+ ///
+ /// The provisioning state, which only appears in the response.
+ ///
+ /// Collection of extension names after which this extension needs to be
+ /// provisioned.
+ ///
+ ///
+ /// Indicates whether failures stemming from the extension will be suppressed
+ /// (Operational failures such as not connecting to the VM will not be suppressed
+ /// regardless of this value). The default is false.
+ ///
+ ///
+ /// The extensions protected settings that are passed by reference, and consumed
+ /// from key vault
+ ///
+ /// A new instance for mocking.
+ public static VirtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties(string forceUpdateTag = null, string publisher = null, string type = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = null, bool? enableAutomaticUpgrade = null, IDictionary settings = null, IDictionary protectedSettings = null, string provisioningState = null, IEnumerable provisionAfterExtensions = null, bool? suppressFailures = null, KeyVaultSecretReference protectedSettingsFromKeyVault = null)
+ {
+ settings ??= new Dictionary();
+ protectedSettings ??= new Dictionary();
+ provisionAfterExtensions ??= new List();
+
+ return new VirtualMachineScaleSetExtensionProperties(
+ forceUpdateTag,
+ publisher,
+ type,
+ typeHandlerVersion,
+ autoUpgradeMinorVersion,
+ enableAutomaticUpgrade,
+ settings,
+ protectedSettings,
+ provisioningState,
+ provisionAfterExtensions?.ToList(),
+ suppressFailures,
+ protectedSettingsFromKeyVault,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
+ /// The type of managed identity assigned to this resource.
+ /// The identities assigned to this resource by the user.
+ /// A new instance for mocking.
+ public static ManagedServiceIdentity ManagedServiceIdentity(Guid? principalId = null, Guid? tenantId = null, ManagedServiceIdentityType type = default, IDictionary userAssignedIdentities = null)
+ {
+ userAssignedIdentities ??= new Dictionary();
+
+ return new ManagedServiceIdentity(principalId, tenantId, type, userAssignedIdentities, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The compute RP resource id of the virtualMachineScaleSet
+ /// "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}"
+ ///
+ /// Type of the virtualMachineScaleSet.
+ /// This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource.
+ /// Error Information when `operationStatus` is `Failed`.
+ /// A new instance for mocking.
+ public static VirtualMachineScaleSet VirtualMachineScaleSet(string id = null, string type = null, ProvisioningState operationStatus = default, ApiError error = null)
+ {
+ return new VirtualMachineScaleSet(id, type, operationStatus, error, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The error code.
+ /// The target of the particular error.
+ /// The error message.
+ /// The API error details.
+ /// The API inner error.
+ /// A new instance for mocking.
+ public static ApiError ApiError(string code = null, string target = null, string message = null, IEnumerable details = null, InnerError innererror = null)
+ {
+ details ??= new List();
+
+ return new ApiError(
+ code,
+ target,
+ message,
+ details?.ToList(),
+ innererror,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The error code.
+ /// The target of the particular error.
+ /// The error message.
+ /// A new instance for mocking.
+ public static ApiErrorBase ApiErrorBase(string code = null, string target = null, string message = null)
+ {
+ return new ApiErrorBase(code, target, message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The exception type.
+ /// The internal error message or exception dump.
+ /// A new instance for mocking.
+ public static InnerError InnerError(string exceptionType = null, string errorDetail = null)
+ {
+ return new InnerError(exceptionType, errorDetail, serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs
new file mode 100644
index 000000000000..e01913aa6c86
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/ComputeFleetExtensions.cs
@@ -0,0 +1,289 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.ResourceManager.ComputeFleet.Mocking;
+using Azure.ResourceManager.ComputeFleet.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ /// A class to add extension methods to Azure.ResourceManager.ComputeFleet.
+ public static partial class ComputeFleetExtensions
+ {
+ private static MockableComputeFleetArmClient GetMockableComputeFleetArmClient(ArmClient client)
+ {
+ return client.GetCachedClient(client0 => new MockableComputeFleetArmClient(client0));
+ }
+
+ private static MockableComputeFleetResourceGroupResource GetMockableComputeFleetResourceGroupResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableComputeFleetResourceGroupResource(client, resource.Id));
+ }
+
+ private static MockableComputeFleetSubscriptionResource GetMockableComputeFleetSubscriptionResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableComputeFleetSubscriptionResource(client, resource.Id));
+ }
+
+ private static MockableComputeFleetTenantResource GetMockableComputeFleetTenantResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableComputeFleetTenantResource(client, resource.Id));
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static FleetResource GetFleetResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableComputeFleetArmClient(client).GetFleetResource(id);
+ }
+
+ ///
+ /// Gets a collection of FleetResources in the ResourceGroupResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// is null.
+ /// An object representing collection of FleetResources and their operations over a FleetResource.
+ public static FleetCollection GetFleets(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableComputeFleetResourceGroupResource(resourceGroupResource).GetFleets();
+ }
+
+ ///
+ /// Get a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableComputeFleetResourceGroupResource(resourceGroupResource).GetFleetAsync(fleetName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableComputeFleetResourceGroupResource(resourceGroupResource).GetFleet(fleetName, cancellationToken);
+ }
+
+ ///
+ /// List Fleet resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleet_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableComputeFleetSubscriptionResource(subscriptionResource).GetFleetsAsync(cancellationToken);
+ }
+
+ ///
+ /// List Fleet resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleet_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableComputeFleetSubscriptionResource(subscriptionResource).GetFleets(cancellationToken);
+ }
+
+ ///
+ /// List the operations for the provider
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.AzureFleet/operations
+ ///
+ /// -
+ /// Operation Id
+ /// Operations_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetOperationsAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableComputeFleetTenantResource(tenantResource).GetOperationsAsync(cancellationToken);
+ }
+
+ ///
+ /// List the operations for the provider
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.AzureFleet/operations
+ ///
+ /// -
+ /// Operation Id
+ /// Operations_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetOperations(this TenantResource tenantResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableComputeFleetTenantResource(tenantResource).GetOperations(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetArmClient.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetArmClient.cs
new file mode 100644
index 000000000000..1c776a0d20d4
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetArmClient.cs
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.ResourceManager.ComputeFleet.Mocking
+{
+ /// A class to add extension methods to ArmClient.
+ public partial class MockableComputeFleetArmClient : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableComputeFleetArmClient()
+ {
+ }
+
+ /// 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 MockableComputeFleetArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ internal MockableComputeFleetArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual FleetResource GetFleetResource(ResourceIdentifier id)
+ {
+ FleetResource.ValidateResourceId(id);
+ return new FleetResource(Client, id);
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs
new file mode 100644
index 000000000000..fe7041973b60
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetResourceGroupResource.cs
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+
+namespace Azure.ResourceManager.ComputeFleet.Mocking
+{
+ /// A class to add extension methods to ResourceGroupResource.
+ public partial class MockableComputeFleetResourceGroupResource : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableComputeFleetResourceGroupResource()
+ {
+ }
+
+ /// 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 MockableComputeFleetResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ /// Gets a collection of FleetResources in the ResourceGroupResource.
+ /// An object representing collection of FleetResources and their operations over a FleetResource.
+ public virtual FleetCollection GetFleets()
+ {
+ return GetCachedClient(client => new FleetCollection(client, Id));
+ }
+
+ ///
+ /// Get a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetFleetAsync(string fleetName, CancellationToken cancellationToken = default)
+ {
+ return await GetFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetFleet(string fleetName, CancellationToken cancellationToken = default)
+ {
+ return GetFleets().Get(fleetName, cancellationToken);
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs
new file mode 100644
index 000000000000..f8f646ff27ff
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetSubscriptionResource.cs
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ComputeFleet.Mocking
+{
+ /// A class to add extension methods to SubscriptionResource.
+ public partial class MockableComputeFleetSubscriptionResource : ArmResource
+ {
+ private ClientDiagnostics _fleetClientDiagnostics;
+ private FleetsRestOperations _fleetRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MockableComputeFleetSubscriptionResource()
+ {
+ }
+
+ /// 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 MockableComputeFleetSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics FleetClientDiagnostics => _fleetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ComputeFleet", FleetResource.ResourceType.Namespace, Diagnostics);
+ private FleetsRestOperations FleetRestClient => _fleetRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(FleetResource.ResourceType));
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// List Fleet resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleet_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 GetFleetsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "MockableComputeFleetSubscriptionResource.GetFleets", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List Fleet resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleet_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetFleets(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "MockableComputeFleetSubscriptionResource.GetFleets", "value", "nextLink", cancellationToken);
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetTenantResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetTenantResource.cs
new file mode 100644
index 000000000000..22cae0520e95
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Extensions/MockableComputeFleetTenantResource.cs
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.ComputeFleet.Models;
+
+namespace Azure.ResourceManager.ComputeFleet.Mocking
+{
+ /// A class to add extension methods to TenantResource.
+ public partial class MockableComputeFleetTenantResource : ArmResource
+ {
+ private ClientDiagnostics _operationsClientDiagnostics;
+ private OperationsRestOperations _operationsRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MockableComputeFleetTenantResource()
+ {
+ }
+
+ /// 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 MockableComputeFleetTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics OperationsClientDiagnostics => _operationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ComputeFleet", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private OperationsRestOperations OperationsRestClient => _operationsRestClient ??= new OperationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// List the operations for the provider
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.AzureFleet/operations
+ ///
+ /// -
+ /// Operation Id
+ /// Operations_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetOperationsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest();
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Models.Operation.DeserializeOperation(e), OperationsClientDiagnostics, Pipeline, "MockableComputeFleetTenantResource.GetOperations", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List the operations for the provider
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.AzureFleet/operations
+ ///
+ /// -
+ /// Operation Id
+ /// Operations_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetOperations(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest();
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Models.Operation.DeserializeOperation(e), OperationsClientDiagnostics, Pipeline, "MockableComputeFleetTenantResource.GetOperations", "value", "nextLink", cancellationToken);
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetCollection.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetCollection.cs
new file mode 100644
index 000000000000..43ecac9036d4
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetCollection.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.ComputeFleet
+{
+ ///
+ /// 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 GetFleets method from an instance of .
+ ///
+ public partial class FleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _fleetClientDiagnostics;
+ private readonly FleetsRestOperations _fleetRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected FleetCollection()
+ {
+ }
+
+ /// 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 FleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ComputeFleet", FleetResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(FleetResource.ResourceType, out string fleetApiVersion);
+ _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion);
+#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 Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 Compute Fleet.
+ /// 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 fleetName, FleetData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _fleetRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ComputeFleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, 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 Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 Compute Fleet.
+ /// 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 fleetName, FleetData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _fleetRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, cancellationToken);
+ var operation = new ComputeFleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List Fleet resources by resource group
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleet_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List Fleet resources by resource group
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets
+ ///
+ /// -
+ /// Operation Id
+ /// Fleet_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, 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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, 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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new FleetResource(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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Compute Fleet.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new FleetResource(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/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetData.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetData.Serialization.cs
new file mode 100644
index 000000000000..3759b2a587a8
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetData.Serialization.cs
@@ -0,0 +1,276 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.ComputeFleet.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ public partial class FleetData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(FleetData)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ if (Optional.IsCollectionDefined(Zones))
+ {
+ writer.WritePropertyName("zones"u8);
+ writer.WriteStartArray();
+ foreach (var item in Zones)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(Identity))
+ {
+ writer.WritePropertyName("identity"u8);
+ writer.WriteObjectValue(Identity, options);
+ }
+ if (Optional.IsDefined(Plan))
+ {
+ writer.WritePropertyName("plan"u8);
+ JsonSerializer.Serialize(writer, Plan);
+ }
+ if (Optional.IsCollectionDefined(Tags))
+ {
+ writer.WritePropertyName("tags"u8);
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WritePropertyName("location"u8);
+ writer.WriteStringValue(Location);
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("id"u8);
+ writer.WriteStringValue(Id);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("type"u8);
+ writer.WriteStringValue(ResourceType);
+ }
+ if (options.Format != "W" && Optional.IsDefined(SystemData))
+ {
+ writer.WritePropertyName("systemData"u8);
+ JsonSerializer.Serialize(writer, SystemData);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ FleetData 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(FleetData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeFleetData(document.RootElement, options);
+ }
+
+ internal static FleetData DeserializeFleetData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ FleetProperties properties = default;
+ IList zones = default;
+ Models.ManagedServiceIdentity identity = default;
+ ArmPlan plan = 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 = FleetProperties.DeserializeFleetProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("zones"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(item.GetString());
+ }
+ zones = array;
+ continue;
+ }
+ if (property.NameEquals("identity"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ identity = Models.ManagedServiceIdentity.DeserializeManagedServiceIdentity(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("plan"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ plan = JsonSerializer.Deserialize(property.Value.GetRawText());
+ 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 = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new FleetData(
+ id,
+ name,
+ type,
+ systemData,
+ tags ?? new ChangeTrackingDictionary(),
+ location,
+ properties,
+ zones ?? new ChangeTrackingList(),
+ identity,
+ plan,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(FleetData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ FleetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeFleetData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(FleetData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetData.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetData.cs
new file mode 100644
index 000000000000..9d243a949720
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetData.cs
@@ -0,0 +1,96 @@
+// 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.ComputeFleet.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ ///
+ /// A class representing the Fleet data model.
+ /// An Compute Fleet resource
+ ///
+ public partial class FleetData : 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 FleetData(AzureLocation location) : base(location)
+ {
+ Zones = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// Zones in which the Compute Fleet is available.
+ /// The managed service identities assigned to this resource.
+ /// Details of the resource plan.
+ /// Keeps track of any properties unknown to the library.
+ internal FleetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, FleetProperties properties, IList zones, Models.ManagedServiceIdentity identity, ArmPlan plan, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ {
+ Properties = properties;
+ Zones = zones;
+ Identity = identity;
+ Plan = plan;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal FleetData()
+ {
+ }
+
+ /// The resource-specific properties for this resource.
+ public FleetProperties Properties { get; set; }
+ /// Zones in which the Compute Fleet is available.
+ public IList Zones { get; }
+ /// The managed service identities assigned to this resource.
+ public Models.ManagedServiceIdentity Identity { get; set; }
+ /// Details of the resource plan.
+ public ArmPlan Plan { get; set; }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetResource.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetResource.Serialization.cs
new file mode 100644
index 000000000000..cea9381c3c7c
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetResource.Serialization.cs
@@ -0,0 +1,26 @@
+// 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.ComputeFleet
+{
+ public partial class FleetResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ FleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ FleetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetResource.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetResource.cs
new file mode 100644
index 000000000000..627ed783ea04
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/FleetResource.cs
@@ -0,0 +1,768 @@
+// 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 Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.ComputeFleet.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ ///
+ /// A Class representing a Fleet 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 GetFleetResource method.
+ /// Otherwise you can get one from its parent resource using the GetFleet method.
+ ///
+ public partial class FleetResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The fleetName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _fleetClientDiagnostics;
+ private readonly FleetsRestOperations _fleetRestClient;
+ private readonly FleetData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.AzureFleet/fleets";
+
+ /// Initializes a new instance of the class for mocking.
+ protected FleetResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal FleetResource(ArmClient client, FleetData 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 FleetResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ComputeFleet", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string fleetApiVersion);
+ _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion);
+#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 FleetData 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 Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _fleetRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ComputeFleetArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.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 Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _fleetRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var operation = new ComputeFleetArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.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 Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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, FleetPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _fleetRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new ComputeFleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.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 Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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, FleetPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _fleetRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken);
+ var operation = new ComputeFleetArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.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;
+ }
+ }
+
+ ///
+ /// List VirtualMachineScaleSet resources by Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets
+ ///
+ /// -
+ /// Operation Id
+ /// VirtualMachineScaleSet_ListVirtualMachineScaleSets
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 GetVirtualMachineScaleSetsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetRestClient.CreateListVirtualMachineScaleSetsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListVirtualMachineScaleSetsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualMachineScaleSet.DeserializeVirtualMachineScaleSet(e), _fleetClientDiagnostics, Pipeline, "FleetResource.GetVirtualMachineScaleSets", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List VirtualMachineScaleSet resources by Fleet
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets
+ ///
+ /// -
+ /// Operation Id
+ /// VirtualMachineScaleSet_ListVirtualMachineScaleSets
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-05-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetVirtualMachineScaleSets(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetRestClient.CreateListVirtualMachineScaleSetsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListVirtualMachineScaleSetsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualMachineScaleSet.DeserializeVirtualMachineScaleSet(e), _fleetClientDiagnostics, Pipeline, "FleetResource.GetVirtualMachineScaleSets", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new FleetPatch();
+ 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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new FleetPatch();
+ 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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new FleetPatch();
+ 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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new FleetPatch();
+ 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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new FleetPatch();
+ 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.AzureFleet/fleets/{fleetName}
+ ///
+ /// -
+ /// Operation Id
+ /// Fleets_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-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 = _fleetClientDiagnostics.CreateScope("FleetResource.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 = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new FleetPatch();
+ 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/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/Argument.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..a0a6cf71885f
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..aa7e5ec8f7e0
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ public bool IsUndefined => _innerDictionary == null;
+
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+
+ IEnumerable IReadOnlyDictionary.Values => Values;
+
+ public IEnumerator> GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator> enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureDictionary().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(KeyValuePair item)
+ {
+ EnsureDictionary().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureDictionary().Clear();
+ }
+
+ public bool Contains(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Contains(item);
+ }
+
+ public void CopyTo(KeyValuePair[] array, int index)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureDictionary().CopyTo(array, index);
+ }
+
+ public bool Remove(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(item);
+ }
+
+ public void Add(TKey key, TValue value)
+ {
+ EnsureDictionary().Add(key, value);
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().ContainsKey(key);
+ }
+
+ public bool Remove(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(key);
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ if (IsUndefined)
+ {
+ value = default;
+ return false;
+ }
+ return EnsureDictionary().TryGetValue(key, out value);
+ }
+
+ public IDictionary EnsureDictionary()
+ {
+ return _innerDictionary ??= new Dictionary();
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ChangeTrackingList.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ChangeTrackingList.cs
new file mode 100644
index 000000000000..95357b568c62
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ChangeTrackingList.cs
@@ -0,0 +1,153 @@
+// 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.Linq;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ internal class ChangeTrackingList : IList, IReadOnlyList
+ {
+ private IList _innerList;
+
+ public ChangeTrackingList()
+ {
+ }
+
+ public ChangeTrackingList(IList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList;
+ }
+ }
+
+ public ChangeTrackingList(IReadOnlyList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList.ToList();
+ }
+ }
+
+ public bool IsUndefined => _innerList == null;
+
+ public int Count => IsUndefined ? 0 : EnsureList().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+
+ public T this[int index]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ return EnsureList()[index];
+ }
+ set
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList()[index] = value;
+ }
+ }
+
+ public void Reset()
+ {
+ _innerList = null;
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureList().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(T item)
+ {
+ EnsureList().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureList().Clear();
+ }
+
+ public bool Contains(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Contains(item);
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureList().CopyTo(array, arrayIndex);
+ }
+
+ public bool Remove(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Remove(item);
+ }
+
+ public int IndexOf(T item)
+ {
+ if (IsUndefined)
+ {
+ return -1;
+ }
+ return EnsureList().IndexOf(item);
+ }
+
+ public void Insert(int index, T item)
+ {
+ EnsureList().Insert(index, item);
+ }
+
+ public void RemoveAt(int index)
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList().RemoveAt(index);
+ }
+
+ public IList EnsureList()
+ {
+ return _innerList ??= new List();
+ }
+ }
+}
diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 000000000000..2c90832af748
--- /dev/null
+++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -0,0 +1,398 @@
+// 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.Diagnostics;
+using System.Globalization;
+using System.Text.Json;
+using System.Xml;
+using Azure.Core;
+
+namespace Azure.ResourceManager.ComputeFleet
+{
+ internal static class ModelSerializationExtensions
+ {
+ internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
+
+ public static object GetObject(this JsonElement element)
+ {
+ switch (element.ValueKind)
+ {
+ case JsonValueKind.String:
+ return element.GetString();
+ case JsonValueKind.Number:
+ if (element.TryGetInt32(out int intValue))
+ {
+ return intValue;
+ }
+ if (element.TryGetInt64(out long longValue))
+ {
+ return longValue;
+ }
+ return element.GetDouble();
+ case JsonValueKind.True:
+ return true;
+ case JsonValueKind.False:
+ return false;
+ case JsonValueKind.Undefined:
+ case JsonValueKind.Null:
+ return null;
+ case JsonValueKind.Object:
+ var dictionary = new Dictionary();
+ foreach (var jsonProperty in element.EnumerateObject())
+ {
+ dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject());
+ }
+ return dictionary;
+ case JsonValueKind.Array:
+ var list = new List