diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/Azure.ResourceManager.Discovery.sln b/sdk/discovery/Azure.ResourceManager.Discovery/Azure.ResourceManager.Discovery.sln
new file mode 100644
index 000000000000..f71ba0d29b33
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/Azure.ResourceManager.Discovery.sln
@@ -0,0 +1,100 @@
+
+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}") = "Azure.ResourceManager.Discovery", "src\Azure.ResourceManager.Discovery.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Discovery.Tests", "tests\Azure.ResourceManager.Discovery.Tests.csproj", "{A7C0B959-5161-4CA8-B542-92EB679A5EDF}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{CDC66078-4846-4E23-ADA7-76740F3E6403}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Core", "..\..\core\Azure.Core\src\Azure.Core.csproj", "{CE85CC40-178B-49BF-98F9-039314D6F465}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.SdkAnalyzers", "..\..\tools\Azure.SdkAnalyzers\src\Azure.SdkAnalyzers.csproj", "{F5037015-A169-41C8-BC40-EFF20782A207}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {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}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|x64.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|x86.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
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|x64.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|x64.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|x86.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|x86.Build.0 = Release|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Debug|x64.Build.0 = Debug|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Debug|x86.Build.0 = Debug|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Release|x64.ActiveCfg = Release|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Release|x64.Build.0 = Release|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Release|x86.ActiveCfg = Release|Any CPU
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF}.Release|x86.Build.0 = Release|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Debug|x64.Build.0 = Debug|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Debug|x86.Build.0 = Debug|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Release|x64.ActiveCfg = Release|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Release|x64.Build.0 = Release|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Release|x86.ActiveCfg = Release|Any CPU
+ {CDC66078-4846-4E23-ADA7-76740F3E6403}.Release|x86.Build.0 = Release|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Debug|x64.Build.0 = Debug|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Debug|x86.Build.0 = Debug|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Release|x64.ActiveCfg = Release|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Release|x64.Build.0 = Release|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Release|x86.ActiveCfg = Release|Any CPU
+ {CE85CC40-178B-49BF-98F9-039314D6F465}.Release|x86.Build.0 = Release|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Debug|x64.Build.0 = Debug|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Debug|x86.Build.0 = Debug|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Release|x64.ActiveCfg = Release|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Release|x64.Build.0 = Release|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Release|x86.ActiveCfg = Release|Any CPU
+ {F5037015-A169-41C8-BC40-EFF20782A207}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {A7C0B959-5161-4CA8-B542-92EB679A5EDF} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/CHANGELOG.md b/sdk/discovery/Azure.ResourceManager.Discovery/CHANGELOG.md
new file mode 100644
index 000000000000..f50dd6a1a0bf
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/CHANGELOG.md
@@ -0,0 +1,12 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/Directory.Build.props b/sdk/discovery/Azure.ResourceManager.Discovery/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/README.md b/sdk/discovery/Azure.ResourceManager.Discovery/README.md
new file mode 100644
index 000000000000..a5adb50d7cee
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/README.md
@@ -0,0 +1,80 @@
+# Microsoft Azure Discovery management client library for .NET
+
+**[Describe the service briefly first.]**
+
+This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+## Getting started
+
+### Install the package
+
+Install the Microsoft Azure Discovery management library for .NET with [NuGet](https://www.nuget.org/):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.Discovery --prerelease
+```
+
+### Prerequisites
+
+* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/).
+
+### Authenticate the Client
+
+To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+
+## Key concepts
+
+Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html)
+
+## Documentation
+
+Documentation is available to help you learn how to use this package:
+
+- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet).
+- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md).
+
+## Examples
+
+Code samples for using the management library for .NET can be found in the following locations
+- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples)
+
+## Troubleshooting
+
+- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues).
+- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags.
+
+## Next steps
+
+For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/).
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing
+guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions
+require you to agree to a Contributor License Agreement (CLA) declaring
+that you have the right to, and actually do, grant us the rights to use
+your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine
+whether you need to provide a CLA and decorate the PR appropriately
+(for example, label, comment). Follow the instructions provided by the
+bot. You'll only need to do this action once across all repositories
+using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For
+more information, see the [Code of Conduct FAQ][coc_faq] or contact
+ with any other questions or comments.
+
+
+[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/metadata.json b/sdk/discovery/Azure.ResourceManager.Discovery/metadata.json
new file mode 100644
index 000000000000..5d567444d94a
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/metadata.json
@@ -0,0 +1,5 @@
+{
+ "apiVersions": {
+ "Microsoft.Discovery": "2026-02-01-preview"
+ }
+}
\ No newline at end of file
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Azure.ResourceManager.Discovery.csproj b/sdk/discovery/Azure.ResourceManager.Discovery/src/Azure.ResourceManager.Discovery.csproj
new file mode 100644
index 000000000000..842cb82e057a
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Azure.ResourceManager.Discovery.csproj
@@ -0,0 +1,9 @@
+
+
+ This is the Azure.ResourceManager.Discovery client library for developing .NET applications with rich experience.
+ SDK Code Generation Azure.ResourceManager.Discovery
+ 1.0.0-beta.1
+ Azure.ResourceManager.Discovery
+ true
+
+
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/ArmDiscoveryModelFactory.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/ArmDiscoveryModelFactory.cs
new file mode 100644
index 000000000000..855883cf9607
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/ArmDiscoveryModelFactory.cs
@@ -0,0 +1,575 @@
+// 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;
+using Azure.Core;
+using Azure.ResourceManager.Discovery;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Discovery.Models
+{
+ /// A factory class for creating instances of the models for mocking.
+ public static partial class ArmDiscoveryModelFactory
+ {
+
+ /// Bookshelf tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static BookshelfData BookshelfData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, BookshelfProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new BookshelfData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// The status of the last operation.
+ /// User assigned identity IDs to be used by knowledgebase workloads. The key value must be the resource ID of the identity resource.
+ /// Whether or not to use a customer managed key when encrypting data at rest.
+ /// The key to use for encrypting data at rest when customer managed keys are enabled. Required if Customer Managed Keys is enabled.
+ /// The Log Analytics Cluster to use for debug logs. This is required when Customer Managed Keys are enabled.
+ /// List of private endpoint connections.
+ /// Whether or not public network access is allowed for this resource. For security reasons, it is recommended to disable it whenever possible.
+ /// Private Endpoint Subnet ID for private endpoint connections.
+ /// Search Subnet ID for search resources.
+ /// The resource group for resources managed on behalf of customer.
+ /// Managed-On-Behalf-Of broker resources.
+ /// The bookshelf data plane API URI.
+ /// A new instance for mocking.
+ public static BookshelfProperties BookshelfProperties(ProvisioningState? provisioningState = default, IDictionary workloadIdentities = default, CustomerManagedKeys? customerManagedKeys = default, BookshelfKeyVaultProperties keyVaultProperties = default, ResourceIdentifier logAnalyticsClusterId = default, IEnumerable privateEndpointConnections = default, PublicNetworkAccess? publicNetworkAccess = default, ResourceIdentifier privateEndpointSubnetId = default, ResourceIdentifier searchSubnetId = default, string managedResourceGroup = default, IEnumerable managedOnBehalfOfMoboBrokerResources = default, Uri bookshelfUri = default)
+ {
+ workloadIdentities ??= new ChangeTrackingDictionary();
+ privateEndpointConnections ??= new ChangeTrackingList();
+
+ return new BookshelfProperties(
+ provisioningState,
+ workloadIdentities,
+ customerManagedKeys,
+ keyVaultProperties,
+ logAnalyticsClusterId,
+ privateEndpointConnections.ToList(),
+ publicNetworkAccess,
+ privateEndpointSubnetId,
+ searchSubnetId,
+ managedResourceGroup,
+ managedOnBehalfOfMoboBrokerResources is null ? default : new WithMoboBrokerResources((managedOnBehalfOfMoboBrokerResources ?? new ChangeTrackingList()).ToList(), null),
+ bookshelfUri,
+ additionalBinaryDataProperties: null);
+ }
+
+ /// The private endpoint connection resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// The private endpoint connection properties.
+ /// A new instance for mocking.
+ public static DiscoveryPrivateEndpointConnection DiscoveryPrivateEndpointConnection(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, PrivateEndpointConnectionProperties properties = default)
+ {
+ return new DiscoveryPrivateEndpointConnection(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ properties);
+ }
+
+ /// The group ids for the private endpoint resource.
+ /// The resource identifier of the private endpoint.
+ /// A collection of information about the state of the connection between service consumer and provider.
+ /// The provisioning state of the private endpoint connection resource.
+ /// A new instance for mocking.
+ public static PrivateEndpointConnectionProperties PrivateEndpointConnectionProperties(IEnumerable groupIds = default, ResourceIdentifier privateEndpointId = default, DiscoveryPrivateLinkServiceConnectionState privateLinkServiceConnectionState = default, DiscoveryPrivateEndpointConnectionProvisioningState? provisioningState = default)
+ {
+ groupIds ??= new ChangeTrackingList();
+
+ return new PrivateEndpointConnectionProperties(groupIds.ToList(), privateEndpointId is null ? default : new PrivateEndpoint(privateEndpointId, null), privateLinkServiceConnectionState, provisioningState, additionalBinaryDataProperties: null);
+ }
+
+ /// Managed-On-Behalf-Of broker resource. This resource is created by the Resource Provider to manage some resources on behalf of the user.
+ /// Resource identifier of a Managed-On-Behalf-Of broker resource.
+ /// A new instance for mocking.
+ public static MoboBrokerResource MoboBrokerResource(ResourceIdentifier id = default)
+ {
+ return new MoboBrokerResource(id, additionalBinaryDataProperties: null);
+ }
+
+ /// The Private Endpoint Connection resource for Bookshelf.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static BookshelfPrivateEndpointConnectionData BookshelfPrivateEndpointConnectionData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, PrivateEndpointConnectionProperties properties = default)
+ {
+ return new BookshelfPrivateEndpointConnectionData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ properties);
+ }
+
+ /// A private link resource for Bookshelf.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static BookshelfPrivateLinkResourceData BookshelfPrivateLinkResourceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, DiscoveryPrivateLinkResourceProperties properties = default)
+ {
+ return new BookshelfPrivateLinkResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ properties);
+ }
+
+ /// Properties of a private link resource.
+ /// The private link resource group id.
+ /// The private link resource required member names.
+ /// The private link resource private link DNS zone name.
+ /// A new instance for mocking.
+ public static DiscoveryPrivateLinkResourceProperties DiscoveryPrivateLinkResourceProperties(string groupId = default, IEnumerable requiredMembers = default, IEnumerable requiredZoneNames = default)
+ {
+ requiredMembers ??= new ChangeTrackingList();
+ requiredZoneNames ??= new ChangeTrackingList();
+
+ return new DiscoveryPrivateLinkResourceProperties(groupId, requiredMembers.ToList(), requiredZoneNames.ToList(), additionalBinaryDataProperties: null);
+ }
+
+ /// Tool tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ToolData ToolData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ToolProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new ToolData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// Discovery Tool list item properties.
+ /// The status of the last operation.
+ /// The version of a resource definition.
+ /// Environment variables to make available.
+ /// The JSON content for defining a resource.
+ /// A new instance for mocking.
+ public static ToolProperties ToolProperties(ProvisioningState? provisioningState = default, string version = default, IDictionary environmentVariables = default, IDictionary definitionContent = default)
+ {
+ environmentVariables ??= new ChangeTrackingDictionary();
+ definitionContent ??= new ChangeTrackingDictionary();
+
+ return new ToolProperties(provisioningState, version, environmentVariables, definitionContent, additionalBinaryDataProperties: null);
+ }
+
+ /// Project tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ProjectData ProjectData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ProjectProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new ProjectData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// The status of the last operation.
+ /// Foundry project endpoint URI.
+ /// Allowed StorageContainers (Control plane resource references).
+ /// Default preferences to guide AI behaviors in this project.
+ /// A new instance for mocking.
+ public static ProjectProperties ProjectProperties(ProvisioningState? provisioningState = default, Uri foundryProjectEndpoint = default, IEnumerable storageContainerIds = default, string behaviorPreferences = default)
+ {
+ storageContainerIds ??= new ChangeTrackingList();
+
+ return new ProjectProperties(provisioningState, foundryProjectEndpoint, storageContainerIds.ToList(), behaviorPreferences is null ? default : new ProjectSettings(behaviorPreferences, null), additionalBinaryDataProperties: null);
+ }
+
+ /// Workspace tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static WorkspaceData WorkspaceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, WorkspaceProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new WorkspaceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// The status of the last operation.
+ /// List of linked SuperComputers.
+ /// workspace API endpoint Uri.
+ /// workspace User Interface Uri.
+ /// Identity IDs used for leveraging Workspace resources.
+ /// Whether or not to use a customer managed key when encrypting data at rest.
+ /// The key to use for encrypting data at rest when customer managed keys are enabled.
+ /// The Log Analytics Cluster to use for debug logs. This is required when Customer Managed Keys are enabled.
+ /// List of private endpoint connections.
+ /// Whether or not public network access is allowed for this resource. For security reasons, it is recommended to disable it whenever possible.
+ /// Agent Subnet ID for agent resources.
+ /// Private Endpoint Subnet ID for private endpoint connections.
+ /// Function Subnet ID for workspace resources.
+ /// The resource group for resources managed on behalf of customer.
+ /// Managed-On-Behalf-Of broker resources.
+ /// A new instance for mocking.
+ public static WorkspaceProperties WorkspaceProperties(ProvisioningState? provisioningState = default, IEnumerable supercomputerIds = default, Uri workspaceApiUri = default, Uri workspaceUiUri = default, Identity workspaceIdentity = default, CustomerManagedKeys? customerManagedKeys = default, KeyVaultProperties keyVaultProperties = default, ResourceIdentifier logAnalyticsClusterId = default, IEnumerable privateEndpointConnections = default, PublicNetworkAccess? publicNetworkAccess = default, ResourceIdentifier agentSubnetId = default, ResourceIdentifier privateEndpointSubnetId = default, ResourceIdentifier workspaceSubnetId = default, string managedResourceGroup = default, IEnumerable managedOnBehalfOfMoboBrokerResources = default)
+ {
+ supercomputerIds ??= new ChangeTrackingList();
+ privateEndpointConnections ??= new ChangeTrackingList();
+
+ return new WorkspaceProperties(
+ provisioningState,
+ supercomputerIds.ToList(),
+ workspaceApiUri,
+ workspaceUiUri,
+ workspaceIdentity,
+ customerManagedKeys,
+ keyVaultProperties,
+ logAnalyticsClusterId,
+ privateEndpointConnections.ToList(),
+ publicNetworkAccess,
+ agentSubnetId,
+ privateEndpointSubnetId,
+ workspaceSubnetId,
+ managedResourceGroup,
+ managedOnBehalfOfMoboBrokerResources is null ? default : new WithMoboBrokerResources((managedOnBehalfOfMoboBrokerResources ?? new ChangeTrackingList()).ToList(), null),
+ additionalBinaryDataProperties: null);
+ }
+
+ /// For user assigned identity resource property.
+ /// The resource ID of the user assigned identity.
+ /// The principal ID of the assigned identity.
+ /// The client ID of the assigned identity.
+ /// A new instance for mocking.
+ public static Identity Identity(ResourceIdentifier id = default, Guid? principalId = default, Guid? clientId = default)
+ {
+ return new Identity(id, principalId, clientId, additionalBinaryDataProperties: null);
+ }
+
+ /// The Private Endpoint Connection resource for Workspace.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static WorkspacePrivateEndpointConnectionData WorkspacePrivateEndpointConnectionData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, PrivateEndpointConnectionProperties properties = default)
+ {
+ return new WorkspacePrivateEndpointConnectionData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ properties);
+ }
+
+ /// Represents a deployment that ties a specific model family to a user defined deployment name used when invoking the chat model.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ChatModelDeploymentData ChatModelDeploymentData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ChatModelDeploymentProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new ChatModelDeploymentData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// Defines a deployment binding a specific model family to a user-defined deployment name for chat inference.
+ /// The status of the last operation.
+ /// Model format as published by the provider. Verify supported formats per region using the Model Catalog API.
+ /// Canonical provider model name available in the selected region. Verify supported values per region using the Model Catalog API.
+ /// A new instance for mocking.
+ public static ChatModelDeploymentProperties ChatModelDeploymentProperties(ProvisioningState? provisioningState = default, string modelFormat = default, string modelName = default)
+ {
+ return new ChatModelDeploymentProperties(provisioningState, modelFormat, modelName, additionalBinaryDataProperties: null);
+ }
+
+ /// A private link resource for Workspace.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static WorkspacePrivateLinkResourceData WorkspacePrivateLinkResourceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, DiscoveryPrivateLinkResourceProperties properties = default)
+ {
+ return new WorkspacePrivateLinkResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ properties);
+ }
+
+ /// NodePool tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static NodePoolData NodePoolData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, NodePoolProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new NodePoolData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// NodePool properties.
+ /// The status of the last operation.
+ /// The node pool subnet.
+ /// The size of the underlying Azure VM.
+ /// The maximum number of nodes.
+ /// The minimum number of nodes.
+ /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
+ /// A new instance for mocking.
+ public static NodePoolProperties NodePoolProperties(ProvisioningState? provisioningState = default, ResourceIdentifier subnetId = default, VmSize vmSize = default, int maxNodeCount = default, int? minNodeCount = default, ScaleSetPriority? scaleSetPriority = default)
+ {
+ return new NodePoolProperties(
+ provisioningState,
+ subnetId,
+ vmSize,
+ maxNodeCount,
+ minNodeCount,
+ scaleSetPriority,
+ additionalBinaryDataProperties: null);
+ }
+
+ /// Supercomputer tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static SupercomputerData SupercomputerData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, SupercomputerProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new SupercomputerData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// The status of the last operation.
+ ///
+ /// System Subnet ID associated with managed NodePool for system resources.
+ /// It should have connectivity to the child NodePool subnets.
+ ///
+ ///
+ /// System Subnet ID associated with AKS apiserver. Must be delegated to Microsoft.ContainerService/managedClusters.
+ /// It should have connectivity to the system subnet and nodepool subnets.
+ ///
+ ///
+ /// Network egress type provisioned for the supercomputer workloads.
+ /// Defaults to LoadBalancer if not specified.
+ /// If None is specified, the customer is responsible for providing outbound connectivity for Supercomputer functionality.
+ ///
+ /// The SKU to use for the system node pool.
+ /// Dictionary of identity properties.
+ /// Whether or not to use a customer managed key when encrypting data at rest.
+ /// Disk Encryption Set ID to use for Customer Managed Keys encryption. Required if Customer Managed Keys is enabled.
+ /// The Log Analytics Cluster to use for debug logs. This is required when Customer Managed Keys are enabled.
+ /// The resource group for resources managed on behalf of customer.
+ /// Managed-On-Behalf-Of broker resources.
+ /// A new instance for mocking.
+ public static SupercomputerProperties SupercomputerProperties(ProvisioningState? provisioningState = default, ResourceIdentifier subnetId = default, ResourceIdentifier managementSubnetId = default, NetworkEgressType? outboundType = default, SystemSku? systemSku = default, SupercomputerIdentities identities = default, CustomerManagedKeys? customerManagedKeys = default, ResourceIdentifier diskEncryptionSetId = default, ResourceIdentifier logAnalyticsClusterId = default, string managedResourceGroup = default, IEnumerable managedOnBehalfOfMoboBrokerResources = default)
+ {
+ return new SupercomputerProperties(
+ provisioningState,
+ subnetId,
+ managementSubnetId,
+ outboundType,
+ systemSku,
+ identities,
+ customerManagedKeys,
+ diskEncryptionSetId,
+ logAnalyticsClusterId,
+ managedResourceGroup,
+ managedOnBehalfOfMoboBrokerResources is null ? default : new WithMoboBrokerResources((managedOnBehalfOfMoboBrokerResources ?? new ChangeTrackingList()).ToList(), null),
+ additionalBinaryDataProperties: null);
+ }
+
+ /// Dictionary of identity properties for the Supercomputer.
+ /// Cluster identity ID.
+ ///
+ /// Kubelet identity ID used by the supercomputer.
+ /// This identity is used by the supercomputer at node level to access Azure resources.
+ /// This identity must have ManagedIdentityOperator role on the clusterIdentity.
+ ///
+ /// User assigned identity IDs to be used by workloads as federated credentials running on supercomputer. The key value must be the resource ID of the identity resource.
+ /// A new instance for mocking.
+ public static SupercomputerIdentities SupercomputerIdentities(Identity clusterIdentity = default, Identity kubeletIdentity = default, IDictionary workloadIdentities = default)
+ {
+ workloadIdentities ??= new ChangeTrackingDictionary();
+
+ return new SupercomputerIdentities(clusterIdentity, kubeletIdentity, workloadIdentities, additionalBinaryDataProperties: null);
+ }
+
+ /// Storage Asset tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static StorageAssetData StorageAssetData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, StorageAssetProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new StorageAssetData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// Storage Asset properties.
+ /// The description.
+ /// The status of the last operation.
+ /// The path to the data within its parent container. This should be relative to the root of the parent container.
+ /// A new instance for mocking.
+ public static StorageAssetProperties StorageAssetProperties(string description = default, ProvisioningState? provisioningState = default, string path = default)
+ {
+ return new StorageAssetProperties(description, provisioningState, path, additionalBinaryDataProperties: null);
+ }
+
+ /// Storage Container tracked resource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static StorageContainerData StorageContainerData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, StorageContainerProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new StorageContainerData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ tags,
+ location,
+ properties);
+ }
+
+ /// Storage Container properties.
+ /// The status of the last operation.
+ /// Storage store properties.
+ /// A new instance for mocking.
+ public static StorageContainerProperties StorageContainerProperties(ProvisioningState? provisioningState = default, StorageStore storageStore = default)
+ {
+ return new StorageContainerProperties(provisioningState, storageStore, additionalBinaryDataProperties: null);
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfCollection.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfCollection.cs
new file mode 100644
index 000000000000..1b5234eb4439
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfCollection.cs
@@ -0,0 +1,580 @@
+// 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.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.Discovery
+{
+ ///
+ /// 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 GetBookshelves method from an instance of .
+ ///
+ public partial class BookshelfCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _bookshelvesClientDiagnostics;
+ private readonly Bookshelves _bookshelvesRestClient;
+
+ /// Initializes a new instance of BookshelfCollection for mocking.
+ protected BookshelfCollection()
+ {
+ }
+
+ /// 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 BookshelfCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(BookshelfResource.ResourceType, out string bookshelfApiVersion);
+ _bookshelvesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Discovery", BookshelfResource.ResourceType.Namespace, Diagnostics);
+ _bookshelvesRestClient = new Bookshelves(_bookshelvesClientDiagnostics, Pipeline, Endpoint, bookshelfApiVersion ?? "2026-02-01-preview");
+ ValidateResourceId(id);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceGroupResource.ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id));
+ }
+ }
+
+ ///
+ /// Create a Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_CreateOrUpdate.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// 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 Bookshelf.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string bookshelfName, BookshelfData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, BookshelfData.ToRequestContent(data), context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfOperationSource(Client),
+ _bookshelvesClientDiagnostics,
+ Pipeline,
+ message.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 Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_CreateOrUpdate.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// 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 Bookshelf.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string bookshelfName, BookshelfData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, BookshelfData.ToRequestContent(data), context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfOperationSource(Client),
+ _bookshelvesClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletion(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Bookshelf.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetAsync(string bookshelfName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Bookshelf.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Get(string bookshelfName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List Bookshelf resources by resource group
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_ListByResourceGroup.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new BookshelvesGetByResourceGroupAsyncCollectionResultOfT(_bookshelvesRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, context), data => new BookshelfResource(Client, data));
+ }
+
+ ///
+ /// List Bookshelf resources by resource group
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_ListByResourceGroup.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new PageableWrapper(new BookshelvesGetByResourceGroupCollectionResultOfT(_bookshelvesRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, context), data => new BookshelfResource(Client, data));
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Bookshelf.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> ExistsAsync(string bookshelfName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ 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.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Bookshelf.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Exists(string bookshelfName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ 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.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Bookshelf.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetIfExistsAsync(string bookshelfName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfResource(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.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Bookshelf.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual NullableResponse GetIfExists(string bookshelfName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bookshelfName, nameof(bookshelfName));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, bookshelfName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ /// The cancellation token to use.
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfData.Serialization.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfData.Serialization.cs
new file mode 100644
index 000000000000..4f1af65f88e1
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfData.Serialization.cs
@@ -0,0 +1,229 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.Discovery.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Discovery
+{
+ /// Bookshelf tracked resource.
+ public partial class BookshelfData : TrackedResourceData, IJsonModel
+ {
+ /// Initializes a new instance of for deserialization.
+ internal BookshelfData()
+ {
+ }
+
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ return DeserializeBookshelfData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BookshelfData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ /// The client options for reading and writing models.
+ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDiscoveryContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(BookshelfData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
+
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ BookshelfData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (BookshelfData)PersistableModelCreateCore(data, options);
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// The to serialize into .
+ internal static RequestContent ToRequestContent(BookshelfData bookshelfData)
+ {
+ if (bookshelfData == null)
+ {
+ return null;
+ }
+ return RequestContent.Create(bookshelfData, ModelSerializationExtensions.WireOptions);
+ }
+
+ /// The to deserialize the from.
+ internal static BookshelfData FromResponse(Response response)
+ {
+ using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBookshelfData(document.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BookshelfData)} does not support writing '{format}' format.");
+ }
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ BookshelfData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (BookshelfData)JsonModelCreateCore(ref reader, options);
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BookshelfData)} does not support reading '{format}' format.");
+ }
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBookshelfData(document.RootElement, options);
+ }
+
+ /// The JSON element to deserialize.
+ /// The client options for reading and writing models.
+ internal static BookshelfData DeserializeBookshelfData(JsonElement element, ModelReaderWriterOptions options)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType resourceType = default;
+ SystemData systemData = default;
+ IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary();
+ IDictionary tags = default;
+ AzureLocation location = default;
+ BookshelfProperties properties = default;
+ foreach (var prop in element.EnumerateObject())
+ {
+ if (prop.NameEquals("id"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = new ResourceIdentifier(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("name"u8))
+ {
+ name = prop.Value.GetString();
+ continue;
+ }
+ if (prop.NameEquals("type"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ resourceType = new ResourceType(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("systemData"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDiscoveryContext.Default);
+ continue;
+ }
+ if (prop.NameEquals("tags"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var prop0 in prop.Value.EnumerateObject())
+ {
+ if (prop0.Value.ValueKind == JsonValueKind.Null)
+ {
+ dictionary.Add(prop0.Name, null);
+ }
+ else
+ {
+ dictionary.Add(prop0.Name, prop0.Value.GetString());
+ }
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (prop.NameEquals("location"u8))
+ {
+ location = new AzureLocation(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("properties"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = BookshelfProperties.DeserializeBookshelfProperties(prop.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
+ }
+ }
+ return new BookshelfData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties,
+ tags ?? new ChangeTrackingDictionary(),
+ location,
+ properties);
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfData.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfData.cs
new file mode 100644
index 000000000000..3c801ba62380
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfData.cs
@@ -0,0 +1,46 @@
+// 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.Discovery.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Discovery
+{
+ /// Bookshelf tracked resource.
+ public partial class BookshelfData : TrackedResourceData
+ {
+ /// Keeps track of any properties unknown to the library.
+ private protected readonly IDictionary _additionalBinaryDataProperties;
+
+ /// Initializes a new instance of .
+ /// The geo-location where the resource lives.
+ public BookshelfData(AzureLocation location) : base(location)
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Keeps track of any properties unknown to the library.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
+ /// The resource-specific properties for this resource.
+ internal BookshelfData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, BookshelfProperties properties) : base(id, name, resourceType, systemData, tags, location)
+ {
+ _additionalBinaryDataProperties = additionalBinaryDataProperties;
+ Properties = properties;
+ }
+
+ /// The resource-specific properties for this resource.
+ public BookshelfProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionCollection.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionCollection.cs
new file mode 100644
index 000000000000..6e055390c68e
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionCollection.cs
@@ -0,0 +1,579 @@
+// 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.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Discovery
+{
+ ///
+ /// 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 GetBookshelfPrivateEndpointConnections method from an instance of .
+ ///
+ public partial class BookshelfPrivateEndpointConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _bookshelfPrivateEndpointConnectionsClientDiagnostics;
+ private readonly BookshelfPrivateEndpointConnections _bookshelfPrivateEndpointConnectionsRestClient;
+
+ /// Initializes a new instance of BookshelfPrivateEndpointConnectionCollection for mocking.
+ protected BookshelfPrivateEndpointConnectionCollection()
+ {
+ }
+
+ /// 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 BookshelfPrivateEndpointConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(BookshelfPrivateEndpointConnectionResource.ResourceType, out string bookshelfPrivateEndpointConnectionApiVersion);
+ _bookshelfPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Discovery", BookshelfPrivateEndpointConnectionResource.ResourceType.Namespace, Diagnostics);
+ _bookshelfPrivateEndpointConnectionsRestClient = new BookshelfPrivateEndpointConnections(_bookshelfPrivateEndpointConnectionsClientDiagnostics, Pipeline, Endpoint, bookshelfPrivateEndpointConnectionApiVersion ?? "2026-02-01-preview");
+ ValidateResourceId(id);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != BookshelfResource.ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, BookshelfResource.ResourceType), nameof(id));
+ }
+ }
+
+ ///
+ /// Approves or updates the specified private endpoint connection.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_CreateOrUpdate.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// 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 private endpoint connection associated with the Azure resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, BookshelfPrivateEndpointConnectionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, BookshelfPrivateEndpointConnectionData.ToRequestContent(data), context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfPrivateEndpointConnectionOperationSource(Client),
+ _bookshelfPrivateEndpointConnectionsClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Approves or updates the specified private endpoint connection.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_CreateOrUpdate.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// 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 private endpoint connection associated with the Azure resource.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, BookshelfPrivateEndpointConnectionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, BookshelfPrivateEndpointConnectionData.ToRequestContent(data), context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfPrivateEndpointConnectionOperationSource(Client),
+ _bookshelfPrivateEndpointConnectionsClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletion(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified private endpoint connection associated with the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified private endpoint connection associated with the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Get(string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Lists all private endpoint connections for a bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_ListByBookshelf.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new BookshelfPrivateEndpointConnectionsGetByBookshelfAsyncCollectionResultOfT(_bookshelfPrivateEndpointConnectionsRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context), data => new BookshelfPrivateEndpointConnectionResource(Client, data));
+ }
+
+ ///
+ /// Lists all private endpoint connections for a bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_ListByBookshelf.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new PageableWrapper(new BookshelfPrivateEndpointConnectionsGetByBookshelfCollectionResultOfT(_bookshelfPrivateEndpointConnectionsRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context), data => new BookshelfPrivateEndpointConnectionResource(Client, data));
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> ExistsAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateEndpointConnectionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ 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.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Exists(string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateEndpointConnectionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ 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.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetIfExistsAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateEndpointConnectionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateEndpointConnectionResource(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.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual NullableResponse GetIfExists(string privateEndpointConnectionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateEndpointConnectionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ /// The cancellation token to use.
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionData.Serialization.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionData.Serialization.cs
new file mode 100644
index 000000000000..448feee10564
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionData.Serialization.cs
@@ -0,0 +1,194 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.Discovery.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Discovery
+{
+ /// The Private Endpoint Connection resource for Bookshelf.
+ public partial class BookshelfPrivateEndpointConnectionData : ResourceData, IJsonModel
+ {
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ return DeserializeBookshelfPrivateEndpointConnectionData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BookshelfPrivateEndpointConnectionData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ /// The client options for reading and writing models.
+ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDiscoveryContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(BookshelfPrivateEndpointConnectionData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
+
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ BookshelfPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (BookshelfPrivateEndpointConnectionData)PersistableModelCreateCore(data, options);
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// The to serialize into .
+ internal static RequestContent ToRequestContent(BookshelfPrivateEndpointConnectionData bookshelfPrivateEndpointConnectionData)
+ {
+ if (bookshelfPrivateEndpointConnectionData == null)
+ {
+ return null;
+ }
+ return RequestContent.Create(bookshelfPrivateEndpointConnectionData, ModelSerializationExtensions.WireOptions);
+ }
+
+ /// The to deserialize the from.
+ internal static BookshelfPrivateEndpointConnectionData FromResponse(Response response)
+ {
+ using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBookshelfPrivateEndpointConnectionData(document.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BookshelfPrivateEndpointConnectionData)} does not support writing '{format}' format.");
+ }
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ BookshelfPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (BookshelfPrivateEndpointConnectionData)JsonModelCreateCore(ref reader, options);
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BookshelfPrivateEndpointConnectionData)} does not support reading '{format}' format.");
+ }
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBookshelfPrivateEndpointConnectionData(document.RootElement, options);
+ }
+
+ /// The JSON element to deserialize.
+ /// The client options for reading and writing models.
+ internal static BookshelfPrivateEndpointConnectionData DeserializeBookshelfPrivateEndpointConnectionData(JsonElement element, ModelReaderWriterOptions options)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType resourceType = default;
+ SystemData systemData = default;
+ IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary();
+ PrivateEndpointConnectionProperties properties = default;
+ foreach (var prop in element.EnumerateObject())
+ {
+ if (prop.NameEquals("id"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = new ResourceIdentifier(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("name"u8))
+ {
+ name = prop.Value.GetString();
+ continue;
+ }
+ if (prop.NameEquals("type"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ resourceType = new ResourceType(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("systemData"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDiscoveryContext.Default);
+ continue;
+ }
+ if (prop.NameEquals("properties"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = PrivateEndpointConnectionProperties.DeserializePrivateEndpointConnectionProperties(prop.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
+ }
+ }
+ return new BookshelfPrivateEndpointConnectionData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties,
+ properties);
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionData.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionData.cs
new file mode 100644
index 000000000000..7c1ab21b5b8d
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionData.cs
@@ -0,0 +1,43 @@
+// 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.Discovery.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Discovery
+{
+ /// The Private Endpoint Connection resource for Bookshelf.
+ public partial class BookshelfPrivateEndpointConnectionData : ResourceData
+ {
+ /// Keeps track of any properties unknown to the library.
+ private protected readonly IDictionary _additionalBinaryDataProperties;
+
+ /// Initializes a new instance of .
+ public BookshelfPrivateEndpointConnectionData()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Keeps track of any properties unknown to the library.
+ /// The resource-specific properties for this resource.
+ internal BookshelfPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, PrivateEndpointConnectionProperties properties) : base(id, name, resourceType, systemData)
+ {
+ _additionalBinaryDataProperties = additionalBinaryDataProperties;
+ Properties = properties;
+ }
+
+ /// The resource-specific properties for this resource.
+ public PrivateEndpointConnectionProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionResource.Serialization.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionResource.Serialization.cs
new file mode 100644
index 000000000000..854f4bf072fb
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionResource.Serialization.cs
@@ -0,0 +1,39 @@
+// 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.Discovery
+{
+ ///
+ public partial class BookshelfPrivateEndpointConnectionResource : IJsonModel
+ {
+ private static IJsonModel s_dataDeserializationInstance;
+
+ private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new BookshelfPrivateEndpointConnectionData();
+
+ /// The writer to serialize the model to.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ /// The reader for deserializing the model.
+ /// The client options for reading and writing models.
+ BookshelfPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options);
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDiscoveryContext.Default);
+
+ /// The binary data to be processed.
+ /// The client options for reading and writing models.
+ BookshelfPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDiscoveryContext.Default);
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionResource.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionResource.cs
new file mode 100644
index 000000000000..2f436d13167f
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateEndpointConnectionResource.cs
@@ -0,0 +1,406 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Discovery
+{
+ ///
+ /// A class representing a BookshelfPrivateEndpointConnection 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 GetResource method.
+ /// Otherwise you can get one from its parent resource using the GetBookshelfPrivateEndpointConnections method.
+ ///
+ public partial class BookshelfPrivateEndpointConnectionResource : ArmResource
+ {
+ private readonly ClientDiagnostics _bookshelfPrivateEndpointConnectionsClientDiagnostics;
+ private readonly BookshelfPrivateEndpointConnections _bookshelfPrivateEndpointConnectionsRestClient;
+ private readonly BookshelfPrivateEndpointConnectionData _data;
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Discovery/bookshelves/privateEndpointConnections";
+
+ /// Initializes a new instance of BookshelfPrivateEndpointConnectionResource for mocking.
+ protected BookshelfPrivateEndpointConnectionResource()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal BookshelfPrivateEndpointConnectionResource(ArmClient client, BookshelfPrivateEndpointConnectionData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// 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 BookshelfPrivateEndpointConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(ResourceType, out string bookshelfPrivateEndpointConnectionApiVersion);
+ _bookshelfPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Discovery", ResourceType.Namespace, Diagnostics);
+ _bookshelfPrivateEndpointConnectionsRestClient = new BookshelfPrivateEndpointConnections(_bookshelfPrivateEndpointConnectionsClientDiagnostics, Pipeline, Endpoint, bookshelfPrivateEndpointConnectionApiVersion ?? "2026-02-01-preview");
+ ValidateResourceId(id);
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ public virtual BookshelfPrivateEndpointConnectionData Data
+ {
+ get
+ {
+ if (!HasData)
+ {
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ }
+ return _data;
+ }
+ }
+
+ /// Generate the resource identifier for this resource.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The bookshelfName.
+ /// The privateEndpointConnectionName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string bookshelfName, string privateEndpointConnectionName)
+ {
+ string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+ }
+
+ ///
+ /// Gets the specified private endpoint connection associated with the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified private endpoint connection associated with the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(BookshelfPrivateEndpointConnectionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes the specified private endpoint connection.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Delete.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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 DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionResource.Delete");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(_bookshelfPrivateEndpointConnectionsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes the specified private endpoint connection.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_Delete.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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 DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionResource.Delete");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(_bookshelfPrivateEndpointConnectionsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletionResponse(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a BookshelfPrivateEndpointConnection.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_CreateOrUpdate.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, BookshelfPrivateEndpointConnectionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionResource.Update");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, BookshelfPrivateEndpointConnectionData.ToRequestContent(data), context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfPrivateEndpointConnectionOperationSource(Client),
+ _bookshelfPrivateEndpointConnectionsClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a BookshelfPrivateEndpointConnection.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateEndpointConnections_CreateOrUpdate.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, BookshelfPrivateEndpointConnectionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelfPrivateEndpointConnectionsClientDiagnostics.CreateScope("BookshelfPrivateEndpointConnectionResource.Update");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, BookshelfPrivateEndpointConnectionData.ToRequestContent(data), context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfPrivateEndpointConnectionOperationSource(Client),
+ _bookshelfPrivateEndpointConnectionsClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletion(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResource.Serialization.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResource.Serialization.cs
new file mode 100644
index 000000000000..3e2329e53891
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResource.Serialization.cs
@@ -0,0 +1,39 @@
+// 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.Discovery
+{
+ ///
+ public partial class BookshelfPrivateLinkResource : IJsonModel
+ {
+ private static IJsonModel s_dataDeserializationInstance;
+
+ private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new BookshelfPrivateLinkResourceData();
+
+ /// The writer to serialize the model to.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ /// The reader for deserializing the model.
+ /// The client options for reading and writing models.
+ BookshelfPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options);
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDiscoveryContext.Default);
+
+ /// The binary data to be processed.
+ /// The client options for reading and writing models.
+ BookshelfPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDiscoveryContext.Default);
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResource.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResource.cs
new file mode 100644
index 000000000000..0ba48f972617
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResource.cs
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Discovery
+{
+ ///
+ /// A class representing a BookshelfPrivateLinkResource 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 GetResource method.
+ /// Otherwise you can get one from its parent resource using the GetBookshelfPrivateLinkResources method.
+ ///
+ public partial class BookshelfPrivateLinkResource : ArmResource
+ {
+ private readonly ClientDiagnostics _bookshelfPrivateLinkResourcesClientDiagnostics;
+ private readonly BookshelfPrivateLinkResources _bookshelfPrivateLinkResourcesRestClient;
+ private readonly BookshelfPrivateLinkResourceData _data;
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Discovery/bookshelves/privateLinkResources";
+
+ /// Initializes a new instance of BookshelfPrivateLinkResource for mocking.
+ protected BookshelfPrivateLinkResource()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal BookshelfPrivateLinkResource(ArmClient client, BookshelfPrivateLinkResourceData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// 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 BookshelfPrivateLinkResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(ResourceType, out string bookshelfPrivateLinkResourceApiVersion);
+ _bookshelfPrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Discovery", ResourceType.Namespace, Diagnostics);
+ _bookshelfPrivateLinkResourcesRestClient = new BookshelfPrivateLinkResources(_bookshelfPrivateLinkResourcesClientDiagnostics, Pipeline, Endpoint, bookshelfPrivateLinkResourceApiVersion ?? "2026-02-01-preview");
+ ValidateResourceId(id);
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ public virtual BookshelfPrivateLinkResourceData Data
+ {
+ get
+ {
+ if (!HasData)
+ {
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ }
+ return _data;
+ }
+ }
+
+ /// Generate the resource identifier for this resource.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The bookshelfName.
+ /// The privateLinkResourceName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string bookshelfName, string privateLinkResourceName)
+ {
+ string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+ }
+
+ ///
+ /// Gets the specified private link resource for the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateLinkResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified private link resource for the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateLinkResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceCollection.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceCollection.cs
new file mode 100644
index 000000000000..db83edc782ec
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceCollection.cs
@@ -0,0 +1,463 @@
+// 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.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Discovery
+{
+ ///
+ /// 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 GetBookshelfPrivateLinkResources method from an instance of .
+ ///
+ public partial class BookshelfPrivateLinkResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _bookshelfPrivateLinkResourcesClientDiagnostics;
+ private readonly BookshelfPrivateLinkResources _bookshelfPrivateLinkResourcesRestClient;
+
+ /// Initializes a new instance of BookshelfPrivateLinkResourceCollection for mocking.
+ protected BookshelfPrivateLinkResourceCollection()
+ {
+ }
+
+ /// 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 BookshelfPrivateLinkResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(BookshelfPrivateLinkResource.ResourceType, out string bookshelfPrivateLinkResourceApiVersion);
+ _bookshelfPrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Discovery", BookshelfPrivateLinkResource.ResourceType.Namespace, Diagnostics);
+ _bookshelfPrivateLinkResourcesRestClient = new BookshelfPrivateLinkResources(_bookshelfPrivateLinkResourcesClientDiagnostics, Pipeline, Endpoint, bookshelfPrivateLinkResourceApiVersion ?? "2026-02-01-preview");
+ ValidateResourceId(id);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != BookshelfResource.ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, BookshelfResource.ResourceType), nameof(id));
+ }
+ }
+
+ ///
+ /// Gets the specified private link resource for the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private link associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetAsync(string privateLinkResourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName));
+
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateLinkResourceName, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateLinkResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified private link resource for the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private link associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Get(string privateLinkResourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName));
+
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResourceCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateLinkResourceName, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateLinkResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Lists all private link resources for the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_ListByBookshelf.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new BookshelfPrivateLinkResourcesGetByBookshelfAsyncCollectionResultOfT(_bookshelfPrivateLinkResourcesRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context), data => new BookshelfPrivateLinkResource(Client, data));
+ }
+
+ ///
+ /// Lists all private link resources for the bookshelf.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_ListByBookshelf.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new PageableWrapper(new BookshelfPrivateLinkResourcesGetByBookshelfCollectionResultOfT(_bookshelfPrivateLinkResourcesRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context), data => new BookshelfPrivateLinkResource(Client, data));
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private link associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> ExistsAsync(string privateLinkResourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName));
+
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateLinkResourceName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateLinkResourceData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ 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.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private link associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Exists(string privateLinkResourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName));
+
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResourceCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateLinkResourceName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateLinkResourceData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ 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.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private link associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetIfExistsAsync(string privateLinkResourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName));
+
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateLinkResourceName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateLinkResourceData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateLinkResource(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.Discovery/bookshelves/{bookshelfName}/privateLinkResources/{privateLinkResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// BookshelfPrivateLinkResources_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the private link associated with the Azure resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual NullableResponse GetIfExists(string privateLinkResourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName));
+
+ using DiagnosticScope scope = _bookshelfPrivateLinkResourcesClientDiagnostics.CreateScope("BookshelfPrivateLinkResourceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelfPrivateLinkResourcesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, privateLinkResourceName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(BookshelfPrivateLinkResourceData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((BookshelfPrivateLinkResourceData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfPrivateLinkResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ /// The cancellation token to use.
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceData.Serialization.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceData.Serialization.cs
new file mode 100644
index 000000000000..5c5295bd9481
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceData.Serialization.cs
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.Discovery.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Discovery
+{
+ /// A private link resource for Bookshelf.
+ public partial class BookshelfPrivateLinkResourceData : ResourceData, IJsonModel
+ {
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ return DeserializeBookshelfPrivateLinkResourceData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BookshelfPrivateLinkResourceData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ /// The client options for reading and writing models.
+ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerDiscoveryContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(BookshelfPrivateLinkResourceData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
+
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ BookshelfPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (BookshelfPrivateLinkResourceData)PersistableModelCreateCore(data, options);
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// The to deserialize the from.
+ internal static BookshelfPrivateLinkResourceData FromResponse(Response response)
+ {
+ using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBookshelfPrivateLinkResourceData(document.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BookshelfPrivateLinkResourceData)} does not support writing '{format}' format.");
+ }
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ BookshelfPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (BookshelfPrivateLinkResourceData)JsonModelCreateCore(ref reader, options);
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(BookshelfPrivateLinkResourceData)} does not support reading '{format}' format.");
+ }
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBookshelfPrivateLinkResourceData(document.RootElement, options);
+ }
+
+ /// The JSON element to deserialize.
+ /// The client options for reading and writing models.
+ internal static BookshelfPrivateLinkResourceData DeserializeBookshelfPrivateLinkResourceData(JsonElement element, ModelReaderWriterOptions options)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType resourceType = default;
+ SystemData systemData = default;
+ IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary();
+ DiscoveryPrivateLinkResourceProperties properties = default;
+ foreach (var prop in element.EnumerateObject())
+ {
+ if (prop.NameEquals("id"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ id = new ResourceIdentifier(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("name"u8))
+ {
+ name = prop.Value.GetString();
+ continue;
+ }
+ if (prop.NameEquals("type"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ resourceType = new ResourceType(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("systemData"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDiscoveryContext.Default);
+ continue;
+ }
+ if (prop.NameEquals("properties"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = DiscoveryPrivateLinkResourceProperties.DeserializeDiscoveryPrivateLinkResourceProperties(prop.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
+ }
+ }
+ return new BookshelfPrivateLinkResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties,
+ properties);
+ }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceData.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceData.cs
new file mode 100644
index 000000000000..424fb6f237ec
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfPrivateLinkResourceData.cs
@@ -0,0 +1,43 @@
+// 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.Discovery.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Discovery
+{
+ /// A private link resource for Bookshelf.
+ public partial class BookshelfPrivateLinkResourceData : ResourceData
+ {
+ /// Keeps track of any properties unknown to the library.
+ private protected readonly IDictionary _additionalBinaryDataProperties;
+
+ /// Initializes a new instance of .
+ internal BookshelfPrivateLinkResourceData()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Keeps track of any properties unknown to the library.
+ /// The resource-specific properties for this resource.
+ internal BookshelfPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, DiscoveryPrivateLinkResourceProperties properties) : base(id, name, resourceType, systemData)
+ {
+ _additionalBinaryDataProperties = additionalBinaryDataProperties;
+ Properties = properties;
+ }
+
+ /// The resource-specific properties for this resource.
+ public DiscoveryPrivateLinkResourceProperties Properties { get; }
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfResource.Serialization.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfResource.Serialization.cs
new file mode 100644
index 000000000000..211f0a68d738
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfResource.Serialization.cs
@@ -0,0 +1,39 @@
+// 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.Discovery
+{
+ ///
+ public partial class BookshelfResource : IJsonModel
+ {
+ private static IJsonModel s_dataDeserializationInstance;
+
+ private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new BookshelfData();
+
+ /// The writer to serialize the model to.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ /// The reader for deserializing the model.
+ /// The client options for reading and writing models.
+ BookshelfData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options);
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDiscoveryContext.Default);
+
+ /// The binary data to be processed.
+ /// The client options for reading and writing models.
+ BookshelfData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDiscoveryContext.Default);
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfResource.cs b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfResource.cs
new file mode 100644
index 000000000000..2381069a3a57
--- /dev/null
+++ b/sdk/discovery/Azure.ResourceManager.Discovery/src/Generated/BookshelfResource.cs
@@ -0,0 +1,747 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.Discovery
+{
+ ///
+ /// A class representing a Bookshelf 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 GetResource method.
+ /// Otherwise you can get one from its parent resource using the GetBookshelves method.
+ ///
+ public partial class BookshelfResource : ArmResource
+ {
+ private readonly ClientDiagnostics _bookshelvesClientDiagnostics;
+ private readonly Bookshelves _bookshelvesRestClient;
+ private readonly BookshelfData _data;
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Discovery/bookshelves";
+
+ /// Initializes a new instance of BookshelfResource for mocking.
+ protected BookshelfResource()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal BookshelfResource(ArmClient client, BookshelfData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// 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 BookshelfResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(ResourceType, out string bookshelfApiVersion);
+ _bookshelvesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Discovery", ResourceType.Namespace, Diagnostics);
+ _bookshelvesRestClient = new Bookshelves(_bookshelvesClientDiagnostics, Pipeline, Endpoint, bookshelfApiVersion ?? "2026-02-01-preview");
+ ValidateResourceId(id);
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ public virtual BookshelfData Data
+ {
+ get
+ {
+ if (!HasData)
+ {
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ }
+ return _data;
+ }
+ }
+
+ /// Generate the resource identifier for this resource.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The bookshelfName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string bookshelfName)
+ {
+ string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+ }
+
+ ///
+ /// Get a Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new BookshelfResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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, BookshelfData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.Update");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, BookshelfData.ToRequestContent(data), context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfOperationSource(Client),
+ _bookshelvesClientDiagnostics,
+ Pipeline,
+ message.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 Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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, BookshelfData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.Update");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, BookshelfData.ToRequestContent(data), context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(
+ new BookshelfOperationSource(Client),
+ _bookshelvesClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletion(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Delete.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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 DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.Delete");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(_bookshelvesClientDiagnostics, Pipeline, message.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 Bookshelf
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Discovery/bookshelves/{bookshelfName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Bookshelves_Delete.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2026-02-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 DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.Delete");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ DiscoveryArmOperation operation = new DiscoveryArmOperation(_bookshelvesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletionResponse(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Add a tag to the current 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 DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false))
+ {
+ Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues[key] = value;
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ return Response.FromValue(new BookshelfResource(Client, response.Value), response.GetRawResponse());
+ }
+ else
+ {
+ BookshelfData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ BookshelfData patch = new BookshelfData();
+ foreach (KeyValuePair tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ ArmOperation 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.
+ /// 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 DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken))
+ {
+ Response originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues[key] = value;
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(BookshelfData.FromResponse(result), result);
+ return Response.FromValue(new BookshelfResource(Client, response.Value), response.GetRawResponse());
+ }
+ else
+ {
+ BookshelfData current = Get(cancellationToken: cancellationToken).Value.Data;
+ BookshelfData patch = new BookshelfData();
+ foreach (KeyValuePair tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ ArmOperation 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.
+ /// The tags to set on the resource.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using DiagnosticScope scope = _bookshelvesClientDiagnostics.CreateScope("BookshelfResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false))
+ {
+ await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken).ConfigureAwait(false);
+ Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _bookshelvesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response