diff --git a/@azure-typespec/http-client-csharp-mgmt/Microsoft.StorageDiscovery.sln b/@azure-typespec/http-client-csharp-mgmt/Microsoft.StorageDiscovery.sln
new file mode 100644
index 000000000000..bd0e67160b89
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/Microsoft.StorageDiscovery.sln
@@ -0,0 +1,48 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.StorageDiscovery", "src\Microsoft.StorageDiscovery.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+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
+ {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/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MicrosoftStorageDiscoveryExtensions.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MicrosoftStorageDiscoveryExtensions.cs
new file mode 100644
index 000000000000..2719f50c9169
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MicrosoftStorageDiscoveryExtensions.cs
@@ -0,0 +1,113 @@
+// 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;
+using Azure.Core;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+using Microsoft.StorageDiscovery.Mocking;
+
+namespace Microsoft.StorageDiscovery
+{
+ /// A class to add extension methods to Microsoft.StorageDiscovery.
+ public static partial class MicrosoftStorageDiscoveryExtensions
+ {
+ ///
+ private static MockableMicrosoftStorageDiscoveryArmClient GetMockableMicrosoftStorageDiscoveryArmClient(ArmClient client)
+ {
+ return client.GetCachedClient(client0 => new MockableMicrosoftStorageDiscoveryArmClient(client0, ResourceIdentifier.Root));
+ }
+
+ ///
+ private static MockableMicrosoftStorageDiscoveryResourceGroupResource GetMockableMicrosoftStorageDiscoveryResourceGroupResource(ResourceGroupResource resourceGroupResource)
+ {
+ return resourceGroupResource.GetCachedClient(client => new MockableMicrosoftStorageDiscoveryResourceGroupResource(client, resourceGroupResource.Id));
+ }
+
+ ///
+ private static MockableMicrosoftStorageDiscoverySubscriptionResource GetMockableMicrosoftStorageDiscoverySubscriptionResource(SubscriptionResource subscriptionResource)
+ {
+ return subscriptionResource.GetCachedClient(client => new MockableMicrosoftStorageDiscoverySubscriptionResource(client, subscriptionResource.Id));
+ }
+
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// The the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static StorageDiscoveryWorkspaceResource GetStorageDiscoveryWorkspaceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableMicrosoftStorageDiscoveryArmClient(client).GetStorageDiscoveryWorkspaceResource(id);
+ }
+
+ /// Gets a collection of StorageDiscoveryWorkspaces in the .
+ /// The the method will execute against.
+ /// is null.
+ /// An object representing collection of StorageDiscoveryWorkspaces and their operations over a StorageDiscoveryWorkspaceResource.
+ public static StorageDiscoveryWorkspaceCollection GetStorageDiscoveryWorkspaces(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableMicrosoftStorageDiscoveryResourceGroupResource(resourceGroupResource).GetStorageDiscoveryWorkspaces();
+ }
+
+ /// Get a StorageDiscoveryWorkspace.
+ /// The the method will execute against.
+ /// The name of the StorageDiscoveryWorkspace.
+ /// The cancellation token to use.
+ /// is null.
+ [ForwardsClientCalls]
+ public static async Task> GetStorageDiscoveryWorkspaceAsync(this ResourceGroupResource resourceGroupResource, string storageDiscoveryWorkspaceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableMicrosoftStorageDiscoveryResourceGroupResource(resourceGroupResource).GetStorageDiscoveryWorkspaceAsync(storageDiscoveryWorkspaceName, cancellationToken).ConfigureAwait(false);
+ }
+
+ /// Get a StorageDiscoveryWorkspace.
+ /// The the method will execute against.
+ /// The name of the StorageDiscoveryWorkspace.
+ /// The cancellation token to use.
+ /// is null.
+ [ForwardsClientCalls]
+ public static Response GetStorageDiscoveryWorkspace(this ResourceGroupResource resourceGroupResource, string storageDiscoveryWorkspaceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableMicrosoftStorageDiscoveryResourceGroupResource(resourceGroupResource).GetStorageDiscoveryWorkspace(storageDiscoveryWorkspaceName, cancellationToken);
+ }
+
+ /// List StorageDiscoveryWorkspace resources by subscription ID.
+ /// The 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 AsyncPageable GetStorageDiscoveryWorkspacesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableMicrosoftStorageDiscoverySubscriptionResource(subscriptionResource).GetStorageDiscoveryWorkspacesAsync(cancellationToken);
+ }
+
+ /// List StorageDiscoveryWorkspace resources by subscription ID.
+ /// The 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 GetStorageDiscoveryWorkspaces(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableMicrosoftStorageDiscoverySubscriptionResource(subscriptionResource).GetStorageDiscoveryWorkspaces(cancellationToken);
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoveryArmClient.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoveryArmClient.cs
new file mode 100644
index 000000000000..bd7e1121450e
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoveryArmClient.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+using Azure.ResourceManager;
+using Microsoft.StorageDiscovery;
+
+namespace Microsoft.StorageDiscovery.Mocking
+{
+ /// A class to add extension methods to .
+ public partial class MockableMicrosoftStorageDiscoveryArmClient : ArmResource
+ {
+ /// Initializes a new instance of MockableMicrosoftStorageDiscoveryArmClient for mocking.
+ protected MockableMicrosoftStorageDiscoveryArmClient()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableMicrosoftStorageDiscoveryArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual StorageDiscoveryWorkspaceResource GetStorageDiscoveryWorkspaceResource(ResourceIdentifier id)
+ {
+ StorageDiscoveryWorkspaceResource.ValidateResourceId(id);
+ return new StorageDiscoveryWorkspaceResource(Client, id);
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoveryResourceGroupResource.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoveryResourceGroupResource.cs
new file mode 100644
index 000000000000..3379329555cc
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoveryResourceGroupResource.cs
@@ -0,0 +1,67 @@
+// 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;
+using Azure.Core;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+using Microsoft.StorageDiscovery;
+
+namespace Microsoft.StorageDiscovery.Mocking
+{
+ /// A class to add extension methods to .
+ public partial class MockableMicrosoftStorageDiscoveryResourceGroupResource : ArmResource
+ {
+ /// Initializes a new instance of MockableMicrosoftStorageDiscoveryResourceGroupResource for mocking.
+ protected MockableMicrosoftStorageDiscoveryResourceGroupResource()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableMicrosoftStorageDiscoveryResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ /// Gets a collection of StorageDiscoveryWorkspaces in the .
+ /// An object representing collection of StorageDiscoveryWorkspaces and their operations over a StorageDiscoveryWorkspaceResource.
+ public virtual StorageDiscoveryWorkspaceCollection GetStorageDiscoveryWorkspaces()
+ {
+ return GetCachedClient(client => new StorageDiscoveryWorkspaceCollection(client, Id));
+ }
+
+ /// Get a StorageDiscoveryWorkspace.
+ /// The name of the StorageDiscoveryWorkspace.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetStorageDiscoveryWorkspaceAsync(string storageDiscoveryWorkspaceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageDiscoveryWorkspaceName, nameof(storageDiscoveryWorkspaceName));
+
+ return await GetStorageDiscoveryWorkspaces().GetAsync(storageDiscoveryWorkspaceName, cancellationToken).ConfigureAwait(false);
+ }
+
+ /// Get a StorageDiscoveryWorkspace.
+ /// The name of the StorageDiscoveryWorkspace.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetStorageDiscoveryWorkspace(string storageDiscoveryWorkspaceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageDiscoveryWorkspaceName, nameof(storageDiscoveryWorkspaceName));
+
+ return GetStorageDiscoveryWorkspaces().Get(storageDiscoveryWorkspaceName, cancellationToken);
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoverySubscriptionResource.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoverySubscriptionResource.cs
new file mode 100644
index 000000000000..9095113771ea
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Extensions/MockableMicrosoftStorageDiscoverySubscriptionResource.cs
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+using Microsoft.StorageDiscovery;
+
+namespace Microsoft.StorageDiscovery.Mocking
+{
+ /// A class to add extension methods to .
+ public partial class MockableMicrosoftStorageDiscoverySubscriptionResource : ArmResource
+ {
+ private ClientDiagnostics _storageDiscoveryWorkspacesClientDiagnostics;
+ private StorageDiscoveryWorkspaces _storageDiscoveryWorkspacesRestClient;
+
+ /// Initializes a new instance of MockableMicrosoftStorageDiscoverySubscriptionResource for mocking.
+ protected MockableMicrosoftStorageDiscoverySubscriptionResource()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableMicrosoftStorageDiscoverySubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics StorageDiscoveryWorkspacesClientDiagnostics => _storageDiscoveryWorkspacesClientDiagnostics ??= new ClientDiagnostics("Microsoft.StorageDiscovery.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+
+ private StorageDiscoveryWorkspaces StorageDiscoveryWorkspacesRestClient => _storageDiscoveryWorkspacesRestClient ??= new StorageDiscoveryWorkspaces(StorageDiscoveryWorkspacesClientDiagnostics, Pipeline, Endpoint, "2025-09-01");
+
+ /// List StorageDiscoveryWorkspace resources by subscription ID.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetStorageDiscoveryWorkspacesAsync(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new StorageDiscoveryWorkspacesGetBySubscriptionAsyncCollectionResultOfT(StorageDiscoveryWorkspacesRestClient, Guid.Parse(Id.SubscriptionId), context), data => new StorageDiscoveryWorkspaceResource(Client, data));
+ }
+
+ /// List StorageDiscoveryWorkspace resources by subscription ID.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetStorageDiscoveryWorkspaces(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new PageableWrapper(new StorageDiscoveryWorkspacesGetBySubscriptionCollectionResultOfT(StorageDiscoveryWorkspacesRestClient, Guid.Parse(Id.SubscriptionId), context), data => new StorageDiscoveryWorkspaceResource(Client, data));
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/Argument.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..c7260eec7a9c
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/Argument.cs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Microsoft.StorageDiscovery
+{
+ internal static partial class Argument
+ {
+ /// The value.
+ /// The name.
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ /// The value.
+ /// The name.
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ /// The value.
+ /// The 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);
+ }
+ }
+
+ /// The value.
+ /// The 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);
+ }
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/AsyncPageableWrapper.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/AsyncPageableWrapper.cs
new file mode 100644
index 000000000000..0deac7b7e634
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/AsyncPageableWrapper.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+
+namespace Microsoft.StorageDiscovery
+{
+ internal partial class AsyncPageableWrapper : AsyncPageable
+ {
+ /// The source async pageable value of type AsyncPageable<T>.
+ private AsyncPageable _source;
+ /// The converter function from T to U.
+ private Func _converter;
+
+ /// Initializes a new instance of the AsyncPageableWrapper class.
+ /// The source async pageable value of type AsyncPageable<T>.
+ /// The converter function from T to U.
+ public AsyncPageableWrapper(AsyncPageable source, Func converter)
+ {
+ _source = source;
+ _converter = converter;
+ }
+
+ /// Converts the pages from AsyncPageable to Page.
+ /// A continuation token from a previous response.
+ /// An optional hint to specify the desired size of each page.
+ /// An enumerable of pages containing converted items of type U.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ await foreach (Page page in _source.AsPages(continuationToken, pageSizeHint).ConfigureAwait(false))
+ {
+ List convertedItems = new List();
+ foreach (T item in page.Values)
+ {
+ convertedItems.Add(_converter.Invoke(item));
+ }
+ yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse());
+ }
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ChangeTrackingDictionary.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..44660b537314
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,189 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Microsoft.StorageDiscovery
+{
+ internal partial class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary
+ where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ /// The inner dictionary.
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ /// The inner dictionary.
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ /// Gets the IsUndefined.
+ public bool IsUndefined => _innerDictionary == null;
+
+ /// Gets the Count.
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ /// Gets the IsReadOnly.
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ /// Gets the Keys.
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ /// Gets the Values.
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ /// Gets or sets the value associated with the specified key.
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ /// Gets the Keys.
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+
+ /// Gets the Values.
+ IEnumerable IReadOnlyDictionary.Values => Values;
+
+ public IEnumerator> GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator> enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureDictionary().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ /// The item to add.
+ public void Add(KeyValuePair item)
+ {
+ EnsureDictionary().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureDictionary().Clear();
+ }
+
+ /// The item to search for.
+ public bool Contains(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Contains(item);
+ }
+
+ /// The array to copy.
+ /// The index.
+ public void CopyTo(KeyValuePair[] array, int index)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureDictionary().CopyTo(array, index);
+ }
+
+ /// The item to remove.
+ public bool Remove(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(item);
+ }
+
+ /// The key.
+ /// The value to add.
+ public void Add(TKey key, TValue value)
+ {
+ EnsureDictionary().Add(key, value);
+ }
+
+ /// The key to search for.
+ public bool ContainsKey(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().ContainsKey(key);
+ }
+
+ /// The key.
+ public bool Remove(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(key);
+ }
+
+ /// The key to search for.
+ /// The value.
+ 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/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ChangeTrackingList.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ChangeTrackingList.cs
new file mode 100644
index 000000000000..94f96904e4ee
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ChangeTrackingList.cs
@@ -0,0 +1,168 @@
+// 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 Microsoft.StorageDiscovery
+{
+ internal partial class ChangeTrackingList : IList, IReadOnlyList
+ {
+ private IList _innerList;
+
+ public ChangeTrackingList()
+ {
+ }
+
+ /// The inner list.
+ public ChangeTrackingList(IList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList;
+ }
+ }
+
+ /// The inner list.
+ public ChangeTrackingList(IReadOnlyList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList.ToList();
+ }
+ }
+
+ /// Gets the IsUndefined.
+ public bool IsUndefined => _innerList == null;
+
+ /// Gets the Count.
+ public int Count => IsUndefined ? 0 : EnsureList().Count;
+
+ /// Gets the IsReadOnly.
+ public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+
+ /// Gets or sets the value associated with the specified key.
+ 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();
+ }
+
+ /// The item to add.
+ public void Add(T item)
+ {
+ EnsureList().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureList().Clear();
+ }
+
+ /// The item.
+ public bool Contains(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Contains(item);
+ }
+
+ /// The array to copy to.
+ /// The array index.
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureList().CopyTo(array, arrayIndex);
+ }
+
+ /// The item.
+ public bool Remove(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Remove(item);
+ }
+
+ /// The item.
+ public int IndexOf(T item)
+ {
+ if (IsUndefined)
+ {
+ return -1;
+ }
+ return EnsureList().IndexOf(item);
+ }
+
+ /// The inner list.
+ /// The item.
+ public void Insert(int index, T item)
+ {
+ EnsureList().Insert(index, item);
+ }
+
+ /// The inner list.
+ 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/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ClientPipelineExtensions.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ClientPipelineExtensions.cs
new file mode 100644
index 000000000000..1a84f9bfc76f
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ClientPipelineExtensions.cs
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Microsoft.StorageDiscovery
+{
+ internal static partial class ClientPipelineExtensions
+ {
+ public static async ValueTask ProcessMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse();
+ await pipeline.SendAsync(message, userCancellationToken).ConfigureAwait(false);
+
+ if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow)
+ {
+ throw new RequestFailedException(message.Response);
+ }
+
+ return message.Response;
+ }
+
+ public static Response ProcessMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse();
+ pipeline.Send(message, userCancellationToken);
+
+ if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow)
+ {
+ throw new RequestFailedException(message.Response);
+ }
+
+ return message.Response;
+ }
+
+ public static async ValueTask> ProcessHeadAsBoolMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ Response response = await pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ switch (response.Status)
+ {
+ case >= 200 and < 300:
+ return Response.FromValue(true, response);
+ case >= 400 and < 500:
+ return Response.FromValue(false, response);
+ default:
+ return new ErrorResult(response, new RequestFailedException(response));
+ }
+ }
+
+ public static Response ProcessHeadAsBoolMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ Response response = pipeline.ProcessMessage(message, context);
+ switch (response.Status)
+ {
+ case >= 200 and < 300:
+ return Response.FromValue(true, response);
+ case >= 400 and < 500:
+ return Response.FromValue(false, response);
+ default:
+ return new ErrorResult(response, new RequestFailedException(response));
+ }
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenMemberAttribute.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenMemberAttribute.cs
new file mode 100644
index 000000000000..c5d2e6a19e26
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenMemberAttribute.cs
@@ -0,0 +1,20 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Microsoft.StorageDiscovery
+{
+ [AttributeUsage((AttributeTargets.Property | AttributeTargets.Field))]
+ internal partial class CodeGenMemberAttribute : CodeGenTypeAttribute
+ {
+ /// The original name of the member.
+ public CodeGenMemberAttribute(string originalName) : base(originalName)
+ {
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenSerializationAttribute.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenSerializationAttribute.cs
new file mode 100644
index 000000000000..20b926cc781d
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenSerializationAttribute.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Microsoft.StorageDiscovery
+{
+ [AttributeUsage((AttributeTargets.Class | AttributeTargets.Struct), AllowMultiple = true, Inherited = true)]
+ internal partial class CodeGenSerializationAttribute : Attribute
+ {
+ /// The property name which these hooks apply to.
+ public CodeGenSerializationAttribute(string propertyName)
+ {
+ PropertyName = propertyName;
+ }
+
+ /// The property name which these hooks apply to.
+ /// The serialization name of the property.
+ public CodeGenSerializationAttribute(string propertyName, string propertySerializationName)
+ {
+ PropertyName = propertyName;
+ PropertySerializationName = propertySerializationName;
+ }
+
+ /// Gets or sets the property name which these hooks should apply to.
+ public string PropertyName { get; }
+
+ /// Gets or sets the serialization name of the property.
+ public string PropertySerializationName { get; set; }
+
+ ///
+ /// Gets or sets the method name to use when serializing the property value (property name excluded).
+ /// The signature of the serialization hook method must be or compatible with when invoking: private void SerializeHook(Utf8JsonWriter writer);
+ ///
+ public string SerializationValueHook { get; set; }
+
+ ///
+ /// Gets or sets the method name to use when deserializing the property value from the JSON.
+ /// private static void DeserializationHook(JsonProperty property, ref TypeOfTheProperty propertyValue); // if the property is required
+ /// private static void DeserializationHook(JsonProperty property, ref Optional<TypeOfTheProperty> propertyValue); // if the property is optional
+ ///
+ public string DeserializationValueHook { get; set; }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenSuppressAttribute.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenSuppressAttribute.cs
new file mode 100644
index 000000000000..dad1dd66a81d
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenSuppressAttribute.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Microsoft.StorageDiscovery
+{
+ [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct), AllowMultiple = true)]
+ internal partial class CodeGenSuppressAttribute : Attribute
+ {
+ /// The member to suppress.
+ /// The types of the parameters of the member.
+ public CodeGenSuppressAttribute(string member, params Type[] parameters)
+ {
+ Member = member;
+ Parameters = parameters;
+ }
+
+ /// Gets the Member.
+ public string Member { get; }
+
+ /// Gets the Parameters.
+ public Type[] Parameters { get; }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenTypeAttribute.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenTypeAttribute.cs
new file mode 100644
index 000000000000..23b88c4ed4ce
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/CodeGenTypeAttribute.cs
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Microsoft.StorageDiscovery
+{
+ [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct))]
+ internal partial class CodeGenTypeAttribute : Attribute
+ {
+ /// The original name of the type.
+ public CodeGenTypeAttribute(string originalName)
+ {
+ OriginalName = originalName;
+ }
+
+ /// Gets the OriginalName.
+ public string OriginalName { get; }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ErrorResult.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ErrorResult.cs
new file mode 100644
index 000000000000..7236b57f3963
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ErrorResult.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure;
+
+namespace Microsoft.StorageDiscovery
+{
+ internal partial class ErrorResult : Response
+ {
+ private readonly Response _response;
+ private readonly RequestFailedException _exception;
+
+ public ErrorResult(Response response, RequestFailedException exception)
+ {
+ _response = response;
+ _exception = exception;
+ }
+
+ /// Gets the Value.
+ public override T Value => throw _exception;
+
+ ///
+ public override Response GetRawResponse()
+ {
+ return _response;
+ }
+ }
+}
diff --git a/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ModelSerializationExtensions.cs b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 000000000000..84f97c482758
--- /dev/null
+++ b/@azure-typespec/http-client-csharp-mgmt/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -0,0 +1,258 @@
+// 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;
+
+namespace Microsoft.StorageDiscovery
+{
+ internal static partial class ModelSerializationExtensions
+ {
+ internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
+ internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions
+ {
+ MaxDepth = 256
+ };
+
+ 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:
+ Dictionary dictionary = new Dictionary();
+ foreach (var jsonProperty in element.EnumerateObject())
+ {
+ dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject());
+ }
+ return dictionary;
+ case JsonValueKind.Array:
+ List