diff --git a/.vscode/cspell.json b/.vscode/cspell.json index c595fd8ae36b..8067df6f0983 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1217,6 +1217,7 @@ "filename": "**/sdk/providerhub/**/*.cs", "words": [ "checkin", + "dsts", "regionality" ] }, diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/CHANGELOG.md b/sdk/providerhub/Azure.ResourceManager.ProviderHub/CHANGELOG.md index b775e16bf6fb..d5b3237996ae 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/CHANGELOG.md +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/CHANGELOG.md @@ -1,27 +1,30 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0 (2025-10-21) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-2020-11-20' to 'package-2024-09-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/247a38a5fea02ac50132f591f3b53fec06e9377b/specification/providerhub/resource-manager/readme.md. +- Make `Azure.ResourceManager.ProviderHub` AOT-compatible. ### Other Changes +- Upgraded Azure.Core from 1.45.0 to 1.49.0 +- Upgraded Azure.ResourceManager from 1.13.0 to 1.13.2 +- Obsoleted property 'IList ResourceAccessRoles' in type Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement + ## 1.1.1 (2025-03-11) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Exposed `JsonModelWriteCore` for model serialization procedure. ## 1.1.0 (2023-11-29) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -31,7 +34,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.net8.0.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.net8.0.cs index df0c26c473c2..8e2179b4b840 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.net8.0.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.net8.0.cs @@ -41,8 +41,12 @@ protected CustomRolloutResource() { } public virtual Azure.ResourceManager.ProviderHub.CustomRolloutData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, string rolloutName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Stop(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ProviderHub.CustomRolloutData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.CustomRolloutData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -255,6 +259,53 @@ protected NotificationRegistrationResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.NotificationRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.NotificationRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ProviderAuthorizedApplicationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProviderAuthorizedApplicationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, System.Guid applicationId, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, System.Guid applicationId, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProviderAuthorizedApplicationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderAuthorizedApplicationData() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderAuthorizedApplicationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProviderAuthorizedApplicationResource() { } + public virtual Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, System.Guid applicationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public static partial class ProviderHubExtensions { public static Azure.ResourceManager.ProviderHub.CustomRolloutResource GetCustomRolloutResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -263,13 +314,68 @@ public static partial class ProviderHubExtensions public static Azure.ResourceManager.ProviderHub.NestedResourceTypeSecondSkuResource GetNestedResourceTypeSecondSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.NestedResourceTypeThirdSkuResource GetNestedResourceTypeThirdSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.NotificationRegistrationResource GetNotificationRegistrationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationResource GetProviderAuthorizedApplicationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetProviderMonitorSetting(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetProviderMonitorSettingAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderMonitorSettingResource GetProviderMonitorSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderMonitorSettingCollection GetProviderMonitorSettings(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetProviderMonitorSettings(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetProviderMonitorSettingsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetProviderRegistration(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetProviderRegistrationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ProviderHub.ProviderRegistrationResource GetProviderRegistrationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.ProviderRegistrationCollection GetProviderRegistrations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.ProviderHub.RegistrationNewRegionFrontloadReleaseResource GetRegistrationNewRegionFrontloadReleaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationResource GetResourceTypeRegistrationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.ResourceTypeSkuResource GetResourceTypeSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } + public partial class ProviderMonitorSettingCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProviderMonitorSettingCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string providerMonitorSettingName, Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string providerMonitorSettingName, Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProviderMonitorSettingData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderMonitorSettingData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProviderMonitorSettingProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderMonitorSettingResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProviderMonitorSettingResource() { } + public virtual Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ProviderRegistrationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ProviderRegistrationCollection() { } @@ -290,6 +396,7 @@ protected ProviderRegistrationCollection() { } public partial class ProviderRegistrationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProviderRegistrationData() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind? Kind { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.ProviderRegistrationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -309,8 +416,12 @@ protected ProviderRegistrationResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteResourcesResourceAction(Azure.WaitUntil waitUntil, string resourceActionName, Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteResourcesResourceActionAsync(Azure.WaitUntil waitUntil, string resourceActionName, Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GenerateManifest(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GenerateManifestAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GenerateManifestNewRegionFrontloadRelease(Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GenerateManifestNewRegionFrontloadReleaseAsync(Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetCustomRollout(string rolloutName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -322,6 +433,12 @@ protected ProviderRegistrationResource() { } public virtual Azure.Response GetNotificationRegistration(string notificationRegistrationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNotificationRegistrationAsync(string notificationRegistrationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ProviderHub.NotificationRegistrationCollection GetNotificationRegistrations() { throw null; } + public virtual Azure.Response GetProviderAuthorizedApplication(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProviderAuthorizedApplicationAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationCollection GetProviderAuthorizedApplications() { throw null; } + public virtual Azure.Response GetRegistrationNewRegionFrontloadRelease(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRegistrationNewRegionFrontloadReleaseAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.RegistrationNewRegionFrontloadReleaseCollection GetRegistrationNewRegionFrontloadReleases() { throw null; } public virtual Azure.Response GetResourceTypeRegistration(string resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetResourceTypeRegistrationAsync(string resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationCollection GetResourceTypeRegistrations() { throw null; } @@ -333,6 +450,37 @@ protected ProviderRegistrationResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class RegistrationNewRegionFrontloadReleaseCollection : Azure.ResourceManager.ArmCollection + { + protected RegistrationNewRegionFrontloadReleaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string releaseName, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string releaseName, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class RegistrationNewRegionFrontloadReleaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RegistrationNewRegionFrontloadReleaseResource() { } + public virtual Azure.ResourceManager.ProviderHub.DefaultRolloutData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, string releaseName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Stop(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ProviderHub.DefaultRolloutData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.DefaultRolloutData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ResourceTypeRegistrationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ResourceTypeRegistrationCollection() { } @@ -353,6 +501,7 @@ protected ResourceTypeRegistrationCollection() { } public partial class ResourceTypeRegistrationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeRegistrationData() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind? Kind { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -451,13 +600,25 @@ protected MockableProviderHubArmClient() { } public virtual Azure.ResourceManager.ProviderHub.NestedResourceTypeSecondSkuResource GetNestedResourceTypeSecondSkuResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.NestedResourceTypeThirdSkuResource GetNestedResourceTypeThirdSkuResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.NotificationRegistrationResource GetNotificationRegistrationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationResource GetProviderAuthorizedApplicationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderMonitorSettingResource GetProviderMonitorSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ProviderRegistrationResource GetProviderRegistrationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.RegistrationNewRegionFrontloadReleaseResource GetRegistrationNewRegionFrontloadReleaseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationResource GetResourceTypeRegistrationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ResourceTypeSkuResource GetResourceTypeSkuResource(Azure.Core.ResourceIdentifier id) { throw null; } } + public partial class MockableProviderHubResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableProviderHubResourceGroupResource() { } + public virtual Azure.Response GetProviderMonitorSetting(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProviderMonitorSettingAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderMonitorSettingCollection GetProviderMonitorSettings() { throw null; } + } public partial class MockableProviderHubSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableProviderHubSubscriptionResource() { } + public virtual Azure.Pageable GetProviderMonitorSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProviderMonitorSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetProviderRegistration(string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetProviderRegistrationAsync(string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ProviderRegistrationCollection GetProviderRegistrations() { throw null; } @@ -465,23 +626,210 @@ protected MockableProviderHubSubscriptionResource() { } } namespace Azure.ResourceManager.ProviderHub.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOptionAsyncOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOptionAsyncOperation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation ProtectedAsyncOperationPolling { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation ProtectedAsyncOperationPollingAuditOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOptionResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOptionResourceType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType ProtectedAsyncOperationPolling { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType ProtectedAsyncOperationPollingAuditOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOptionResourceTypeRegistration : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOptionResourceTypeRegistration(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration ProtectedAsyncOperationPolling { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration ProtectedAsyncOperationPollingAuditOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AllowedResourceName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AllowedResourceName() { } + public string GetActionVerb { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedResourceName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedResourceName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AllowedUnauthorizedActionIntent : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AllowedUnauthorizedActionIntent(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent DeferredAccessCheck { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent LowPrivilege { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent RPContract { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent left, Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent left, Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AllowedUnauthorizedActionsExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AllowedUnauthorizedActionsExtension() { } + public string Action { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent? Intent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionsExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionsExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApplicationDataAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApplicationDataAuthorization(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole role) { } + public System.Collections.Generic.IList ResourceTypes { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole Role { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationDataAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationDataAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApplicationOwnershipRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApplicationOwnershipRole(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole LimitedOwner { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole ServiceOwner { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole left, Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole left, Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ApplicationProviderAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApplicationProviderAuthorization() { } + public string ManagedByRoleDefinitionId { get { throw null; } set { } } + public string RoleDefinitionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public static partial class ArmProviderHubModelFactory { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo CheckinManifestInfo(bool isCheckedIn = false, string statusMessage = null, string pullRequest = null, string commitId = null) { throw null; } public static Azure.ResourceManager.ProviderHub.CustomRolloutData CustomRolloutData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.CustomRolloutProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.CustomRolloutProperties CustomRolloutProperties(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), Azure.ResourceManager.ProviderHub.Models.CustomRolloutSpecification specification = null, Azure.ResourceManager.ProviderHub.Models.CustomRolloutStatus status = null) { throw null; } public static Azure.ResourceManager.ProviderHub.DefaultRolloutData DefaultRolloutData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.DefaultRolloutProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.DefaultRolloutProperties DefaultRolloutProperties(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), Azure.ResourceManager.ProviderHub.Models.DefaultRolloutSpecification specification = null, Azure.ResourceManager.ProviderHub.Models.DefaultRolloutStatus status = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.LinkedOperationRule LinkedOperationRule(Azure.ResourceManager.ProviderHub.Models.LinkedOperation linkedOperation = default(Azure.ResourceManager.ProviderHub.Models.LinkedOperation), Azure.ResourceManager.ProviderHub.Models.LinkedAction linkedAction = default(Azure.ResourceManager.ProviderHub.Models.LinkedAction)) { throw null; } public static Azure.ResourceManager.ProviderHub.NotificationRegistrationData NotificationRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.NotificationRegistrationProperties properties = null) { throw null; } - public static Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.NotificationRegistrationProperties NotificationRegistrationProperties(Azure.ResourceManager.ProviderHub.Models.NotificationMode? notificationMode = default(Azure.ResourceManager.ProviderHub.Models.NotificationMode?), Azure.ResourceManager.ProviderHub.Models.MessageScope? messageScope = default(Azure.ResourceManager.ProviderHub.Models.MessageScope?), System.Collections.Generic.IEnumerable includedEvents = null, System.Collections.Generic.IEnumerable notificationEndpoints = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData ProviderAuthorizedApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties ProviderAuthorizedApplicationProperties(Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization providerAuthorization = null, System.Collections.Generic.IEnumerable dataAuthorizations = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData ProviderMonitorSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? providerMonitorSettingProvisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistrationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties properties) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties properties = null, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind? kind = default(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties ProviderRegistrationProperties(System.Collections.Generic.IEnumerable providerAuthenticationAllowedAudiences = null, System.Collections.Generic.IEnumerable providerAuthorizations = null, string @namespace = null, System.Collections.Generic.IEnumerable services = null, string serviceName = null, string providerVersion = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? providerType = default(Azure.ResourceManager.ProviderHub.Models.ResourceProviderType?), System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, System.Collections.Generic.IEnumerable capabilities = null, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), System.BinaryData metadata = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions templateDeploymentOptions = null, System.Collections.Generic.IEnumerable globalNotificationEndpoints = null, bool? enableTenantLinkedNotification = default(bool?), System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null, Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration dstsConfiguration = null, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption? notificationOptions = default(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption?), System.Collections.Generic.IEnumerable resourceHydrationAccounts = null, System.Collections.Generic.IEnumerable notificationSubscriberSettings = null, System.Collections.Generic.IEnumerable managementGroupGlobalNotificationEndpoints = null, System.Collections.Generic.IEnumerable optionalFeatures = null, Azure.ResourceManager.ProviderHub.Models.BlockActionVerb? resourceGroupLockOptionDuringMoveBlockActionVerb = default(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb?), Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType? serviceClientOptionsType = default(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType?), string legacyNamespace = null, System.Collections.Generic.IEnumerable legacyRegistrations = null, string customManifestVersion = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubMetadata providerHubMetadata = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications = null, System.Collections.Generic.IEnumerable privateResourceProviderAllowedSubscriptions = null, Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration tokenAuthConfiguration = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceType ProviderResourceType(string name = null, Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? routingType = default(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType?), Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType? additionalOptions = default(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType?), Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), Azure.ResourceManager.ProviderHub.Models.ResourceValidation? resourceValidation = default(Azure.ResourceManager.ProviderHub.Models.ResourceValidation?), System.Collections.Generic.IEnumerable allowedUnauthorizedActions = null, System.Collections.Generic.IEnumerable allowedUnauthorizedActionsExtensions = null, System.Collections.Generic.IEnumerable authorizationActionMappings = null, System.Collections.Generic.IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, System.Collections.Generic.IEnumerable loggingRules = null, System.Collections.Generic.IEnumerable throttlingRules = null, System.Collections.Generic.IEnumerable endpoints = null, Azure.ResourceManager.ProviderHub.Models.MarketplaceType? marketplaceType = default(Azure.ResourceManager.ProviderHub.Models.MarketplaceType?), Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? managementType = default(Azure.ResourceManager.ProviderHub.Models.IdentityManagementType?), System.BinaryData metadata = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.Collections.Generic.IEnumerable subscriptionStateRules = null, System.Collections.Generic.IEnumerable serviceTreeInfos = null, Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, string skuLink = null, System.Collections.Generic.IEnumerable disallowedActionVerbs = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy templateDeploymentPolicy = null, System.Collections.Generic.IEnumerable extendedLocations = null, System.Collections.Generic.IEnumerable linkedOperationRules = null, Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy? resourceDeletionPolicy = default(Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule quotaRule = null, System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceType ProviderResourceType(string name = null, Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? routingType = default(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType?), Azure.ResourceManager.ProviderHub.Models.ResourceValidation? resourceValidation = default(Azure.ResourceManager.ProviderHub.Models.ResourceValidation?), System.Collections.Generic.IEnumerable allowedUnauthorizedActions = null, System.Collections.Generic.IEnumerable authorizationActionMappings = null, System.Collections.Generic.IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, System.Collections.Generic.IEnumerable loggingRules = null, System.Collections.Generic.IEnumerable throttlingRules = null, System.Collections.Generic.IEnumerable endpoints = null, Azure.ResourceManager.ProviderHub.Models.MarketplaceType? marketplaceType = default(Azure.ResourceManager.ProviderHub.Models.MarketplaceType?), Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? managementType = default(Azure.ResourceManager.ProviderHub.Models.IdentityManagementType?), System.BinaryData metadata = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.Collections.Generic.IEnumerable subscriptionStateRules = null, System.Collections.Generic.IEnumerable serviceTreeInfos = null, Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? optInHeaders = default(Azure.ResourceManager.ProviderHub.Models.OptInHeaderType?), string skuLink = null, System.Collections.Generic.IEnumerable disallowedActionVerbs = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy templateDeploymentPolicy = null, System.Collections.Generic.IEnumerable extendedLocations = null, System.Collections.Generic.IEnumerable linkedOperationRules = null, Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy? resourceDeletionPolicy = default(Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy?)) { throw null; } public static Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata ReRegisterSubscriptionMetadata(bool isEnabled = false, int? concurrencyLimit = default(int?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementEntity ResourceManagementEntity(Azure.Core.ResourceIdentifier resourceId = null, string homeTenantId = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string status = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable apiVersions = null, System.Uri endpointUri = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.TimeSpan? timeout = default(System.TimeSpan?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable apiVersions = null, System.Uri endpointUri = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.TimeSpan? timeout = default(System.TimeSpan?), Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType? endpointType = default(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType?), string skuLink = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifest ResourceProviderManifest(System.Collections.Generic.IEnumerable providerAuthenticationAllowedAudiences = null, System.Collections.Generic.IEnumerable providerAuthorizations = null, string @namespace = null, System.Collections.Generic.IEnumerable services = null, string serviceName = null, string providerVersion = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? providerType = default(Azure.ResourceManager.ProviderHub.Models.ResourceProviderType?), System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, System.Collections.Generic.IEnumerable resourceTypes = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, System.Collections.Generic.IEnumerable capabilities = null, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), System.BinaryData metadata = null, System.Collections.Generic.IEnumerable globalNotificationEndpoints = null, Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null, bool? isTenantLinkedNotificationEnabled = default(bool?), System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifest ResourceProviderManifest(System.Collections.Generic.IEnumerable providerAuthenticationAllowedAudiences = null, System.Collections.Generic.IEnumerable providerAuthorizations = null, string @namespace = null, string providerVersion = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? providerType = default(Azure.ResourceManager.ProviderHub.Models.ResourceProviderType?), System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? optInHeaders = default(Azure.ResourceManager.ProviderHub.Models.OptInHeaderType?), System.Collections.Generic.IEnumerable resourceTypes = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, System.Collections.Generic.IEnumerable capabilities = null, System.BinaryData metadata = null, System.Collections.Generic.IEnumerable globalNotificationEndpoints = null, Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null) { throw null; } - public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData ResourceTypeRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties properties = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData ResourceTypeRegistrationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties properties) { throw null; } + public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData ResourceTypeRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties properties = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind? kind = default(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties ResourceTypeRegistrationProperties(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? routingType = default(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType?), Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration? additionalOptions = default(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration?), Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality? regionality = default(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality?), System.Collections.Generic.IEnumerable endpoints = null, Azure.ResourceManager.ProviderHub.Models.ExtensionOptions extensionOptionsResourceCreationBegin = null, Azure.ResourceManager.ProviderHub.Models.MarketplaceType? marketplaceType = default(Azure.ResourceManager.ProviderHub.Models.MarketplaceType?), System.Collections.Generic.IEnumerable swaggerSpecifications = null, System.Collections.Generic.IEnumerable allowedUnauthorizedActions = null, System.Collections.Generic.IEnumerable allowedUnauthorizedActionsExtensions = null, System.Collections.Generic.IEnumerable authorizationActionMappings = null, System.Collections.Generic.IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, System.Collections.Generic.IEnumerable loggingRules = null, System.Collections.Generic.IEnumerable throttlingRules = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), bool? isAsyncOperationEnabled = default(bool?), Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), bool? isThirdPartyS2SEnabled = default(bool?), Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications = null, bool? isPureProxy = default(bool?), Azure.ResourceManager.ProviderHub.Models.IdentityManagementProperties identityManagement = null, Azure.ResourceManager.ProviderHub.Models.CheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications = null, System.Collections.Generic.IEnumerable disallowedActionVerbs = null, System.Collections.Generic.IEnumerable serviceTreeInfos = null, Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, System.Collections.Generic.IEnumerable subscriptionStateRules = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions templateDeploymentOptions = null, System.Collections.Generic.IEnumerable extendedLocations = null, Azure.ResourceManager.ProviderHub.Models.ResourceMovePolicy resourceMovePolicy = null, Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy? resourceDeletionPolicy = default(Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy?), System.Collections.Generic.IDictionary resourceConcurrencyControlOptions = null, Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration resourceGraphConfiguration = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, bool? isNoncompliantCollectionResponseAllowed = default(bool?), Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken onBehalfOfTokens = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory? category = default(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory?), Azure.ResourceManager.ProviderHub.Models.ResourceValidation? resourceValidation = default(Azure.ResourceManager.ProviderHub.Models.ResourceValidation?), System.Collections.Generic.IEnumerable disallowedEndUserOperations = null, System.Collections.Generic.IDictionary metadata = null, string skuLink = null, Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule quotaRule = null, System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null, Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration tokenAuthConfiguration = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy templateDeploymentPolicy = null, bool? isEmptyRoleAssignmentsAllowed = default(bool?), Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType? policyExecutionType = default(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType?), Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy? availabilityZonePolicy = default(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration dstsConfiguration = null, System.Collections.Generic.IEnumerable asyncTimeoutRules = null, System.Collections.Generic.IEnumerable commonApiVersions = null, System.Collections.Generic.IEnumerable apiProfiles = null, System.Collections.Generic.IEnumerable linkedOperationRules = null, string legacyName = null, System.Collections.Generic.IEnumerable legacyNames = null, System.Collections.Generic.IEnumerable allowedTemplateDeploymentReferenceActions = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy legacyPolicy = null, string manifestLink = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule capacityRule = null, bool? isAddOnPlanConversionAllowed = default(bool?), System.Collections.Generic.IEnumerable allowedResourceNames = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache resourceCache = null, Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption? resourceQueryManagementFilterOption = default(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption?), bool? areTagsSupported = default(bool?), Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions resourceManagementOptions = null, string groupingTag = null, bool? isAddResourceListTargetLocationsAllowed = default(bool?), Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode? commonApiVersionsMergeMode = default(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode?), string routingRuleHostResourceType = null, Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode? frontdoorRequestMode = default(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode?), Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType? resourceSubType = default(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType?), string asyncOperationResourceTypeName = null) { throw null; } public static Azure.ResourceManager.ProviderHub.ResourceTypeSkuData ResourceTypeSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeSkuProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeSkuProperties ResourceTypeSkuProperties(System.Collections.Generic.IEnumerable skuSettings = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy TemplateDeploymentPolicy(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability capabilities = default(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability), Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption preflightOptions = default(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption)) { throw null; } public static Azure.ResourceManager.ProviderHub.Models.TypedErrorInfo TypedErrorInfo(string typedErrorInfoType = null, System.BinaryData info = null) { throw null; } } + public partial class AsyncOperationPollingRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AsyncOperationPollingRules() { } + public Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation? AdditionalOptions { get { throw null; } set { } } + public System.Collections.Generic.IList AuthorizationActions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AsyncTimeoutRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AsyncTimeoutRule() { } + public string ActionName { get { throw null; } set { } } + public string Timeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncTimeoutRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncTimeoutRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AuthorizationActionMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AuthorizationActionMapping() { } @@ -494,6 +842,69 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailabilityZonePolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailabilityZonePolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy MultiZoned { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy SingleZoned { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy left, Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy left, Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailableCheckInManifestEnvironment : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailableCheckInManifestEnvironment(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment All { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Canary { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Fairfax { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Mooncake { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Prod { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment left, Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment left, Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BlockActionVerb : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BlockActionVerb(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Action { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Delete { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Read { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Unrecognized { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Write { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb left, Azure.ResourceManager.ProviderHub.Models.BlockActionVerb right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.BlockActionVerb (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb left, Azure.ResourceManager.ProviderHub.Models.BlockActionVerb right) { throw null; } + public override string ToString() { throw null; } + } public partial class CanaryTrafficRegionRolloutConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CanaryTrafficRegionRolloutConfiguration() { } @@ -520,11 +931,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class CheckinManifestInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CheckinManifestInfo() { } - public string CommitId { get { throw null; } } - public bool IsCheckedIn { get { throw null; } } - public string PullRequest { get { throw null; } } - public string StatusMessage { get { throw null; } } + public CheckinManifestInfo(bool isCheckedIn, string statusMessage) { } + public string CommitId { get { throw null; } set { } } + public bool IsCheckedIn { get { throw null; } set { } } + public string PullRequest { get { throw null; } set { } } + public string StatusMessage { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -544,6 +955,54 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CommonApiVersionsMergeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CommonApiVersionsMergeMode(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode Merge { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode Overwrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode left, Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode left, Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CrossTenantTokenValidation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CrossTenantTokenValidation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation EnsureSecureValidation { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation PassthroughInsecureToken { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation left, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation left, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomRolloutAutoProvisionConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomRolloutAutoProvisionConfig() { } + public bool? IsResourceGraphEnabled { get { throw null; } set { } } + public bool? IsStorageEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.CustomRolloutAutoProvisionConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.CustomRolloutAutoProvisionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CustomRolloutProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomRolloutProperties(Azure.ResourceManager.ProviderHub.Models.CustomRolloutSpecification specification) { } @@ -559,10 +1018,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class CustomRolloutSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public CustomRolloutSpecification() { } public CustomRolloutSpecification(Azure.ResourceManager.ProviderHub.Models.TrafficRegions canary) { } + public Azure.ResourceManager.ProviderHub.Models.CustomRolloutAutoProvisionConfig AutoProvisionConfig { get { throw null; } set { } } public System.Collections.Generic.IList CanaryRegions { get { throw null; } } public Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistration { get { throw null; } set { } } + public bool? RefreshSubscriptionRegistration { get { throw null; } set { } } + public System.Collections.Generic.IList ReleaseScopes { get { throw null; } } public System.Collections.Generic.IList ResourceTypeRegistrations { get { throw null; } } + public bool? SkipReleaseScopeValidation { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.CustomRolloutSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -575,6 +1039,7 @@ public partial class CustomRolloutStatus : System.ClientModel.Primitives.IJsonMo public CustomRolloutStatus() { } public System.Collections.Generic.IList CompletedRegions { get { throw null; } } public System.Collections.Generic.IDictionary FailedOrSkippedRegions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo ManifestCheckinStatus { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.CustomRolloutStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -582,6 +1047,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DefaultRolloutAutoProvisionConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefaultRolloutAutoProvisionConfig() { } + public bool? IsResourceGraphEnabled { get { throw null; } set { } } + public bool? IsStorageEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.DefaultRolloutAutoProvisionConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.DefaultRolloutAutoProvisionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DefaultRolloutProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefaultRolloutProperties() { } @@ -598,8 +1075,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DefaultRolloutSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefaultRolloutSpecification() { } + public Azure.ResourceManager.ProviderHub.Models.DefaultRolloutAutoProvisionConfig AutoProvisionConfig { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.CanaryTrafficRegionRolloutConfiguration Canary { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionRolloutConfiguration HighTraffic { get { throw null; } set { } } + public bool? IsExpeditedRolloutEnabled { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionRolloutConfiguration LowTraffic { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionRolloutConfiguration MediumTraffic { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistration { get { throw null; } set { } } @@ -616,6 +1095,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DefaultRolloutStatus : Azure.ResourceManager.ProviderHub.Models.RolloutStatusBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefaultRolloutStatus() { } + public Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo ManifestCheckinStatus { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionCategory? NextTrafficRegion { get { throw null; } set { } } public System.DateTimeOffset? NextTrafficRegionScheduledOn { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.SubscriptionReregistrationResult? SubscriptionReregistrationResult { get { throw null; } set { } } @@ -626,6 +1106,36 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExpeditedRolloutIntent : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExpeditedRolloutIntent(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent Hotfix { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent left, Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent left, Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExpeditedRolloutMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExpeditedRolloutMetadata() { } + public Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent? ExpeditedRolloutIntent { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ExtendedErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExtendedErrorInfo() { } @@ -672,6 +1182,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ExtensionOptionType left, Azure.ResourceManager.ProviderHub.Models.ExtensionOptionType right) { throw null; } public override string ToString() { throw null; } } + public partial class FanoutLinkedNotificationRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FanoutLinkedNotificationRule() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.FanoutLinkedNotificationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.FanoutLinkedNotificationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FeaturesPolicy : System.IEquatable { @@ -690,10 +1214,30 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy left, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FrontdoorRequestMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FrontdoorRequestMode(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode UseManifest { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode left, Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode left, Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class IdentityManagementProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IdentityManagementProperties() { } public string ApplicationId { get { throw null; } set { } } + public System.Collections.Generic.IList ApplicationIds { get { throw null; } } + public System.Collections.Generic.IList DelegationAppIds { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? ManagementType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.IdentityManagementProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -723,6 +1267,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.IdentityManagementType left, Azure.ResourceManager.ProviderHub.Models.IdentityManagementType right) { throw null; } public override string ToString() { throw null; } } + public partial class LegacyDisallowedCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LegacyDisallowedCondition() { } + public System.Collections.Generic.IList DisallowedLegacyOperations { get { throw null; } } + public string Feature { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LegacyDisallowedCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LegacyDisallowedCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class LightHouseAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LightHouseAuthorization(string principalId, string roleDefinitionId) { } @@ -770,6 +1326,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.LinkedAction left, Azure.ResourceManager.ProviderHub.Models.LinkedAction right) { throw null; } public override string ToString() { throw null; } } + public partial class LinkedNotificationRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LinkedNotificationRule() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public System.Collections.Generic.IList ActionsOnFailedOperation { get { throw null; } } + public System.Collections.Generic.IList FastPathActions { get { throw null; } } + public System.Collections.Generic.IList FastPathActionsOnFailedOperation { get { throw null; } } + public System.TimeSpan? LinkedNotificationTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LinkedNotificationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LinkedNotificationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LinkedOperation : System.IEquatable { @@ -791,9 +1362,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class LinkedOperationRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal LinkedOperationRule() { } - public Azure.ResourceManager.ProviderHub.Models.LinkedAction LinkedAction { get { throw null; } } - public Azure.ResourceManager.ProviderHub.Models.LinkedOperation LinkedOperation { get { throw null; } } + public LinkedOperationRule(Azure.ResourceManager.ProviderHub.Models.LinkedOperation linkedOperation, Azure.ResourceManager.ProviderHub.Models.LinkedAction linkedAction) { } + public System.Collections.Generic.IList DependsOnTypes { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.LinkedAction LinkedAction { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.LinkedOperation LinkedOperation { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.LinkedOperationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -864,6 +1436,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ManifestLevelPropertyBag : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManifestLevelPropertyBag() { } + public System.Collections.Generic.IList ResourceHydrationAccounts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ManifestLevelPropertyBag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ManifestLevelPropertyBag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ManifestResourceDeletionPolicy : System.IEquatable { @@ -961,7 +1544,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public OptInHeaderType(string value) { throw null; } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ClientGroupMembership { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ClientPrincipalNameEncoded { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ManagementGroupAncestorsEncoded { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType MSIResourceIdEncoded { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType PrivateLinkId { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType PrivateLinkResourceId { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType PrivateLinkVnetTrafficTag { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ResourceGroupLocation { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType SignedAuxiliaryTokens { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType SignedUserToken { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType UnboundedClientGroupMembership { get { throw null; } } @@ -976,6 +1566,44 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OptOutHeaderType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OptOutHeaderType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType SystemDataCreatedByLastModifiedBy { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType left, Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType left, Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyExecutionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyExecutionType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType BypassPolicies { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType ExecutePolicies { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType ExpectPartialPutRequests { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType left, Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType left, Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PreflightOption : System.IEquatable { private readonly object _dummy; @@ -994,29 +1622,221 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.PreflightOption left, Azure.ResourceManager.ProviderHub.Models.PreflightOption right) { throw null; } public override string ToString() { throw null; } } - public partial class ProviderHubExtendedLocationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ProviderAdditionalAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ProviderHubExtendedLocationOptions() { } - public string ExtendedLocationOptionsType { get { throw null; } set { } } - public string SupportedPolicy { get { throw null; } set { } } + public ProviderAdditionalAuthorization() { } + public string ApplicationId { get { throw null; } set { } } + public string RoleDefinitionId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public enum ProviderHubExtendedLocationType - { - NotSpecified = 0, - EdgeZone = 1, - ArcZone = 2, + Azure.ResourceManager.ProviderHub.Models.ProviderAdditionalAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderAdditionalAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ProviderHubMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderAuthenticationScheme : System.IEquatable { - public ProviderHubMetadata() { } - public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderAuthenticationScheme(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme Bearer { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme PoP { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme left, Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme left, Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderAuthorizedApplicationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderAuthorizedApplicationProperties() { } + public System.Collections.Generic.IList DataAuthorizations { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization ProviderAuthorization { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderDstsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderDstsConfiguration(string serviceName) { } + public string ServiceDnsName { get { throw null; } set { } } + public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderEndpointInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderEndpointInformation() { } + public string Endpoint { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType? EndpointType { get { throw null; } set { } } + public string SchemaVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderEndpointInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderEndpointInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderEndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderEndpointType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType Canary { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType Production { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType TestInProduction { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderEndpointTypeResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderEndpointTypeResourceType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType Canary { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType Production { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType TestInProduction { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderExtendedLocationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderExtendedLocationType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType ArcZone { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType CustomLocation { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType EdgeZone { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType left, Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType left, Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderFeaturesRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFeaturesRule(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy requiredFeaturesPolicy) { } + public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy RequiredFeaturesPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFeaturesRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFeaturesRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderFilterRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFilterRule() { } + public System.Collections.Generic.IList EndpointInformation { get { throw null; } } + public string FilterQuery { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFilterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFilterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderFrontloadPayload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFrontloadPayload(Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties properties) { } + public Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderFrontloadPayloadProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFrontloadPayloadProperties(string operationType, string providerNamespace, string frontloadLocation, string copyFromLocation, Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment environmentType, Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction serviceFeatureFlag, System.Collections.Generic.IEnumerable includeResourceTypes, System.Collections.Generic.IEnumerable excludeResourceTypes, Azure.ResourceManager.ProviderHub.Models.ManifestLevelPropertyBag overrideManifestLevelFields, Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase overrideEndpointLevelFields, System.Collections.Generic.IEnumerable ignoreFields) { } + public string CopyFromLocation { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment EnvironmentType { get { throw null; } } + public System.Collections.Generic.IList ExcludeResourceTypes { get { throw null; } } + public string FrontloadLocation { get { throw null; } } + public System.Collections.Generic.IList IgnoreFields { get { throw null; } } + public System.Collections.Generic.IList IncludeResourceTypes { get { throw null; } } + public string OperationType { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase OverrideEndpointLevelFields { get { throw null; } } + public System.Collections.Generic.IList OverrideManifestLevelFieldsResourceHydrationAccounts { get { throw null; } } + public string ProviderNamespace { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction ServiceFeatureFlag { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderHubExtendedLocationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderHubExtendedLocationOptions() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public string ExtendedLocationOptionsType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType? LocationType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy? SupportedLocationPolicy { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public string SupportedPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public enum ProviderHubExtendedLocationType + { + NotSpecified = 0, + EdgeZone = 1, + ArcZone = 2, + CustomLocation = 3, + } + public partial class ProviderHubMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderHubMetadata() { } + public string DirectRpRoleDefinitionId { get { throw null; } set { } } + public string GlobalAsyncOperationResourceTypeName { get { throw null; } set { } } + public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } set { } } public System.Collections.Generic.IList ProviderAuthorizations { get { throw null; } } + public string RegionalAsyncOperationResourceTypeName { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ThirdPartyProviderAuthorization ThirdPartyProviderAuthorization { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ProviderHubMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1054,12 +1874,171 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState left, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderLegacyOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderLegacyOperation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Action { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation AzureAsyncOperationWaiting { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Create { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Delete { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation DeploymentCleanup { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation EvaluateDeploymentOutput { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Read { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation ResourceCacheWaiting { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation left, Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation left, Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderLocationQuotaRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderLocationQuotaRule() { } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy? Policy { get { throw null; } set { } } + public string QuotaId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderLocationQuotaRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderLocationQuotaRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderNotification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderNotification() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType? NotificationType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.SkipNotification? SkipNotifications { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderNotification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderNotificationEndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderNotificationEndpointType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType Eventhub { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType Webhook { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderNotificationOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderNotificationOption(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption EmitSpendingLimit { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderNotificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderNotificationType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType SubscriptionNotification { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType Unspecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderQuotaPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderQuotaPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy Default { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy Restricted { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy left, Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy left, Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderQuotaRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderQuotaRule() { } + public System.Collections.Generic.IList LocationRules { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy? QuotaPolicy { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderRegistrationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderRegistrationKind(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind Direct { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind Hybrid { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind Managed { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind right) { throw null; } + public override string ToString() { throw null; } + } public partial class ProviderRegistrationProperties : Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifestProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProviderRegistrationProperties() { } + public System.Collections.Generic.IList PrivateResourceProviderAllowedSubscriptions { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ProviderHubMetadata ProviderHubMetadata { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications SubscriptionLifecycleNotificationSpecifications { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1067,23 +2046,79 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProviderRequestHeaderOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderRequestHeaderOptions() { } + public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType? OptOutHeaders { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderResourceQueryFilterOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderResourceQueryFilterOption(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption EnableSubscriptionFilterOnTenant { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderResourceSubType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderResourceSubType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType AsyncOperation { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ProviderResourceType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProviderResourceType() { } + public Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType? AdditionalOptions { get { throw null; } } public System.Collections.Generic.IReadOnlyList AllowedUnauthorizedActions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AllowedUnauthorizedActionsExtensions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList AuthorizationActionMappings { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } } public string DefaultApiVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList DisallowedActionVerbs { get { throw null; } } public System.Collections.Generic.IReadOnlyList Endpoints { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExtendedLocations { get { throw null; } } public System.Collections.Generic.IReadOnlyList LinkedAccessChecks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LinkedNotificationRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList LinkedOperationRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList LoggingRules { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? ManagementType { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.MarketplaceType? MarketplaceType { get { throw null; } } public System.BinaryData Metadata { get { throw null; } } public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Notifications { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule QuotaRule { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy? ResourceDeletionPolicy { get { throw null; } } @@ -1153,6 +2188,47 @@ public enum ResourceAccessPolicy AcisReadAllowed = 1, AcisActionAllowed = 2, } + public partial class ResourceAccessRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceAccessRole() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public System.Collections.Generic.IList AllowedGroupClaims { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceAccessRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceAccessRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceConcurrencyControlOption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceConcurrencyControlOption() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy? Policy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyControlOption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyControlOption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceConcurrencyPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceConcurrencyPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy SynchronizeBeginExtension { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ResourceDeletionPolicy : System.IEquatable { @@ -1172,6 +2248,76 @@ public enum ResourceAccessPolicy public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceGraphConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceGraphConfiguration() { } + public string ApiVersion { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceHydrationAccount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceHydrationAccount() { } + public string AccountName { get { throw null; } set { } } + public string EncryptedKey { get { throw null; } set { } } + public long? MaxChildResourceConsistencyJobLimit { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceHydrationAccount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceHydrationAccount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceManagementAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceManagementAction() { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceManagementEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceManagementEntity(Azure.Core.ResourceIdentifier resourceId) { } + public string HomeTenantId { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceManagementSupportedOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceManagementSupportedOperation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation Delete { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation Get { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation left, Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation left, Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation right) { throw null; } + public override string ToString() { throw null; } + } public partial class ResourceMovePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceMovePolicy() { } @@ -1188,7 +2334,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ResourceProviderAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceProviderAuthorization() { } + public System.Collections.Generic.IList AllowedThirdPartyExtensions { get { throw null; } } public string ApplicationId { get { throw null; } set { } } + public string GroupingTag { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagedByAuthorization ManagedByAuthorization { get { throw null; } set { } } public string ManagedByRoleDefinitionId { get { throw null; } set { } } public string RoleDefinitionId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1232,14 +2381,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ResourceProviderEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ResourceProviderEndpoint() { } + public ResourceProviderEndpoint() { } public System.Collections.Generic.IReadOnlyList ApiVersions { get { throw null; } } - public System.Uri EndpointUri { get { throw null; } } - public bool? IsEnabled { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType? EndpointType { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredFeatures { get { throw null; } } - public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } - public System.TimeSpan? Timeout { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public string SkuLink { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1247,16 +2398,39 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceProviderManagedByAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceProviderManagedByAuthorization() { } + public System.Collections.Generic.IList AdditionalAuthorizations { get { throw null; } } + public bool? DoesAllowManagedByInheritance { get { throw null; } set { } } + public string ManagedByResourceRoleDefinitionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagedByAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagedByAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResourceProviderManagement : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceProviderManagement() { } + public System.Collections.Generic.IList AuthorizationOwners { get { throw null; } } + public System.Collections.Generic.IList CanaryManifestOwners { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutMetadata ExpeditedRolloutMetadata { get { throw null; } set { } } + public System.Collections.Generic.IList ExpeditedRolloutSubmitters { get { throw null; } } public string IncidentContactEmail { get { throw null; } set { } } public string IncidentRoutingService { get { throw null; } set { } } public string IncidentRoutingTeam { get { throw null; } set { } } public System.Collections.Generic.IList ManifestOwners { get { throw null; } } + public string ProfitCenterCode { get { throw null; } set { } } + public string ProfitCenterProgramId { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceAccessPolicy? ResourceAccessPolicy { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceAccessRoleList { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property has been deprecated, please use `ResourceAccessRoleList` instead.", false)] public System.Collections.Generic.IList ResourceAccessRoles { get { throw null; } } public System.Collections.Generic.IList SchemaOwners { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType? ServerFailureResponseMessageType { get { throw null; } set { } } public System.Collections.Generic.IList ServiceTreeInfos { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1268,20 +2442,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ResourceProviderManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResourceProviderManifest() { } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } } public System.Collections.Generic.IReadOnlyList GlobalNotificationEndpoints { get { throw null; } } + public bool? IsTenantLinkedNotificationEnabled { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LinkedNotificationRules { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement Management { get { throw null; } } public System.BinaryData Metadata { get { throw null; } } public string Namespace { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Notifications { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } } public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProviderAuthorizations { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? ProviderType { get { throw null; } } public string ProviderVersion { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata ReRegisterSubscriptionMetadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public string ServiceName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Services { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1292,17 +2474,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ResourceProviderManifestProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceProviderManifestProperties() { } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } set { } } public System.Collections.Generic.IList Capabilities { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } set { } } + public string CustomManifestVersion { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } + public bool? EnableTenantLinkedNotification { get { throw null; } set { } } + public System.Collections.Generic.IList GlobalNotificationEndpoints { get { throw null; } } + public string LegacyNamespace { get { throw null; } set { } } + public System.Collections.Generic.IList LegacyRegistrations { get { throw null; } } + public System.Collections.Generic.IList LinkedNotificationRules { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement Management { get { throw null; } set { } } + public System.Collections.Generic.IList ManagementGroupGlobalNotificationEndpoints { get { throw null; } } public System.BinaryData Metadata { get { throw null; } set { } } public string Namespace { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption? NotificationOptions { get { throw null; } set { } } + public System.Collections.Generic.IList Notifications { get { throw null; } } + public System.Collections.Generic.IList NotificationSubscriberSettings { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } set { } } + public System.Collections.Generic.IList OptionalFeatures { get { throw null; } } public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } set { } } public System.Collections.Generic.IList ProviderAuthorizations { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? ProviderType { get { throw null; } set { } } public string ProviderVersion { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } set { } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.BlockActionVerb? ResourceGroupLockOptionDuringMoveBlockActionVerb { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceHydrationAccounts { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType? ServiceClientOptionsType { get { throw null; } set { } } + public string ServiceName { get { throw null; } set { } } + public System.Collections.Generic.IList Services { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions TemplateDeploymentOptions { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1311,6 +2513,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceProviderService : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceProviderService() { } + public string ServiceName { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProviderServiceStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProviderServiceStatus(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus Active { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus left, Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus left, Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ResourceProviderType : System.IEquatable { @@ -1341,14 +2573,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ResourceRoutingType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType BypassEndpointSelectionOptimization { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType CascadeAuthorizedExtension { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType CascadeExtension { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType ChildFanout { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Default { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Extension { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Failover { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Fanout { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType HostBased { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType LocationBased { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType LocationMapping { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType ProxyOnly { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType ServiceFanout { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Tenant { get { throw null; } } public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1372,16 +2609,65 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeCategory(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory FreeForm { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory Internal { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory PureProxy { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeDataBoundary : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeDataBoundary(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary EU { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary Global { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary NotDefined { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary US { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary right) { throw null; } + public override string ToString() { throw null; } + } public partial class ResourceTypeEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeEndpoint() { } + public string ApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList ApiVersions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary? DataBoundary { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType? EndpointType { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } public System.Collections.Generic.IList Extensions { get { throw null; } } public bool? IsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind? Kind { get { throw null; } set { } } public System.Collections.Generic.IList Locations { get { throw null; } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public string SkuLink { get { throw null; } set { } } public System.TimeSpan? Timeout { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1389,6 +2675,64 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceTypeEndpointBase : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeEndpointBase(bool enabled, System.Collections.Generic.IEnumerable apiVersions, System.Uri endpointUri, System.Collections.Generic.IEnumerable locations, System.Collections.Generic.IEnumerable requiredFeatures, Azure.ResourceManager.ProviderHub.Models.ProviderFeaturesRule featuresRule, System.TimeSpan timeout, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType endpointType, Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration dstsConfiguration, string skuLink, string apiVersion, System.Collections.Generic.IEnumerable zones) { } + public string ApiVersion { get { throw null; } } + public System.Collections.Generic.IList ApiVersions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } } + public bool Enabled { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType EndpointType { get { throw null; } } + public System.Uri EndpointUri { get { throw null; } } + public System.Collections.Generic.IList Locations { get { throw null; } } + public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } + public string SkuLink { get { throw null; } } + public System.TimeSpan Timeout { get { throw null; } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeEndpointKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeEndpointKind(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind Direct { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind Managed { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeExtendedLocationPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeExtendedLocationPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy All { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy right) { throw null; } + public override string ToString() { throw null; } + } public partial class ResourceTypeExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeExtension() { } @@ -1408,6 +2752,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ResourceTypeExtensionCategory(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory BestMatchOperationBegin { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory NotSpecified { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceCreationBegin { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceCreationCompleted { get { throw null; } } @@ -1424,6 +2769,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceReadBegin { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceReadValidate { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory SubscriptionLifecycleNotification { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory SubscriptionLifecycleNotificationDeletion { get { throw null; } } public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1434,38 +2780,183 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceTypeOnBehalfOfToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeOnBehalfOfToken() { } + public string ActionName { get { throw null; } set { } } + public string LifeTime { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceTypeRegistrationApiProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationApiProfile() { } + public string ApiVersion { get { throw null; } set { } } + public string ProfileVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationApiProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationApiProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeRegistrationCapacityPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeRegistrationCapacityPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy Default { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy Restricted { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ResourceTypeRegistrationCapacityRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationCapacityRule() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy? CapacityPolicy { get { throw null; } set { } } + public string SkuAlias { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceTypeRegistrationDeleteDependency : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationDeleteDependency() { } + public string LinkedProperty { get { throw null; } set { } } + public string LinkedType { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationDeleteDependency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationDeleteDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeRegistrationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeRegistrationKind(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind Direct { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind Hybrid { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind Managed { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ResourceTypeRegistrationLegacyPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationLegacyPolicy() { } + public System.Collections.Generic.IList DisallowedConditions { get { throw null; } } + public System.Collections.Generic.IList DisallowedLegacyOperations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResourceTypeRegistrationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeRegistrationProperties() { } + public Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration? AdditionalOptions { get { throw null; } set { } } + public System.Collections.Generic.IList AllowedResourceNames { get { throw null; } } + public System.Collections.Generic.IList AllowedTemplateDeploymentReferenceActions { get { throw null; } } public System.Collections.Generic.IList AllowedUnauthorizedActions { get { throw null; } } + public System.Collections.Generic.IList AllowedUnauthorizedActionsExtensions { get { throw null; } } + public System.Collections.Generic.IList ApiProfiles { get { throw null; } } + public bool? AreTagsSupported { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } set { } } + public string AsyncOperationResourceTypeName { get { throw null; } set { } } + public System.Collections.Generic.IList AsyncTimeoutRules { get { throw null; } } public System.Collections.Generic.IList AuthorizationActionMappings { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy? AvailabilityZonePolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule CapacityRule { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory? Category { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.CheckNameAvailabilitySpecifications CheckNameAvailabilitySpecifications { get { throw null; } set { } } + public System.Collections.Generic.IList CommonApiVersions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode? CommonApiVersionsMergeMode { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } set { } } public string DefaultApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList DisallowedActionVerbs { get { throw null; } } + public System.Collections.Generic.IList DisallowedEndUserOperations { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList Endpoints { get { throw null; } } public System.Collections.Generic.IList ExtendedLocations { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ExtensionOptions ExtensionOptionsResourceCreationBegin { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode? FrontdoorRequestMode { get { throw null; } set { } } + public string GroupingTag { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.IdentityManagementProperties IdentityManagement { get { throw null; } set { } } + public bool? IsAddOnPlanConversionAllowed { get { throw null; } set { } } + public bool? IsAddResourceListTargetLocationsAllowed { get { throw null; } set { } } public bool? IsAsyncOperationEnabled { get { throw null; } set { } } + public bool? IsEmptyRoleAssignmentsAllowed { get { throw null; } set { } } + public bool? IsNoncompliantCollectionResponseAllowed { get { throw null; } set { } } public bool? IsPureProxy { get { throw null; } set { } } public bool? IsThirdPartyS2SEnabled { get { throw null; } set { } } + public string LegacyName { get { throw null; } set { } } + public System.Collections.Generic.IList LegacyNames { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy LegacyPolicy { get { throw null; } set { } } public System.Collections.Generic.IList LinkedAccessChecks { get { throw null; } } + public System.Collections.Generic.IList LinkedNotificationRules { get { throw null; } } + public System.Collections.Generic.IList LinkedOperationRules { get { throw null; } } public System.Collections.Generic.IList LoggingRules { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement Management { get { throw null; } set { } } + public string ManifestLink { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.MarketplaceType? MarketplaceType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + public System.Collections.Generic.IList Notifications { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken OnBehalfOfTokens { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType? PolicyExecutionType { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProvisioningState { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule QuotaRule { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality? Regionality { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } set { } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache ResourceCache { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ResourceConcurrencyControlOptions { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy? ResourceDeletionPolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration ResourceGraphConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions ResourceManagementOptions { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceMovePolicy ResourceMovePolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption? ResourceQueryManagementFilterOption { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType? ResourceSubType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceValidation? ResourceValidation { get { throw null; } set { } } + public string RoutingRuleHostResourceType { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? RoutingType { get { throw null; } set { } } public System.Collections.Generic.IList ServiceTreeInfos { get { throw null; } } + public string SkuLink { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications SubscriptionLifecycleNotificationSpecifications { get { throw null; } set { } } public System.Collections.Generic.IList SubscriptionStateRules { get { throw null; } } public System.Collections.Generic.IList SwaggerSpecifications { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions TemplateDeploymentOptions { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy TemplateDeploymentPolicy { get { throw null; } set { } } public System.Collections.Generic.IList ThrottlingRules { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1492,6 +2983,31 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceTypeRegistrationResourceCache : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationResourceCache() { } + public bool? IsResourceCacheEnabled { get { throw null; } set { } } + public string ResourceCacheExpirationTimespan { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceTypeRegistrationResourceManagementOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationResourceManagementOptions() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation? BatchProvisioningSupportSupportedOperations { get { throw null; } set { } } + public System.Collections.Generic.IList DeleteDependencies { get { throw null; } } + public string NestedProvisioningSupportMinimumApiVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResourceTypeSkuCapacity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeSkuCapacity(int minimum) { } @@ -1523,8 +3039,10 @@ public partial class ResourceTypeSkuLocationInfo : System.ClientModel.Primitives { public ResourceTypeSkuLocationInfo(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IList ExtendedLocations { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationType? ExtendedLocationType { get { throw null; } set { } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType? LocationType { get { throw null; } set { } } public System.Collections.Generic.IList ZoneDetails { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1630,10 +3148,65 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServerFailureResponseMessageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServerFailureResponseMessageType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType OutageReporting { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType left, Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType left, Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceClientOptionsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceClientOptionsType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType DisableAutomaticDecompression { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType left, Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType left, Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceFeatureFlagAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceFeatureFlagAction(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction Create { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction DoNotCreate { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction left, Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction left, Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction right) { throw null; } + public override string ToString() { throw null; } + } public partial class ServiceTreeInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServiceTreeInfo() { } public string ComponentId { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness? Readiness { get { throw null; } set { } } public string ServiceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ServiceTreeInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1642,6 +3215,79 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceTreeReadiness : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceTreeReadiness(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness ClosingDown { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness Deprecated { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness GA { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness InDevelopment { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness InternalOnly { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness PrivatePreview { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness PublicPreview { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness RemovedFromARM { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness Retired { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness left, Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness left, Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SignedRequestScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SignedRequestScope(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.SignedRequestScope Endpoint { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.SignedRequestScope ResourceUri { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.SignedRequestScope other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.SignedRequestScope left, Azure.ResourceManager.ProviderHub.Models.SignedRequestScope right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.SignedRequestScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.SignedRequestScope left, Azure.ResourceManager.ProviderHub.Models.SignedRequestScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SkipNotification : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SkipNotification(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.SkipNotification Disabled { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.SkipNotification Enabled { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.SkipNotification Unspecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.SkipNotification other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.SkipNotification left, Azure.ResourceManager.ProviderHub.Models.SkipNotification right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.SkipNotification (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.SkipNotification left, Azure.ResourceManager.ProviderHub.Models.SkipNotification right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubscriberSetting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SubscriberSetting() { } + public System.Collections.Generic.IList FilterRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.SubscriberSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.SubscriberSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SubscriptionLifecycleNotificationSpecifications : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SubscriptionLifecycleNotificationSpecifications() { } @@ -1781,9 +3427,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class TemplateDeploymentPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal TemplateDeploymentPolicy() { } - public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability Capabilities { get { throw null; } } - public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption PreflightOptions { get { throw null; } } + public TemplateDeploymentPolicy(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability capabilities, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption preflightOptions) { } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability Capabilities { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification? PreflightNotifications { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption PreflightOptions { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1792,6 +3439,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TemplateDeploymentPreflightNotification : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TemplateDeploymentPreflightNotification(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification UnregisteredSubscriptions { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification left, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification left, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TemplateDeploymentPreflightOption : System.IEquatable { private readonly object _dummy; @@ -1812,6 +3477,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption left, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption right) { throw null; } public override string ToString() { throw null; } } + public partial class ThirdPartyExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ThirdPartyExtension() { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ThirdPartyExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ThirdPartyExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ThirdPartyProviderAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThirdPartyProviderAuthorization() { } @@ -1860,6 +3536,7 @@ public partial class ThrottlingRule : System.ClientModel.Primitives.IJsonModel metrics) { } public string Action { get { throw null; } set { } } + public System.Collections.Generic.IList ApplicationId { get { throw null; } } public System.Collections.Generic.IList Metrics { get { throw null; } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1869,6 +3546,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class TokenAuthConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TokenAuthConfiguration() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme? AuthenticationScheme { get { throw null; } set { } } + public bool? DisableCertificateAuthenticationFallback { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.SignedRequestScope? SignedRequestScope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TrafficRegionCategory : System.IEquatable { diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.netstandard2.0.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.netstandard2.0.cs index df0c26c473c2..8e2179b4b840 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.netstandard2.0.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/api/Azure.ResourceManager.ProviderHub.netstandard2.0.cs @@ -41,8 +41,12 @@ protected CustomRolloutResource() { } public virtual Azure.ResourceManager.ProviderHub.CustomRolloutData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, string rolloutName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Stop(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ProviderHub.CustomRolloutData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.CustomRolloutData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -255,6 +259,53 @@ protected NotificationRegistrationResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.NotificationRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.NotificationRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ProviderAuthorizedApplicationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProviderAuthorizedApplicationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, System.Guid applicationId, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, System.Guid applicationId, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProviderAuthorizedApplicationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderAuthorizedApplicationData() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderAuthorizedApplicationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProviderAuthorizedApplicationResource() { } + public virtual Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, System.Guid applicationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public static partial class ProviderHubExtensions { public static Azure.ResourceManager.ProviderHub.CustomRolloutResource GetCustomRolloutResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -263,13 +314,68 @@ public static partial class ProviderHubExtensions public static Azure.ResourceManager.ProviderHub.NestedResourceTypeSecondSkuResource GetNestedResourceTypeSecondSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.NestedResourceTypeThirdSkuResource GetNestedResourceTypeThirdSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.NotificationRegistrationResource GetNotificationRegistrationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationResource GetProviderAuthorizedApplicationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetProviderMonitorSetting(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetProviderMonitorSettingAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderMonitorSettingResource GetProviderMonitorSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderMonitorSettingCollection GetProviderMonitorSettings(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetProviderMonitorSettings(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetProviderMonitorSettingsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetProviderRegistration(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetProviderRegistrationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ProviderHub.ProviderRegistrationResource GetProviderRegistrationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.ProviderRegistrationCollection GetProviderRegistrations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.ProviderHub.RegistrationNewRegionFrontloadReleaseResource GetRegistrationNewRegionFrontloadReleaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationResource GetResourceTypeRegistrationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ProviderHub.ResourceTypeSkuResource GetResourceTypeSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } + public partial class ProviderMonitorSettingCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProviderMonitorSettingCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string providerMonitorSettingName, Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string providerMonitorSettingName, Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProviderMonitorSettingData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderMonitorSettingData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProviderMonitorSettingProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderMonitorSettingResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProviderMonitorSettingResource() { } + public virtual Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ProviderRegistrationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ProviderRegistrationCollection() { } @@ -290,6 +396,7 @@ protected ProviderRegistrationCollection() { } public partial class ProviderRegistrationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProviderRegistrationData() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind? Kind { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.ProviderRegistrationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -309,8 +416,12 @@ protected ProviderRegistrationResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DeleteResourcesResourceAction(Azure.WaitUntil waitUntil, string resourceActionName, Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteResourcesResourceActionAsync(Azure.WaitUntil waitUntil, string resourceActionName, Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GenerateManifest(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GenerateManifestAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GenerateManifestNewRegionFrontloadRelease(Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GenerateManifestNewRegionFrontloadReleaseAsync(Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetCustomRollout(string rolloutName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -322,6 +433,12 @@ protected ProviderRegistrationResource() { } public virtual Azure.Response GetNotificationRegistration(string notificationRegistrationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNotificationRegistrationAsync(string notificationRegistrationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ProviderHub.NotificationRegistrationCollection GetNotificationRegistrations() { throw null; } + public virtual Azure.Response GetProviderAuthorizedApplication(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProviderAuthorizedApplicationAsync(System.Guid applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationCollection GetProviderAuthorizedApplications() { throw null; } + public virtual Azure.Response GetRegistrationNewRegionFrontloadRelease(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRegistrationNewRegionFrontloadReleaseAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.RegistrationNewRegionFrontloadReleaseCollection GetRegistrationNewRegionFrontloadReleases() { throw null; } public virtual Azure.Response GetResourceTypeRegistration(string resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetResourceTypeRegistrationAsync(string resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationCollection GetResourceTypeRegistrations() { throw null; } @@ -333,6 +450,37 @@ protected ProviderRegistrationResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.ProviderRegistrationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class RegistrationNewRegionFrontloadReleaseCollection : Azure.ResourceManager.ArmCollection + { + protected RegistrationNewRegionFrontloadReleaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string releaseName, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string releaseName, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string releaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class RegistrationNewRegionFrontloadReleaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RegistrationNewRegionFrontloadReleaseResource() { } + public virtual Azure.ResourceManager.ProviderHub.DefaultRolloutData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, string releaseName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Stop(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ProviderHub.DefaultRolloutData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.DefaultRolloutData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ResourceTypeRegistrationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ResourceTypeRegistrationCollection() { } @@ -353,6 +501,7 @@ protected ResourceTypeRegistrationCollection() { } public partial class ResourceTypeRegistrationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeRegistrationData() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind? Kind { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -451,13 +600,25 @@ protected MockableProviderHubArmClient() { } public virtual Azure.ResourceManager.ProviderHub.NestedResourceTypeSecondSkuResource GetNestedResourceTypeSecondSkuResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.NestedResourceTypeThirdSkuResource GetNestedResourceTypeThirdSkuResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.NotificationRegistrationResource GetNotificationRegistrationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationResource GetProviderAuthorizedApplicationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderMonitorSettingResource GetProviderMonitorSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ProviderRegistrationResource GetProviderRegistrationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.RegistrationNewRegionFrontloadReleaseResource GetRegistrationNewRegionFrontloadReleaseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationResource GetResourceTypeRegistrationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ResourceTypeSkuResource GetResourceTypeSkuResource(Azure.Core.ResourceIdentifier id) { throw null; } } + public partial class MockableProviderHubResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableProviderHubResourceGroupResource() { } + public virtual Azure.Response GetProviderMonitorSetting(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProviderMonitorSettingAsync(string providerMonitorSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ProviderHub.ProviderMonitorSettingCollection GetProviderMonitorSettings() { throw null; } + } public partial class MockableProviderHubSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableProviderHubSubscriptionResource() { } + public virtual Azure.Pageable GetProviderMonitorSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProviderMonitorSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetProviderRegistration(string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetProviderRegistrationAsync(string providerNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ProviderHub.ProviderRegistrationCollection GetProviderRegistrations() { throw null; } @@ -465,23 +626,210 @@ protected MockableProviderHubSubscriptionResource() { } } namespace Azure.ResourceManager.ProviderHub.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOptionAsyncOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOptionAsyncOperation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation ProtectedAsyncOperationPolling { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation ProtectedAsyncOperationPollingAuditOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOptionResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOptionResourceType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType ProtectedAsyncOperationPolling { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType ProtectedAsyncOperationPollingAuditOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOptionResourceTypeRegistration : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOptionResourceTypeRegistration(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration ProtectedAsyncOperationPolling { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration ProtectedAsyncOperationPollingAuditOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration left, Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AllowedResourceName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AllowedResourceName() { } + public string GetActionVerb { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedResourceName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedResourceName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AllowedUnauthorizedActionIntent : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AllowedUnauthorizedActionIntent(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent DeferredAccessCheck { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent LowPrivilege { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent RPContract { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent left, Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent left, Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AllowedUnauthorizedActionsExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AllowedUnauthorizedActionsExtension() { } + public string Action { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionIntent? Intent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionsExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AllowedUnauthorizedActionsExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApplicationDataAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApplicationDataAuthorization(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole role) { } + public System.Collections.Generic.IList ResourceTypes { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole Role { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationDataAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationDataAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApplicationOwnershipRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApplicationOwnershipRole(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole LimitedOwner { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole ServiceOwner { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole left, Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole left, Azure.ResourceManager.ProviderHub.Models.ApplicationOwnershipRole right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ApplicationProviderAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApplicationProviderAuthorization() { } + public string ManagedByRoleDefinitionId { get { throw null; } set { } } + public string RoleDefinitionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public static partial class ArmProviderHubModelFactory { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo CheckinManifestInfo(bool isCheckedIn = false, string statusMessage = null, string pullRequest = null, string commitId = null) { throw null; } public static Azure.ResourceManager.ProviderHub.CustomRolloutData CustomRolloutData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.CustomRolloutProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.CustomRolloutProperties CustomRolloutProperties(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), Azure.ResourceManager.ProviderHub.Models.CustomRolloutSpecification specification = null, Azure.ResourceManager.ProviderHub.Models.CustomRolloutStatus status = null) { throw null; } public static Azure.ResourceManager.ProviderHub.DefaultRolloutData DefaultRolloutData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.DefaultRolloutProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.DefaultRolloutProperties DefaultRolloutProperties(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), Azure.ResourceManager.ProviderHub.Models.DefaultRolloutSpecification specification = null, Azure.ResourceManager.ProviderHub.Models.DefaultRolloutStatus status = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.LinkedOperationRule LinkedOperationRule(Azure.ResourceManager.ProviderHub.Models.LinkedOperation linkedOperation = default(Azure.ResourceManager.ProviderHub.Models.LinkedOperation), Azure.ResourceManager.ProviderHub.Models.LinkedAction linkedAction = default(Azure.ResourceManager.ProviderHub.Models.LinkedAction)) { throw null; } public static Azure.ResourceManager.ProviderHub.NotificationRegistrationData NotificationRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.NotificationRegistrationProperties properties = null) { throw null; } - public static Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.NotificationRegistrationProperties NotificationRegistrationProperties(Azure.ResourceManager.ProviderHub.Models.NotificationMode? notificationMode = default(Azure.ResourceManager.ProviderHub.Models.NotificationMode?), Azure.ResourceManager.ProviderHub.Models.MessageScope? messageScope = default(Azure.ResourceManager.ProviderHub.Models.MessageScope?), System.Collections.Generic.IEnumerable includedEvents = null, System.Collections.Generic.IEnumerable notificationEndpoints = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderAuthorizedApplicationData ProviderAuthorizedApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties ProviderAuthorizedApplicationProperties(Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization providerAuthorization = null, System.Collections.Generic.IEnumerable dataAuthorizations = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderMonitorSettingData ProviderMonitorSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? providerMonitorSettingProvisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistrationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties properties) { throw null; } + public static Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties properties = null, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind? kind = default(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties ProviderRegistrationProperties(System.Collections.Generic.IEnumerable providerAuthenticationAllowedAudiences = null, System.Collections.Generic.IEnumerable providerAuthorizations = null, string @namespace = null, System.Collections.Generic.IEnumerable services = null, string serviceName = null, string providerVersion = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? providerType = default(Azure.ResourceManager.ProviderHub.Models.ResourceProviderType?), System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, System.Collections.Generic.IEnumerable capabilities = null, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), System.BinaryData metadata = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions templateDeploymentOptions = null, System.Collections.Generic.IEnumerable globalNotificationEndpoints = null, bool? enableTenantLinkedNotification = default(bool?), System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null, Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration dstsConfiguration = null, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption? notificationOptions = default(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption?), System.Collections.Generic.IEnumerable resourceHydrationAccounts = null, System.Collections.Generic.IEnumerable notificationSubscriberSettings = null, System.Collections.Generic.IEnumerable managementGroupGlobalNotificationEndpoints = null, System.Collections.Generic.IEnumerable optionalFeatures = null, Azure.ResourceManager.ProviderHub.Models.BlockActionVerb? resourceGroupLockOptionDuringMoveBlockActionVerb = default(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb?), Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType? serviceClientOptionsType = default(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType?), string legacyNamespace = null, System.Collections.Generic.IEnumerable legacyRegistrations = null, string customManifestVersion = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubMetadata providerHubMetadata = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications = null, System.Collections.Generic.IEnumerable privateResourceProviderAllowedSubscriptions = null, Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration tokenAuthConfiguration = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceType ProviderResourceType(string name = null, Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? routingType = default(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType?), Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType? additionalOptions = default(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType?), Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), Azure.ResourceManager.ProviderHub.Models.ResourceValidation? resourceValidation = default(Azure.ResourceManager.ProviderHub.Models.ResourceValidation?), System.Collections.Generic.IEnumerable allowedUnauthorizedActions = null, System.Collections.Generic.IEnumerable allowedUnauthorizedActionsExtensions = null, System.Collections.Generic.IEnumerable authorizationActionMappings = null, System.Collections.Generic.IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, System.Collections.Generic.IEnumerable loggingRules = null, System.Collections.Generic.IEnumerable throttlingRules = null, System.Collections.Generic.IEnumerable endpoints = null, Azure.ResourceManager.ProviderHub.Models.MarketplaceType? marketplaceType = default(Azure.ResourceManager.ProviderHub.Models.MarketplaceType?), Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? managementType = default(Azure.ResourceManager.ProviderHub.Models.IdentityManagementType?), System.BinaryData metadata = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.Collections.Generic.IEnumerable subscriptionStateRules = null, System.Collections.Generic.IEnumerable serviceTreeInfos = null, Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, string skuLink = null, System.Collections.Generic.IEnumerable disallowedActionVerbs = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy templateDeploymentPolicy = null, System.Collections.Generic.IEnumerable extendedLocations = null, System.Collections.Generic.IEnumerable linkedOperationRules = null, Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy? resourceDeletionPolicy = default(Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule quotaRule = null, System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceType ProviderResourceType(string name = null, Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? routingType = default(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType?), Azure.ResourceManager.ProviderHub.Models.ResourceValidation? resourceValidation = default(Azure.ResourceManager.ProviderHub.Models.ResourceValidation?), System.Collections.Generic.IEnumerable allowedUnauthorizedActions = null, System.Collections.Generic.IEnumerable authorizationActionMappings = null, System.Collections.Generic.IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, System.Collections.Generic.IEnumerable loggingRules = null, System.Collections.Generic.IEnumerable throttlingRules = null, System.Collections.Generic.IEnumerable endpoints = null, Azure.ResourceManager.ProviderHub.Models.MarketplaceType? marketplaceType = default(Azure.ResourceManager.ProviderHub.Models.MarketplaceType?), Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? managementType = default(Azure.ResourceManager.ProviderHub.Models.IdentityManagementType?), System.BinaryData metadata = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.Collections.Generic.IEnumerable subscriptionStateRules = null, System.Collections.Generic.IEnumerable serviceTreeInfos = null, Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? optInHeaders = default(Azure.ResourceManager.ProviderHub.Models.OptInHeaderType?), string skuLink = null, System.Collections.Generic.IEnumerable disallowedActionVerbs = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy templateDeploymentPolicy = null, System.Collections.Generic.IEnumerable extendedLocations = null, System.Collections.Generic.IEnumerable linkedOperationRules = null, Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy? resourceDeletionPolicy = default(Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy?)) { throw null; } public static Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata ReRegisterSubscriptionMetadata(bool isEnabled = false, int? concurrencyLimit = default(int?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementEntity ResourceManagementEntity(Azure.Core.ResourceIdentifier resourceId = null, string homeTenantId = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string status = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable apiVersions = null, System.Uri endpointUri = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.TimeSpan? timeout = default(System.TimeSpan?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable apiVersions = null, System.Uri endpointUri = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), System.TimeSpan? timeout = default(System.TimeSpan?), Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType? endpointType = default(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType?), string skuLink = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifest ResourceProviderManifest(System.Collections.Generic.IEnumerable providerAuthenticationAllowedAudiences = null, System.Collections.Generic.IEnumerable providerAuthorizations = null, string @namespace = null, System.Collections.Generic.IEnumerable services = null, string serviceName = null, string providerVersion = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? providerType = default(Azure.ResourceManager.ProviderHub.Models.ResourceProviderType?), System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, System.Collections.Generic.IEnumerable resourceTypes = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, System.Collections.Generic.IEnumerable capabilities = null, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), System.BinaryData metadata = null, System.Collections.Generic.IEnumerable globalNotificationEndpoints = null, Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null, bool? isTenantLinkedNotificationEnabled = default(bool?), System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifest ResourceProviderManifest(System.Collections.Generic.IEnumerable providerAuthenticationAllowedAudiences = null, System.Collections.Generic.IEnumerable providerAuthorizations = null, string @namespace = null, string providerVersion = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? providerType = default(Azure.ResourceManager.ProviderHub.Models.ResourceProviderType?), System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? optInHeaders = default(Azure.ResourceManager.ProviderHub.Models.OptInHeaderType?), System.Collections.Generic.IEnumerable resourceTypes = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, System.Collections.Generic.IEnumerable capabilities = null, System.BinaryData metadata = null, System.Collections.Generic.IEnumerable globalNotificationEndpoints = null, Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null) { throw null; } - public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData ResourceTypeRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties properties = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData ResourceTypeRegistrationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties properties) { throw null; } + public static Azure.ResourceManager.ProviderHub.ResourceTypeRegistrationData ResourceTypeRegistrationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties properties = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind? kind = default(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind?)) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties ResourceTypeRegistrationProperties(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? routingType = default(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType?), Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration? additionalOptions = default(Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration?), Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? crossTenantTokenValidation = default(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation?), Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality? regionality = default(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality?), System.Collections.Generic.IEnumerable endpoints = null, Azure.ResourceManager.ProviderHub.Models.ExtensionOptions extensionOptionsResourceCreationBegin = null, Azure.ResourceManager.ProviderHub.Models.MarketplaceType? marketplaceType = default(Azure.ResourceManager.ProviderHub.Models.MarketplaceType?), System.Collections.Generic.IEnumerable swaggerSpecifications = null, System.Collections.Generic.IEnumerable allowedUnauthorizedActions = null, System.Collections.Generic.IEnumerable allowedUnauthorizedActionsExtensions = null, System.Collections.Generic.IEnumerable authorizationActionMappings = null, System.Collections.Generic.IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, System.Collections.Generic.IEnumerable loggingRules = null, System.Collections.Generic.IEnumerable throttlingRules = null, System.Collections.Generic.IEnumerable requiredFeatures = null, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? requiredFeaturesPolicy = default(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy?), bool? isAsyncOperationEnabled = default(bool?), Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?), bool? isThirdPartyS2SEnabled = default(bool?), Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications = null, bool? isPureProxy = default(bool?), Azure.ResourceManager.ProviderHub.Models.IdentityManagementProperties identityManagement = null, Azure.ResourceManager.ProviderHub.Models.CheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications = null, System.Collections.Generic.IEnumerable disallowedActionVerbs = null, System.Collections.Generic.IEnumerable serviceTreeInfos = null, Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions requestHeaderOptions = null, System.Collections.Generic.IEnumerable subscriptionStateRules = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions templateDeploymentOptions = null, System.Collections.Generic.IEnumerable extendedLocations = null, Azure.ResourceManager.ProviderHub.Models.ResourceMovePolicy resourceMovePolicy = null, Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy? resourceDeletionPolicy = default(Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy?), System.Collections.Generic.IDictionary resourceConcurrencyControlOptions = null, Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration resourceGraphConfiguration = null, Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement management = null, bool? isNoncompliantCollectionResponseAllowed = default(bool?), Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken onBehalfOfTokens = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory? category = default(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory?), Azure.ResourceManager.ProviderHub.Models.ResourceValidation? resourceValidation = default(Azure.ResourceManager.ProviderHub.Models.ResourceValidation?), System.Collections.Generic.IEnumerable disallowedEndUserOperations = null, System.Collections.Generic.IDictionary metadata = null, string skuLink = null, Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule quotaRule = null, System.Collections.Generic.IEnumerable notifications = null, System.Collections.Generic.IEnumerable linkedNotificationRules = null, Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules asyncOperationPollingRules = null, Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration tokenAuthConfiguration = null, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy templateDeploymentPolicy = null, bool? isEmptyRoleAssignmentsAllowed = default(bool?), Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType? policyExecutionType = default(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType?), Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy? availabilityZonePolicy = default(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy?), Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration dstsConfiguration = null, System.Collections.Generic.IEnumerable asyncTimeoutRules = null, System.Collections.Generic.IEnumerable commonApiVersions = null, System.Collections.Generic.IEnumerable apiProfiles = null, System.Collections.Generic.IEnumerable linkedOperationRules = null, string legacyName = null, System.Collections.Generic.IEnumerable legacyNames = null, System.Collections.Generic.IEnumerable allowedTemplateDeploymentReferenceActions = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy legacyPolicy = null, string manifestLink = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule capacityRule = null, bool? isAddOnPlanConversionAllowed = default(bool?), System.Collections.Generic.IEnumerable allowedResourceNames = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache resourceCache = null, Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption? resourceQueryManagementFilterOption = default(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption?), bool? areTagsSupported = default(bool?), Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions resourceManagementOptions = null, string groupingTag = null, bool? isAddResourceListTargetLocationsAllowed = default(bool?), Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode? commonApiVersionsMergeMode = default(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode?), string routingRuleHostResourceType = null, Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode? frontdoorRequestMode = default(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode?), Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType? resourceSubType = default(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType?), string asyncOperationResourceTypeName = null) { throw null; } public static Azure.ResourceManager.ProviderHub.ResourceTypeSkuData ResourceTypeSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ProviderHub.Models.ResourceTypeSkuProperties properties = null) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeSkuProperties ResourceTypeSkuProperties(System.Collections.Generic.IEnumerable skuSettings = null, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? provisioningState = default(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy TemplateDeploymentPolicy(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability capabilities = default(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability), Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption preflightOptions = default(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption)) { throw null; } public static Azure.ResourceManager.ProviderHub.Models.TypedErrorInfo TypedErrorInfo(string typedErrorInfoType = null, System.BinaryData info = null) { throw null; } } + public partial class AsyncOperationPollingRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AsyncOperationPollingRules() { } + public Azure.ResourceManager.ProviderHub.Models.AdditionalOptionAsyncOperation? AdditionalOptions { get { throw null; } set { } } + public System.Collections.Generic.IList AuthorizationActions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AsyncTimeoutRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AsyncTimeoutRule() { } + public string ActionName { get { throw null; } set { } } + public string Timeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncTimeoutRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.AsyncTimeoutRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AuthorizationActionMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AuthorizationActionMapping() { } @@ -494,6 +842,69 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailabilityZonePolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailabilityZonePolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy MultiZoned { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy SingleZoned { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy left, Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy left, Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailableCheckInManifestEnvironment : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailableCheckInManifestEnvironment(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment All { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Canary { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Fairfax { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Mooncake { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment Prod { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment left, Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment left, Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BlockActionVerb : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BlockActionVerb(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Action { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Delete { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Read { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Unrecognized { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.BlockActionVerb Write { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb left, Azure.ResourceManager.ProviderHub.Models.BlockActionVerb right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.BlockActionVerb (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.BlockActionVerb left, Azure.ResourceManager.ProviderHub.Models.BlockActionVerb right) { throw null; } + public override string ToString() { throw null; } + } public partial class CanaryTrafficRegionRolloutConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CanaryTrafficRegionRolloutConfiguration() { } @@ -520,11 +931,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class CheckinManifestInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CheckinManifestInfo() { } - public string CommitId { get { throw null; } } - public bool IsCheckedIn { get { throw null; } } - public string PullRequest { get { throw null; } } - public string StatusMessage { get { throw null; } } + public CheckinManifestInfo(bool isCheckedIn, string statusMessage) { } + public string CommitId { get { throw null; } set { } } + public bool IsCheckedIn { get { throw null; } set { } } + public string PullRequest { get { throw null; } set { } } + public string StatusMessage { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -544,6 +955,54 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CommonApiVersionsMergeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CommonApiVersionsMergeMode(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode Merge { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode Overwrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode left, Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode left, Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CrossTenantTokenValidation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CrossTenantTokenValidation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation EnsureSecureValidation { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation PassthroughInsecureToken { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation left, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation left, Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomRolloutAutoProvisionConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomRolloutAutoProvisionConfig() { } + public bool? IsResourceGraphEnabled { get { throw null; } set { } } + public bool? IsStorageEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.CustomRolloutAutoProvisionConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.CustomRolloutAutoProvisionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CustomRolloutProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomRolloutProperties(Azure.ResourceManager.ProviderHub.Models.CustomRolloutSpecification specification) { } @@ -559,10 +1018,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class CustomRolloutSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public CustomRolloutSpecification() { } public CustomRolloutSpecification(Azure.ResourceManager.ProviderHub.Models.TrafficRegions canary) { } + public Azure.ResourceManager.ProviderHub.Models.CustomRolloutAutoProvisionConfig AutoProvisionConfig { get { throw null; } set { } } public System.Collections.Generic.IList CanaryRegions { get { throw null; } } public Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistration { get { throw null; } set { } } + public bool? RefreshSubscriptionRegistration { get { throw null; } set { } } + public System.Collections.Generic.IList ReleaseScopes { get { throw null; } } public System.Collections.Generic.IList ResourceTypeRegistrations { get { throw null; } } + public bool? SkipReleaseScopeValidation { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.CustomRolloutSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -575,6 +1039,7 @@ public partial class CustomRolloutStatus : System.ClientModel.Primitives.IJsonMo public CustomRolloutStatus() { } public System.Collections.Generic.IList CompletedRegions { get { throw null; } } public System.Collections.Generic.IDictionary FailedOrSkippedRegions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo ManifestCheckinStatus { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.CustomRolloutStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -582,6 +1047,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DefaultRolloutAutoProvisionConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefaultRolloutAutoProvisionConfig() { } + public bool? IsResourceGraphEnabled { get { throw null; } set { } } + public bool? IsStorageEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.DefaultRolloutAutoProvisionConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.DefaultRolloutAutoProvisionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DefaultRolloutProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefaultRolloutProperties() { } @@ -598,8 +1075,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DefaultRolloutSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefaultRolloutSpecification() { } + public Azure.ResourceManager.ProviderHub.Models.DefaultRolloutAutoProvisionConfig AutoProvisionConfig { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.CanaryTrafficRegionRolloutConfiguration Canary { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionRolloutConfiguration HighTraffic { get { throw null; } set { } } + public bool? IsExpeditedRolloutEnabled { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionRolloutConfiguration LowTraffic { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionRolloutConfiguration MediumTraffic { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.ProviderRegistrationData ProviderRegistration { get { throw null; } set { } } @@ -616,6 +1095,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DefaultRolloutStatus : Azure.ResourceManager.ProviderHub.Models.RolloutStatusBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefaultRolloutStatus() { } + public Azure.ResourceManager.ProviderHub.Models.CheckinManifestInfo ManifestCheckinStatus { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.TrafficRegionCategory? NextTrafficRegion { get { throw null; } set { } } public System.DateTimeOffset? NextTrafficRegionScheduledOn { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.SubscriptionReregistrationResult? SubscriptionReregistrationResult { get { throw null; } set { } } @@ -626,6 +1106,36 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExpeditedRolloutIntent : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExpeditedRolloutIntent(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent Hotfix { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent left, Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent left, Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExpeditedRolloutMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExpeditedRolloutMetadata() { } + public Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutIntent? ExpeditedRolloutIntent { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ExtendedErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExtendedErrorInfo() { } @@ -672,6 +1182,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ExtensionOptionType left, Azure.ResourceManager.ProviderHub.Models.ExtensionOptionType right) { throw null; } public override string ToString() { throw null; } } + public partial class FanoutLinkedNotificationRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FanoutLinkedNotificationRule() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.FanoutLinkedNotificationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.FanoutLinkedNotificationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FeaturesPolicy : System.IEquatable { @@ -690,10 +1214,30 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy left, Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FrontdoorRequestMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FrontdoorRequestMode(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode UseManifest { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode left, Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode left, Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class IdentityManagementProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IdentityManagementProperties() { } public string ApplicationId { get { throw null; } set { } } + public System.Collections.Generic.IList ApplicationIds { get { throw null; } } + public System.Collections.Generic.IList DelegationAppIds { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? ManagementType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.IdentityManagementProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -723,6 +1267,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.IdentityManagementType left, Azure.ResourceManager.ProviderHub.Models.IdentityManagementType right) { throw null; } public override string ToString() { throw null; } } + public partial class LegacyDisallowedCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LegacyDisallowedCondition() { } + public System.Collections.Generic.IList DisallowedLegacyOperations { get { throw null; } } + public string Feature { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LegacyDisallowedCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LegacyDisallowedCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class LightHouseAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LightHouseAuthorization(string principalId, string roleDefinitionId) { } @@ -770,6 +1326,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.LinkedAction left, Azure.ResourceManager.ProviderHub.Models.LinkedAction right) { throw null; } public override string ToString() { throw null; } } + public partial class LinkedNotificationRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LinkedNotificationRule() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public System.Collections.Generic.IList ActionsOnFailedOperation { get { throw null; } } + public System.Collections.Generic.IList FastPathActions { get { throw null; } } + public System.Collections.Generic.IList FastPathActionsOnFailedOperation { get { throw null; } } + public System.TimeSpan? LinkedNotificationTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LinkedNotificationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.LinkedNotificationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LinkedOperation : System.IEquatable { @@ -791,9 +1362,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class LinkedOperationRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal LinkedOperationRule() { } - public Azure.ResourceManager.ProviderHub.Models.LinkedAction LinkedAction { get { throw null; } } - public Azure.ResourceManager.ProviderHub.Models.LinkedOperation LinkedOperation { get { throw null; } } + public LinkedOperationRule(Azure.ResourceManager.ProviderHub.Models.LinkedOperation linkedOperation, Azure.ResourceManager.ProviderHub.Models.LinkedAction linkedAction) { } + public System.Collections.Generic.IList DependsOnTypes { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.LinkedAction LinkedAction { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.LinkedOperation LinkedOperation { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.LinkedOperationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -864,6 +1436,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ManifestLevelPropertyBag : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManifestLevelPropertyBag() { } + public System.Collections.Generic.IList ResourceHydrationAccounts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ManifestLevelPropertyBag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ManifestLevelPropertyBag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ManifestResourceDeletionPolicy : System.IEquatable { @@ -961,7 +1544,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public OptInHeaderType(string value) { throw null; } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ClientGroupMembership { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ClientPrincipalNameEncoded { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ManagementGroupAncestorsEncoded { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType MSIResourceIdEncoded { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType PrivateLinkId { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType PrivateLinkResourceId { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType PrivateLinkVnetTrafficTag { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType ResourceGroupLocation { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType SignedAuxiliaryTokens { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType SignedUserToken { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.OptInHeaderType UnboundedClientGroupMembership { get { throw null; } } @@ -976,6 +1566,44 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OptOutHeaderType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OptOutHeaderType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType SystemDataCreatedByLastModifiedBy { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType left, Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType left, Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyExecutionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyExecutionType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType BypassPolicies { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType ExecutePolicies { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType ExpectPartialPutRequests { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType left, Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType left, Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PreflightOption : System.IEquatable { private readonly object _dummy; @@ -994,29 +1622,221 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.PreflightOption left, Azure.ResourceManager.ProviderHub.Models.PreflightOption right) { throw null; } public override string ToString() { throw null; } } - public partial class ProviderHubExtendedLocationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ProviderAdditionalAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ProviderHubExtendedLocationOptions() { } - public string ExtendedLocationOptionsType { get { throw null; } set { } } - public string SupportedPolicy { get { throw null; } set { } } + public ProviderAdditionalAuthorization() { } + public string ApplicationId { get { throw null; } set { } } + public string RoleDefinitionId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public enum ProviderHubExtendedLocationType - { - NotSpecified = 0, - EdgeZone = 1, - ArcZone = 2, + Azure.ResourceManager.ProviderHub.Models.ProviderAdditionalAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderAdditionalAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ProviderHubMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderAuthenticationScheme : System.IEquatable { - public ProviderHubMetadata() { } - public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderAuthenticationScheme(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme Bearer { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme PoP { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme left, Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme left, Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderAuthorizedApplicationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderAuthorizedApplicationProperties() { } + public System.Collections.Generic.IList DataAuthorizations { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ApplicationProviderAuthorization ProviderAuthorization { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderAuthorizedApplicationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderDstsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderDstsConfiguration(string serviceName) { } + public string ServiceDnsName { get { throw null; } set { } } + public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderEndpointInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderEndpointInformation() { } + public string Endpoint { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType? EndpointType { get { throw null; } set { } } + public string SchemaVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderEndpointInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderEndpointInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderEndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderEndpointType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType Canary { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType Production { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType TestInProduction { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderEndpointTypeResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderEndpointTypeResourceType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType Canary { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType Production { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType TestInProduction { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType left, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderExtendedLocationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderExtendedLocationType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType ArcZone { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType CustomLocation { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType EdgeZone { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType left, Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType left, Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderFeaturesRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFeaturesRule(Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy requiredFeaturesPolicy) { } + public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy RequiredFeaturesPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFeaturesRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFeaturesRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderFilterRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFilterRule() { } + public System.Collections.Generic.IList EndpointInformation { get { throw null; } } + public string FilterQuery { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFilterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFilterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderFrontloadPayload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFrontloadPayload(Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties properties) { } + public Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderFrontloadPayloadProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderFrontloadPayloadProperties(string operationType, string providerNamespace, string frontloadLocation, string copyFromLocation, Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment environmentType, Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction serviceFeatureFlag, System.Collections.Generic.IEnumerable includeResourceTypes, System.Collections.Generic.IEnumerable excludeResourceTypes, Azure.ResourceManager.ProviderHub.Models.ManifestLevelPropertyBag overrideManifestLevelFields, Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase overrideEndpointLevelFields, System.Collections.Generic.IEnumerable ignoreFields) { } + public string CopyFromLocation { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.AvailableCheckInManifestEnvironment EnvironmentType { get { throw null; } } + public System.Collections.Generic.IList ExcludeResourceTypes { get { throw null; } } + public string FrontloadLocation { get { throw null; } } + public System.Collections.Generic.IList IgnoreFields { get { throw null; } } + public System.Collections.Generic.IList IncludeResourceTypes { get { throw null; } } + public string OperationType { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase OverrideEndpointLevelFields { get { throw null; } } + public System.Collections.Generic.IList OverrideManifestLevelFieldsResourceHydrationAccounts { get { throw null; } } + public string ProviderNamespace { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction ServiceFeatureFlag { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderFrontloadPayloadProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderHubExtendedLocationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderHubExtendedLocationOptions() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public string ExtendedLocationOptionsType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType? LocationType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy? SupportedLocationPolicy { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public string SupportedPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public enum ProviderHubExtendedLocationType + { + NotSpecified = 0, + EdgeZone = 1, + ArcZone = 2, + CustomLocation = 3, + } + public partial class ProviderHubMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderHubMetadata() { } + public string DirectRpRoleDefinitionId { get { throw null; } set { } } + public string GlobalAsyncOperationResourceTypeName { get { throw null; } set { } } + public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } set { } } public System.Collections.Generic.IList ProviderAuthorizations { get { throw null; } } + public string RegionalAsyncOperationResourceTypeName { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ThirdPartyProviderAuthorization ThirdPartyProviderAuthorization { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ProviderHubMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1054,12 +1874,171 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState left, Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderLegacyOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderLegacyOperation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Action { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation AzureAsyncOperationWaiting { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Create { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Delete { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation DeploymentCleanup { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation EvaluateDeploymentOutput { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Read { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation ResourceCacheWaiting { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation left, Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation left, Azure.ResourceManager.ProviderHub.Models.ProviderLegacyOperation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderLocationQuotaRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderLocationQuotaRule() { } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy? Policy { get { throw null; } set { } } + public string QuotaId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderLocationQuotaRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderLocationQuotaRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProviderNotification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderNotification() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType? NotificationType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.SkipNotification? SkipNotifications { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderNotification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderNotificationEndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderNotificationEndpointType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType Eventhub { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType Webhook { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationEndpointType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderNotificationOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderNotificationOption(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption EmitSpendingLimit { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderNotificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderNotificationType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType SubscriptionNotification { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType Unspecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType left, Azure.ResourceManager.ProviderHub.Models.ProviderNotificationType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderQuotaPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderQuotaPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy Default { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy Restricted { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy left, Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy left, Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProviderQuotaRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderQuotaRule() { } + public System.Collections.Generic.IList LocationRules { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaPolicy? QuotaPolicy { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderRegistrationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderRegistrationKind(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind Direct { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind Hybrid { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind Managed { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationKind right) { throw null; } + public override string ToString() { throw null; } + } public partial class ProviderRegistrationProperties : Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifestProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProviderRegistrationProperties() { } + public System.Collections.Generic.IList PrivateResourceProviderAllowedSubscriptions { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ProviderHubMetadata ProviderHubMetadata { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications SubscriptionLifecycleNotificationSpecifications { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ProviderRegistrationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1067,23 +2046,79 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProviderRequestHeaderOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProviderRequestHeaderOptions() { } + public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.OptOutHeaderType? OptOutHeaders { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderResourceQueryFilterOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderResourceQueryFilterOption(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption EnableSubscriptionFilterOnTenant { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProviderResourceSubType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProviderResourceSubType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType AsyncOperation { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType left, Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ProviderResourceType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProviderResourceType() { } + public Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceType? AdditionalOptions { get { throw null; } } public System.Collections.Generic.IReadOnlyList AllowedUnauthorizedActions { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AllowedUnauthorizedActionsExtensions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList AuthorizationActionMappings { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } } public string DefaultApiVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList DisallowedActionVerbs { get { throw null; } } public System.Collections.Generic.IReadOnlyList Endpoints { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExtendedLocations { get { throw null; } } public System.Collections.Generic.IReadOnlyList LinkedAccessChecks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LinkedNotificationRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList LinkedOperationRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList LoggingRules { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.IdentityManagementType? ManagementType { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.MarketplaceType? MarketplaceType { get { throw null; } } public System.BinaryData Metadata { get { throw null; } } public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Notifications { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule QuotaRule { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ManifestResourceDeletionPolicy? ResourceDeletionPolicy { get { throw null; } } @@ -1153,6 +2188,47 @@ public enum ResourceAccessPolicy AcisReadAllowed = 1, AcisActionAllowed = 2, } + public partial class ResourceAccessRole : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceAccessRole() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public System.Collections.Generic.IList AllowedGroupClaims { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceAccessRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceAccessRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceConcurrencyControlOption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceConcurrencyControlOption() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy? Policy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyControlOption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyControlOption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceConcurrencyPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceConcurrencyPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy SynchronizeBeginExtension { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceConcurrencyPolicy right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ResourceDeletionPolicy : System.IEquatable { @@ -1172,6 +2248,76 @@ public enum ResourceAccessPolicy public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceGraphConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceGraphConfiguration() { } + public string ApiVersion { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceHydrationAccount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceHydrationAccount() { } + public string AccountName { get { throw null; } set { } } + public string EncryptedKey { get { throw null; } set { } } + public long? MaxChildResourceConsistencyJobLimit { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceHydrationAccount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceHydrationAccount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceManagementAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceManagementAction() { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceManagementEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceManagementEntity(Azure.Core.ResourceIdentifier resourceId) { } + public string HomeTenantId { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceManagementEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceManagementSupportedOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceManagementSupportedOperation(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation Delete { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation Get { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation left, Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation left, Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation right) { throw null; } + public override string ToString() { throw null; } + } public partial class ResourceMovePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceMovePolicy() { } @@ -1188,7 +2334,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ResourceProviderAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceProviderAuthorization() { } + public System.Collections.Generic.IList AllowedThirdPartyExtensions { get { throw null; } } public string ApplicationId { get { throw null; } set { } } + public string GroupingTag { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagedByAuthorization ManagedByAuthorization { get { throw null; } set { } } public string ManagedByRoleDefinitionId { get { throw null; } set { } } public string RoleDefinitionId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1232,14 +2381,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ResourceProviderEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ResourceProviderEndpoint() { } + public ResourceProviderEndpoint() { } public System.Collections.Generic.IReadOnlyList ApiVersions { get { throw null; } } - public System.Uri EndpointUri { get { throw null; } } - public bool? IsEnabled { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType? EndpointType { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredFeatures { get { throw null; } } - public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } - public System.TimeSpan? Timeout { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public string SkuLink { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1247,16 +2398,39 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceProviderManagedByAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceProviderManagedByAuthorization() { } + public System.Collections.Generic.IList AdditionalAuthorizations { get { throw null; } } + public bool? DoesAllowManagedByInheritance { get { throw null; } set { } } + public string ManagedByResourceRoleDefinitionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagedByAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagedByAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResourceProviderManagement : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceProviderManagement() { } + public System.Collections.Generic.IList AuthorizationOwners { get { throw null; } } + public System.Collections.Generic.IList CanaryManifestOwners { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ExpeditedRolloutMetadata ExpeditedRolloutMetadata { get { throw null; } set { } } + public System.Collections.Generic.IList ExpeditedRolloutSubmitters { get { throw null; } } public string IncidentContactEmail { get { throw null; } set { } } public string IncidentRoutingService { get { throw null; } set { } } public string IncidentRoutingTeam { get { throw null; } set { } } public System.Collections.Generic.IList ManifestOwners { get { throw null; } } + public string ProfitCenterCode { get { throw null; } set { } } + public string ProfitCenterProgramId { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceAccessPolicy? ResourceAccessPolicy { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceAccessRoleList { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property has been deprecated, please use `ResourceAccessRoleList` instead.", false)] public System.Collections.Generic.IList ResourceAccessRoles { get { throw null; } } public System.Collections.Generic.IList SchemaOwners { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType? ServerFailureResponseMessageType { get { throw null; } set { } } public System.Collections.Generic.IList ServiceTreeInfos { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1268,20 +2442,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ResourceProviderManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResourceProviderManifest() { } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } } public System.Collections.Generic.IReadOnlyList GlobalNotificationEndpoints { get { throw null; } } + public bool? IsTenantLinkedNotificationEnabled { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LinkedNotificationRules { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement Management { get { throw null; } } public System.BinaryData Metadata { get { throw null; } } public string Namespace { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Notifications { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } } public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProviderAuthorizations { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? ProviderType { get { throw null; } } public string ProviderVersion { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ReRegisterSubscriptionMetadata ReRegisterSubscriptionMetadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public string ServiceName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Services { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1292,17 +2474,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ResourceProviderManifestProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceProviderManifestProperties() { } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } set { } } public System.Collections.Generic.IList Capabilities { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } set { } } + public string CustomManifestVersion { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } + public bool? EnableTenantLinkedNotification { get { throw null; } set { } } + public System.Collections.Generic.IList GlobalNotificationEndpoints { get { throw null; } } + public string LegacyNamespace { get { throw null; } set { } } + public System.Collections.Generic.IList LegacyRegistrations { get { throw null; } } + public System.Collections.Generic.IList LinkedNotificationRules { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement Management { get { throw null; } set { } } + public System.Collections.Generic.IList ManagementGroupGlobalNotificationEndpoints { get { throw null; } } public System.BinaryData Metadata { get { throw null; } set { } } public string Namespace { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderNotificationOption? NotificationOptions { get { throw null; } set { } } + public System.Collections.Generic.IList Notifications { get { throw null; } } + public System.Collections.Generic.IList NotificationSubscriberSettings { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } set { } } + public System.Collections.Generic.IList OptionalFeatures { get { throw null; } } public System.Collections.Generic.IList ProviderAuthenticationAllowedAudiences { get { throw null; } set { } } public System.Collections.Generic.IList ProviderAuthorizations { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceProviderType? ProviderType { get { throw null; } set { } } public string ProviderVersion { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } set { } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.BlockActionVerb? ResourceGroupLockOptionDuringMoveBlockActionVerb { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceHydrationAccounts { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType? ServiceClientOptionsType { get { throw null; } set { } } + public string ServiceName { get { throw null; } set { } } + public System.Collections.Generic.IList Services { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions TemplateDeploymentOptions { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceProviderManifestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1311,6 +2513,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceProviderService : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceProviderService() { } + public string ServiceName { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceProviderService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProviderServiceStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProviderServiceStatus(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus Active { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus left, Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus left, Azure.ResourceManager.ProviderHub.Models.ResourceProviderServiceStatus right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ResourceProviderType : System.IEquatable { @@ -1341,14 +2573,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ResourceRoutingType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType BypassEndpointSelectionOptimization { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType CascadeAuthorizedExtension { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType CascadeExtension { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType ChildFanout { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Default { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Extension { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Failover { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Fanout { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType HostBased { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType LocationBased { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType LocationMapping { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType ProxyOnly { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType ServiceFanout { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType Tenant { get { throw null; } } public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1372,16 +2609,65 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeCategory(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory FreeForm { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory Internal { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory PureProxy { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeDataBoundary : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeDataBoundary(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary EU { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary Global { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary NotDefined { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary US { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary right) { throw null; } + public override string ToString() { throw null; } + } public partial class ResourceTypeEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeEndpoint() { } + public string ApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList ApiVersions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeDataBoundary? DataBoundary { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderEndpointTypeResourceType? EndpointType { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } public System.Collections.Generic.IList Extensions { get { throw null; } } public bool? IsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind? Kind { get { throw null; } set { } } public System.Collections.Generic.IList Locations { get { throw null; } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public string SkuLink { get { throw null; } set { } } public System.TimeSpan? Timeout { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1389,6 +2675,64 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResourceTypeEndpointBase : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeEndpointBase(bool enabled, System.Collections.Generic.IEnumerable apiVersions, System.Uri endpointUri, System.Collections.Generic.IEnumerable locations, System.Collections.Generic.IEnumerable requiredFeatures, Azure.ResourceManager.ProviderHub.Models.ProviderFeaturesRule featuresRule, System.TimeSpan timeout, Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType endpointType, Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration dstsConfiguration, string skuLink, string apiVersion, System.Collections.Generic.IEnumerable zones) { } + public string ApiVersion { get { throw null; } } + public System.Collections.Generic.IList ApiVersions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } } + public bool Enabled { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderEndpointType EndpointType { get { throw null; } } + public System.Uri EndpointUri { get { throw null; } } + public System.Collections.Generic.IList Locations { get { throw null; } } + public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } } + public string SkuLink { get { throw null; } } + public System.TimeSpan Timeout { get { throw null; } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeEndpointKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeEndpointKind(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind Direct { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind Managed { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeEndpointKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeExtendedLocationPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeExtendedLocationPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy All { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtendedLocationPolicy right) { throw null; } + public override string ToString() { throw null; } + } public partial class ResourceTypeExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeExtension() { } @@ -1408,6 +2752,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ResourceTypeExtensionCategory(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory BestMatchOperationBegin { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory NotSpecified { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceCreationBegin { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceCreationCompleted { get { throw null; } } @@ -1424,6 +2769,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceReadBegin { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory ResourceReadValidate { get { throw null; } } public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory SubscriptionLifecycleNotification { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory SubscriptionLifecycleNotificationDeletion { get { throw null; } } public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1434,38 +2780,183 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeExtensionCategory right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceTypeOnBehalfOfToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeOnBehalfOfToken() { } + public string ActionName { get { throw null; } set { } } + public string LifeTime { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceTypeRegistrationApiProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationApiProfile() { } + public string ApiVersion { get { throw null; } set { } } + public string ProfileVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationApiProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationApiProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeRegistrationCapacityPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeRegistrationCapacityPolicy(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy Default { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy Restricted { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ResourceTypeRegistrationCapacityRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationCapacityRule() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityPolicy? CapacityPolicy { get { throw null; } set { } } + public string SkuAlias { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceTypeRegistrationDeleteDependency : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationDeleteDependency() { } + public string LinkedProperty { get { throw null; } set { } } + public string LinkedType { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationDeleteDependency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationDeleteDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceTypeRegistrationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceTypeRegistrationKind(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind Direct { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind Hybrid { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind Managed { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ResourceTypeRegistrationLegacyPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationLegacyPolicy() { } + public System.Collections.Generic.IList DisallowedConditions { get { throw null; } } + public System.Collections.Generic.IList DisallowedLegacyOperations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResourceTypeRegistrationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeRegistrationProperties() { } + public Azure.ResourceManager.ProviderHub.Models.AdditionalOptionResourceTypeRegistration? AdditionalOptions { get { throw null; } set { } } + public System.Collections.Generic.IList AllowedResourceNames { get { throw null; } } + public System.Collections.Generic.IList AllowedTemplateDeploymentReferenceActions { get { throw null; } } public System.Collections.Generic.IList AllowedUnauthorizedActions { get { throw null; } } + public System.Collections.Generic.IList AllowedUnauthorizedActionsExtensions { get { throw null; } } + public System.Collections.Generic.IList ApiProfiles { get { throw null; } } + public bool? AreTagsSupported { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.AsyncOperationPollingRules AsyncOperationPollingRules { get { throw null; } set { } } + public string AsyncOperationResourceTypeName { get { throw null; } set { } } + public System.Collections.Generic.IList AsyncTimeoutRules { get { throw null; } } public System.Collections.Generic.IList AuthorizationActionMappings { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.AvailabilityZonePolicy? AvailabilityZonePolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationCapacityRule CapacityRule { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeCategory? Category { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.CheckNameAvailabilitySpecifications CheckNameAvailabilitySpecifications { get { throw null; } set { } } + public System.Collections.Generic.IList CommonApiVersions { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.CommonApiVersionsMergeMode? CommonApiVersionsMergeMode { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.CrossTenantTokenValidation? CrossTenantTokenValidation { get { throw null; } set { } } public string DefaultApiVersion { get { throw null; } set { } } public System.Collections.Generic.IList DisallowedActionVerbs { get { throw null; } } + public System.Collections.Generic.IList DisallowedEndUserOperations { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ProviderDstsConfiguration DstsConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList Endpoints { get { throw null; } } public System.Collections.Generic.IList ExtendedLocations { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ExtensionOptions ExtensionOptionsResourceCreationBegin { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.FrontdoorRequestMode? FrontdoorRequestMode { get { throw null; } set { } } + public string GroupingTag { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.IdentityManagementProperties IdentityManagement { get { throw null; } set { } } + public bool? IsAddOnPlanConversionAllowed { get { throw null; } set { } } + public bool? IsAddResourceListTargetLocationsAllowed { get { throw null; } set { } } public bool? IsAsyncOperationEnabled { get { throw null; } set { } } + public bool? IsEmptyRoleAssignmentsAllowed { get { throw null; } set { } } + public bool? IsNoncompliantCollectionResponseAllowed { get { throw null; } set { } } public bool? IsPureProxy { get { throw null; } set { } } public bool? IsThirdPartyS2SEnabled { get { throw null; } set { } } + public string LegacyName { get { throw null; } set { } } + public System.Collections.Generic.IList LegacyNames { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationLegacyPolicy LegacyPolicy { get { throw null; } set { } } public System.Collections.Generic.IList LinkedAccessChecks { get { throw null; } } + public System.Collections.Generic.IList LinkedNotificationRules { get { throw null; } } + public System.Collections.Generic.IList LinkedOperationRules { get { throw null; } } public System.Collections.Generic.IList LoggingRules { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement Management { get { throw null; } set { } } + public string ManifestLink { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.MarketplaceType? MarketplaceType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + public System.Collections.Generic.IList Notifications { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeOnBehalfOfToken OnBehalfOfTokens { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.OptInHeaderType? OptInHeaders { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.PolicyExecutionType? PolicyExecutionType { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ProviderHubProvisioningState? ProvisioningState { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderQuotaRule QuotaRule { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality? Regionality { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderRequestHeaderOptions RequestHeaderOptions { get { throw null; } set { } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.FeaturesPolicy? RequiredFeaturesPolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache ResourceCache { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ResourceConcurrencyControlOptions { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.ResourceDeletionPolicy? ResourceDeletionPolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceGraphConfiguration ResourceGraphConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions ResourceManagementOptions { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceMovePolicy ResourceMovePolicy { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderResourceQueryFilterOption? ResourceQueryManagementFilterOption { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderResourceSubType? ResourceSubType { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ResourceValidation? ResourceValidation { get { throw null; } set { } } + public string RoutingRuleHostResourceType { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.ResourceRoutingType? RoutingType { get { throw null; } set { } } public System.Collections.Generic.IList ServiceTreeInfos { get { throw null; } } + public string SkuLink { get { throw null; } set { } } public Azure.ResourceManager.ProviderHub.Models.SubscriptionLifecycleNotificationSpecifications SubscriptionLifecycleNotificationSpecifications { get { throw null; } set { } } public System.Collections.Generic.IList SubscriptionStateRules { get { throw null; } } public System.Collections.Generic.IList SwaggerSpecifications { get { throw null; } } public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentOptions TemplateDeploymentOptions { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy TemplateDeploymentPolicy { get { throw null; } set { } } public System.Collections.Generic.IList ThrottlingRules { get { throw null; } } + public Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration TokenAuthConfiguration { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1492,6 +2983,31 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality left, Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationRegionality right) { throw null; } public override string ToString() { throw null; } } + public partial class ResourceTypeRegistrationResourceCache : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationResourceCache() { } + public bool? IsResourceCacheEnabled { get { throw null; } set { } } + public string ResourceCacheExpirationTimespan { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceCache System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceTypeRegistrationResourceManagementOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceTypeRegistrationResourceManagementOptions() { } + public Azure.ResourceManager.ProviderHub.Models.ResourceManagementSupportedOperation? BatchProvisioningSupportSupportedOperations { get { throw null; } set { } } + public System.Collections.Generic.IList DeleteDependencies { get { throw null; } } + public string NestedProvisioningSupportMinimumApiVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ResourceTypeRegistrationResourceManagementOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResourceTypeSkuCapacity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceTypeSkuCapacity(int minimum) { } @@ -1523,8 +3039,10 @@ public partial class ResourceTypeSkuLocationInfo : System.ClientModel.Primitives { public ResourceTypeSkuLocationInfo(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IList ExtendedLocations { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ProviderHub.Models.ProviderHubExtendedLocationType? ExtendedLocationType { get { throw null; } set { } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ProviderExtendedLocationType? LocationType { get { throw null; } set { } } public System.Collections.Generic.IList ZoneDetails { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1630,10 +3148,65 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServerFailureResponseMessageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServerFailureResponseMessageType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType OutageReporting { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType left, Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType left, Azure.ResourceManager.ProviderHub.Models.ServerFailureResponseMessageType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceClientOptionsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceClientOptionsType(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType DisableAutomaticDecompression { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType left, Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType left, Azure.ResourceManager.ProviderHub.Models.ServiceClientOptionsType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceFeatureFlagAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceFeatureFlagAction(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction Create { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction DoNotCreate { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction left, Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction left, Azure.ResourceManager.ProviderHub.Models.ServiceFeatureFlagAction right) { throw null; } + public override string ToString() { throw null; } + } public partial class ServiceTreeInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServiceTreeInfo() { } public string ComponentId { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness? Readiness { get { throw null; } set { } } public string ServiceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.ServiceTreeInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1642,6 +3215,79 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceTreeReadiness : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceTreeReadiness(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness ClosingDown { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness Deprecated { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness GA { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness InDevelopment { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness InternalOnly { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness PrivatePreview { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness PublicPreview { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness RemovedFromARM { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness Retired { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness left, Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness left, Azure.ResourceManager.ProviderHub.Models.ServiceTreeReadiness right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SignedRequestScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SignedRequestScope(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.SignedRequestScope Endpoint { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.SignedRequestScope ResourceUri { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.SignedRequestScope other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.SignedRequestScope left, Azure.ResourceManager.ProviderHub.Models.SignedRequestScope right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.SignedRequestScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.SignedRequestScope left, Azure.ResourceManager.ProviderHub.Models.SignedRequestScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SkipNotification : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SkipNotification(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.SkipNotification Disabled { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.SkipNotification Enabled { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.SkipNotification Unspecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.SkipNotification other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.SkipNotification left, Azure.ResourceManager.ProviderHub.Models.SkipNotification right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.SkipNotification (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.SkipNotification left, Azure.ResourceManager.ProviderHub.Models.SkipNotification right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubscriberSetting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SubscriberSetting() { } + public System.Collections.Generic.IList FilterRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.SubscriberSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.SubscriberSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SubscriptionLifecycleNotificationSpecifications : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SubscriptionLifecycleNotificationSpecifications() { } @@ -1781,9 +3427,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class TemplateDeploymentPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal TemplateDeploymentPolicy() { } - public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability Capabilities { get { throw null; } } - public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption PreflightOptions { get { throw null; } } + public TemplateDeploymentPolicy(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability capabilities, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption preflightOptions) { } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentCapability Capabilities { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification? PreflightNotifications { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption PreflightOptions { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1792,6 +3439,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TemplateDeploymentPreflightNotification : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TemplateDeploymentPreflightNotification(string value) { throw null; } + public static Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification None { get { throw null; } } + public static Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification UnregisteredSubscriptions { get { throw null; } } + public bool Equals(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification left, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification right) { throw null; } + public static implicit operator Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification left, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightNotification right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TemplateDeploymentPreflightOption : System.IEquatable { private readonly object _dummy; @@ -1812,6 +3477,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption left, Azure.ResourceManager.ProviderHub.Models.TemplateDeploymentPreflightOption right) { throw null; } public override string ToString() { throw null; } } + public partial class ThirdPartyExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ThirdPartyExtension() { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ThirdPartyExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.ThirdPartyExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ThirdPartyProviderAuthorization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThirdPartyProviderAuthorization() { } @@ -1860,6 +3536,7 @@ public partial class ThrottlingRule : System.ClientModel.Primitives.IJsonModel metrics) { } public string Action { get { throw null; } set { } } + public System.Collections.Generic.IList ApplicationId { get { throw null; } } public System.Collections.Generic.IList Metrics { get { throw null; } } public System.Collections.Generic.IList RequiredFeatures { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1869,6 +3546,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class TokenAuthConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TokenAuthConfiguration() { } + public Azure.ResourceManager.ProviderHub.Models.ProviderAuthenticationScheme? AuthenticationScheme { get { throw null; } set { } } + public bool? DisableCertificateAuthenticationFallback { get { throw null; } set { } } + public Azure.ResourceManager.ProviderHub.Models.SignedRequestScope? SignedRequestScope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ProviderHub.Models.TokenAuthConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TrafficRegionCategory : System.IEquatable { diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Azure.ResourceManager.ProviderHub.csproj b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Azure.ResourceManager.ProviderHub.csproj index 47e71a0cfb0c..89e0bc40e305 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Azure.ResourceManager.ProviderHub.csproj +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Azure.ResourceManager.ProviderHub.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.1 + 1.2.0 1.1.1 Azure.ResourceManager.ProviderHub diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/ArmProviderHubModelFactory.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/ArmProviderHubModelFactory.cs new file mode 100644 index 000000000000..34f4b3e7b188 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/ArmProviderHubModelFactory.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Model factory for models. + public static partial class ArmProviderHubModelFactory + { + /// Initializes a new instance of . + /// + /// + /// + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static CheckinManifestInfo CheckinManifestInfo(bool isCheckedIn = default, string statusMessage = null, string pullRequest = null, string commitId = null) + => new CheckinManifestInfo(isCheckedIn, statusMessage, pullRequest, commitId, null); + + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static LinkedOperationRule LinkedOperationRule(LinkedOperation linkedOperation = default, LinkedAction linkedAction = default) + => new LinkedOperationRule(linkedOperation, linkedAction, new ChangeTrackingList(), null); + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Anything. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProviderResourceType ProviderResourceType(string name = null, ResourceRoutingType? routingType = null, ResourceValidation? resourceValidation = null, IEnumerable allowedUnauthorizedActions = null, IEnumerable authorizationActionMappings = null, IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, IEnumerable loggingRules = null, IEnumerable throttlingRules = null, IEnumerable endpoints = null, MarketplaceType? marketplaceType = null, IdentityManagementType? managementType = null, BinaryData metadata = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, IEnumerable subscriptionStateRules = null, IEnumerable serviceTreeInfos = null, OptInHeaderType? optInHeaders = null, string skuLink = null, IEnumerable disallowedActionVerbs = null, TemplateDeploymentPolicy templateDeploymentPolicy = null, IEnumerable extendedLocations = null, IEnumerable linkedOperationRules = null, ManifestResourceDeletionPolicy? resourceDeletionPolicy = null) + => new ProviderResourceType(name, routingType, null, null, resourceValidation, allowedUnauthorizedActions.ToList(), null, authorizationActionMappings.ToList(), linkedAccessChecks.ToList(), defaultApiVersion, loggingRules.ToList(), throttlingRules.ToList(), endpoints.ToList(), marketplaceType, null, metadata, requiredFeatures.ToList(), null, subscriptionStateRules.ToList(), null, null, skuLink, disallowedActionVerbs.ToList(), templateDeploymentPolicy, extendedLocations.ToList(), linkedOperationRules.ToList(), resourceDeletionPolicy, null, null, null, null, null); + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = null, IEnumerable apiVersions = null, Uri endpointUri = null, IEnumerable locations = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, TimeSpan? timeout = null) + => new ResourceProviderEndpoint(isEnabled, apiVersions.ToList(), endpointUri, locations.ToList(), requiredFeatures.ToList(), null, timeout, null, null, null); + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Anything. + /// + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ResourceProviderManifest ResourceProviderManifest(IEnumerable providerAuthenticationAllowedAudiences = null, IEnumerable providerAuthorizations = null, string @namespace = null, string providerVersion = null, ResourceProviderType? providerType = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, OptInHeaderType? optInHeaders = null, IEnumerable resourceTypes = null, ResourceProviderManagement management = null, IEnumerable capabilities = null, BinaryData metadata = null, IEnumerable globalNotificationEndpoints = null, ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null) + => new ResourceProviderManifest(null, providerAuthorizations.ToList(), @namespace, null, null, providerVersion, providerType, requiredFeatures.ToList(), null, null, resourceTypes.ToList(), management, capabilities.ToList(), null, metadata, globalNotificationEndpoints.ToList(), reRegisterSubscriptionMetadata, null, null, null, null, null); + + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static TemplateDeploymentPolicy TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities = default, TemplateDeploymentPreflightOption preflightOptions = default) + => new TemplateDeploymentPolicy(capabilities, preflightOptions, null, null); + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/CustomRolloutProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/CustomRolloutProperties.cs new file mode 100644 index 000000000000..a89595b5924a --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/CustomRolloutProperties.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The CustomRolloutProperties. + public partial class CustomRolloutProperties + { + /// Gets or sets the provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/CustomRolloutSpecification.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/CustomRolloutSpecification.cs new file mode 100644 index 000000000000..14af9430e2be --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/CustomRolloutSpecification.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The CustomRolloutSpecification. + public partial class CustomRolloutSpecification + { + /// Initializes a new instance of . + /// + /// is null. + public CustomRolloutSpecification(TrafficRegions canary) + { + Argument.AssertNotNull(canary, nameof(canary)); + + Canary = canary; + ReleaseScopes = new ChangeTrackingList(); + ResourceTypeRegistrations = new ChangeTrackingList(); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/DefaultRolloutProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/DefaultRolloutProperties.cs new file mode 100644 index 000000000000..cd69e1bc17ec --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/DefaultRolloutProperties.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The DefaultRolloutProperties. + public partial class DefaultRolloutProperties + { + /// Gets or sets the provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/NotificationRegistrationProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/NotificationRegistrationProperties.cs new file mode 100644 index 000000000000..4b1535288793 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/NotificationRegistrationProperties.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The NotificationRegistrationProperties. + public partial class NotificationRegistrationProperties + { + /// Gets or sets the provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationOptions.cs new file mode 100644 index 000000000000..d7a4dcc9255a --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationOptions.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderHubExtendedLocationOptions. + public partial class ProviderHubExtendedLocationOptions + { + /// Gets or sets the extended location options type. + [EditorBrowsable(EditorBrowsableState.Never)] + public string ExtendedLocationOptionsType { get => LocationType?.ToString(); set => LocationType = new ProviderExtendedLocationType(value); } + /// Gets or sets the supported policy. + [EditorBrowsable(EditorBrowsableState.Never)] + public string SupportedPolicy { get => SupportedLocationPolicy.ToString(); set => SupportedLocationPolicy = new ResourceTypeExtendedLocationPolicy(value); } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationType.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationType.Serialization.cs similarity index 86% rename from sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationType.Serialization.cs rename to sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationType.Serialization.cs index 05a3607d11c5..b9a03323e397 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationType.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationType.Serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -16,6 +14,7 @@ internal static partial class ProviderHubExtendedLocationTypeExtensions ProviderHubExtendedLocationType.NotSpecified => "NotSpecified", ProviderHubExtendedLocationType.EdgeZone => "EdgeZone", ProviderHubExtendedLocationType.ArcZone => "ArcZone", + ProviderHubExtendedLocationType.CustomLocation => "CustomLocation", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProviderHubExtendedLocationType value.") }; @@ -24,6 +23,7 @@ public static ProviderHubExtendedLocationType ToProviderHubExtendedLocationType( if (StringComparer.OrdinalIgnoreCase.Equals(value, "NotSpecified")) return ProviderHubExtendedLocationType.NotSpecified; if (StringComparer.OrdinalIgnoreCase.Equals(value, "EdgeZone")) return ProviderHubExtendedLocationType.EdgeZone; if (StringComparer.OrdinalIgnoreCase.Equals(value, "ArcZone")) return ProviderHubExtendedLocationType.ArcZone; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "CustomLocation")) return ProviderHubExtendedLocationType.CustomLocation; throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProviderHubExtendedLocationType value."); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationType.cs similarity index 73% rename from sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationType.cs rename to sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationType.cs index 3938e8b919b9..0aaff178252d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderHubExtendedLocationType.cs @@ -1,13 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable +using System.ComponentModel; + namespace Azure.ResourceManager.ProviderHub.Models { /// The ProviderHubExtendedLocationType. + [EditorBrowsable(EditorBrowsableState.Never)] public enum ProviderHubExtendedLocationType { /// NotSpecified. @@ -15,6 +16,8 @@ public enum ProviderHubExtendedLocationType /// EdgeZone. EdgeZone, /// ArcZone. - ArcZone + ArcZone, + /// CustomLocation. + CustomLocation } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderRegistrationProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderRegistrationProperties.cs new file mode 100644 index 000000000000..cfc99f65ad77 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderRegistrationProperties.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderRegistrationProperties. + public partial class ProviderRegistrationProperties : ResourceProviderManifestProperties + { + /// Gets or sets the provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderResourceType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderResourceType.cs new file mode 100644 index 000000000000..4b5d6b600d1f --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ProviderResourceType.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderResourceType. + public partial class ProviderResourceType + { + /// Gets the opt in headers. + public OptInHeaderType? OptInHeaders + { + get => RequestHeaderOptions?.OptInHeaders; + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderEndpoint.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderEndpoint.cs new file mode 100644 index 000000000000..97945966afa4 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderEndpoint.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceProviderEndpoint. + public partial class ResourceProviderEndpoint + { + /// The api versions. + public IReadOnlyList ApiVersions { get; } + /// The locations. + public IReadOnlyList Locations { get; } + /// The required features. + public IReadOnlyList RequiredFeatures { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManagement.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManagement.cs new file mode 100644 index 000000000000..734095fee6e8 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManagement.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceProviderManagement. + public partial class ResourceProviderManagement + { + /// + /// Gets the resource access roles + /// + /// To assign an object to the element of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This property has been deprecated, please use `ResourceAccessRoleList` instead.", false)] + public IList ResourceAccessRoles { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManifest.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManifest.cs new file mode 100644 index 000000000000..70fa800ffa30 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManifest.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceProviderManifest. + public partial class ResourceProviderManifest + { + /// Gets the opt in headers. + public OptInHeaderType? OptInHeaders + { + get => RequestHeaderOptions?.OptInHeaders; + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManifestProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManifestProperties.cs new file mode 100644 index 000000000000..780a8d8e92e3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceProviderManifestProperties.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceProviderManifestProperties. + public partial class ResourceProviderManifestProperties + { + /// Gets or sets the opt in headers. + public OptInHeaderType? OptInHeaders + { + get => RequestHeaderOptions is null ? default : RequestHeaderOptions.OptInHeaders; + set + { + if (RequestHeaderOptions is null) + RequestHeaderOptions = new ProviderRequestHeaderOptions(); + RequestHeaderOptions.OptInHeaders = value; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeRegistrationProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeRegistrationProperties.cs new file mode 100644 index 000000000000..1f4cfde41a69 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeRegistrationProperties.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeRegistrationProperties. + public partial class ResourceTypeRegistrationProperties + { + /// Gets or sets the provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; set; } + /// Gets or sets the opt in headers. + public OptInHeaderType? OptInHeaders + { + get => RequestHeaderOptions is null ? default : RequestHeaderOptions.OptInHeaders; + set + { + if (RequestHeaderOptions is null) + RequestHeaderOptions = new ProviderRequestHeaderOptions(); + RequestHeaderOptions.OptInHeaders = value; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeSkuLocationInfo.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeSkuLocationInfo.cs new file mode 100644 index 000000000000..35be371eb368 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeSkuLocationInfo.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeSkuLocationInfo. + public partial class ResourceTypeSkuLocationInfo + { + /// Gets or sets the extended location type. + [EditorBrowsable(EditorBrowsableState.Never)] + public ProviderHubExtendedLocationType? ExtendedLocationType { get => LocationType.ToString().ToProviderHubExtendedLocationType(); set => LocationType = value?.ToString(); } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeSkuProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeSkuProperties.cs new file mode 100644 index 000000000000..b689642be9e9 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Custom/Models/ResourceTypeSkuProperties.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeSkuProperties. + public partial class ResourceTypeSkuProperties + { + /// Gets or sets the provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ArmProviderHubModelFactory.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ArmProviderHubModelFactory.cs index 08a7c42bd944..d4b00178142b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ArmProviderHubModelFactory.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ArmProviderHubModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -34,14 +35,25 @@ public static CustomRolloutData CustomRolloutData(ResourceIdentifier id = null, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The provisioned state of the resource. + /// The specification. + /// The status. + /// A new instance for mocking. + public static CustomRolloutProperties CustomRolloutProperties(ProviderHubProvisioningState? provisioningState = null, CustomRolloutSpecification specification = null, CustomRolloutStatus status = null) + { + return new CustomRolloutProperties(provisioningState, specification, status, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// + /// Provider registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. /// A new instance for mocking. - public static ProviderRegistrationData ProviderRegistrationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProviderRegistrationProperties properties = null) + public static ProviderRegistrationData ProviderRegistrationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProviderRegistrationProperties properties = null, ProviderRegistrationKind? kind = null) { return new ProviderRegistrationData( id, @@ -49,6 +61,132 @@ public static ProviderRegistrationData ProviderRegistrationData(ResourceIdentifi resourceType, systemData, properties, + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The provider authentication. + /// The provider authorizations. + /// The namespace. + /// The services. + /// The service name. + /// The provider version. + /// The provider type. + /// The required features. + /// The features rule. + /// The request header options. + /// The resource provider management. + /// The capabilities. + /// The cross tenant token validation. + /// The metadata. + /// The template deployment options. + /// The global notification endpoints. + /// The enable tenant linked notification. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. + /// The dsts configuration. + /// Notification options. + /// resource hydration accounts. + /// Notification settings. + /// Management groups global notification endpoints. + /// Optional features. + /// Resource group lock option during move. + /// Response options. + /// Legacy namespace. + /// Legacy registrations. + /// Custom manifest version. + /// The provider hub metadata. + /// The provisioning state. + /// The subscription lifecycle notification specifications. + /// The private resource provider configuration. + /// The token auth configuration. + /// A new instance for mocking. + public static ProviderRegistrationProperties ProviderRegistrationProperties(IEnumerable providerAuthenticationAllowedAudiences = null, IEnumerable providerAuthorizations = null, string @namespace = null, IEnumerable services = null, string serviceName = null, string providerVersion = null, ResourceProviderType? providerType = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, ProviderRequestHeaderOptions requestHeaderOptions = null, ResourceProviderManagement management = null, IEnumerable capabilities = null, CrossTenantTokenValidation? crossTenantTokenValidation = null, BinaryData metadata = null, TemplateDeploymentOptions templateDeploymentOptions = null, IEnumerable globalNotificationEndpoints = null, bool? enableTenantLinkedNotification = null, IEnumerable notifications = null, IEnumerable linkedNotificationRules = null, AsyncOperationPollingRules asyncOperationPollingRules = null, ProviderDstsConfiguration dstsConfiguration = null, ProviderNotificationOption? notificationOptions = null, IEnumerable resourceHydrationAccounts = null, IEnumerable notificationSubscriberSettings = null, IEnumerable managementGroupGlobalNotificationEndpoints = null, IEnumerable optionalFeatures = null, BlockActionVerb? resourceGroupLockOptionDuringMoveBlockActionVerb = null, ServiceClientOptionsType? serviceClientOptionsType = null, string legacyNamespace = null, IEnumerable legacyRegistrations = null, string customManifestVersion = null, ProviderHubMetadata providerHubMetadata = null, ProviderHubProvisioningState? provisioningState = null, SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications = null, IEnumerable privateResourceProviderAllowedSubscriptions = null, TokenAuthConfiguration tokenAuthConfiguration = null) + { + providerAuthenticationAllowedAudiences ??= new List(); + providerAuthorizations ??= new List(); + services ??= new List(); + requiredFeatures ??= new List(); + capabilities ??= new List(); + globalNotificationEndpoints ??= new List(); + notifications ??= new List(); + linkedNotificationRules ??= new List(); + resourceHydrationAccounts ??= new List(); + notificationSubscriberSettings ??= new List(); + managementGroupGlobalNotificationEndpoints ??= new List(); + optionalFeatures ??= new List(); + legacyRegistrations ??= new List(); + privateResourceProviderAllowedSubscriptions ??= new List(); + + return new ProviderRegistrationProperties( + providerAuthenticationAllowedAudiences != null ? new ResourceProviderAuthentication(providerAuthenticationAllowedAudiences?.ToList(), serializedAdditionalRawData: null) : null, + providerAuthorizations?.ToList(), + @namespace, + services?.ToList(), + serviceName, + providerVersion, + providerType, + requiredFeatures?.ToList(), + requiredFeaturesPolicy.HasValue ? new ProviderFeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, + requestHeaderOptions, + management, + capabilities?.ToList(), + crossTenantTokenValidation, + metadata, + templateDeploymentOptions, + globalNotificationEndpoints?.ToList(), + enableTenantLinkedNotification, + notifications?.ToList(), + linkedNotificationRules?.ToList(), + asyncOperationPollingRules != null ? new ResourceProviderAuthorizationRules(asyncOperationPollingRules, serializedAdditionalRawData: null) : null, + dstsConfiguration, + notificationOptions, + resourceHydrationAccounts?.ToList(), + notificationSubscriberSettings != null ? new ResourceProviderManifestNotificationSettings(notificationSubscriberSettings?.ToList(), serializedAdditionalRawData: null) : null, + managementGroupGlobalNotificationEndpoints?.ToList(), + optionalFeatures?.ToList(), + resourceGroupLockOptionDuringMoveBlockActionVerb != null ? new ResourceProviderManifestResourceGroupLockOptionDuringMove(resourceGroupLockOptionDuringMoveBlockActionVerb, serializedAdditionalRawData: null) : null, + serviceClientOptionsType != null ? new ResourceProviderManifestResponseOptions(serviceClientOptionsType, serializedAdditionalRawData: null) : null, + legacyNamespace, + legacyRegistrations?.ToList(), + customManifestVersion, + serializedAdditionalRawData: null, + providerHubMetadata, + provisioningState, + subscriptionLifecycleNotificationSpecifications, + privateResourceProviderAllowedSubscriptions != null ? new ProviderRegistrationPropertiesPrivateResourceProviderConfiguration(privateResourceProviderAllowedSubscriptions?.ToList(), serializedAdditionalRawData: null) : null, + tokenAuthConfiguration); + } + + /// Initializes a new instance of . + /// Whether the endpoint is enabled. + /// The api versions. + /// The endpoint uri. + /// The locations. + /// The required features. + /// The feature rules. + /// The timeout. + /// The endpoint type. + /// The sku link. + /// A new instance for mocking. + public static ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = null, IEnumerable apiVersions = null, Uri endpointUri = null, IEnumerable locations = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, TimeSpan? timeout = null, ProviderEndpointType? endpointType = null, string skuLink = null) + { + apiVersions ??= new List(); + locations ??= new List(); + requiredFeatures ??= new List(); + + return new ResourceProviderEndpoint( + isEnabled, + apiVersions?.ToList(), + endpointUri, + locations?.ToList(), + requiredFeatures?.ToList(), + requiredFeaturesPolicy.HasValue ? new ProviderFeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, + timeout, + endpointType, + skuLink, serializedAdditionalRawData: null); } @@ -58,8 +196,9 @@ public static ProviderRegistrationData ProviderRegistrationData(ResourceIdentifi /// The resourceType. /// The systemData. /// + /// Resource type registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. /// A new instance for mocking. - public static ResourceTypeRegistrationData ResourceTypeRegistrationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceTypeRegistrationProperties properties = null) + public static ResourceTypeRegistrationData ResourceTypeRegistrationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceTypeRegistrationProperties properties = null, ResourceTypeRegistrationKind? kind = null) { return new ResourceTypeRegistrationData( id, @@ -67,12 +206,197 @@ public static ResourceTypeRegistrationData ResourceTypeRegistrationData(Resource resourceType, systemData, properties, + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource routing type. + /// The additional options. + /// The cross tenant token validation. + /// The regionality. + /// The extensions. + /// The extension options. + /// The marketplace type. + /// The swagger specifications. + /// The allowed unauthorized actions. + /// The allowed unauthorized actions extensions. + /// The authorization action mappings. + /// The linked access checks. + /// The default api version. + /// The logging rules. + /// The throttling rules. + /// The required features. + /// The features rule. + /// Whether async operation is enabled. + /// The provisioning state. + /// Whether third party S2S is enabled. + /// The subscription lifecycle notification specifications. + /// Whether it is pure proxy. + /// The identity management. + /// The check name availability specifications. + /// The disallowed action verbs. + /// The service tree infos. + /// The request header options. + /// The subscription state rules. + /// The template deployment options. + /// The extended locations. + /// The resource move policy. + /// The resource deletion policy. + /// The resource concurrency control options. + /// The resource graph configuration. + /// The resource provider management. + /// The open api configuration. + /// The on behalf of tokens. + /// The category. + /// The resource validation. + /// The disallowed end user operations. + /// The metadata. + /// The sku link. + /// The quota rule. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. + /// The token auth configuration. + /// The template deployment policy. + /// The allow empty role assignments. + /// The policy execution type. + /// The availability zone rule. + /// The dsts configuration. + /// Async timeout rules. + /// Common API versions for the resource type. + /// The api profiles. + /// The linked operation rules. + /// The legacy name. + /// The legacy names. + /// Allowed template deployment reference actions. + /// The legacy policy. + /// Manifest link. + /// Capacity rule. + /// Marketplace options. + /// The allowed resource names. + /// Resource cache options. + /// Resource query management options. + /// Whether tags are supported. + /// Resource management options. + /// Grouping tag. + /// Add resource list target locations?. + /// Resource type common attribute management. + /// Routing rule. + /// The frontdoor request mode. + /// The resource sub type. + /// The async operation resource type name. + /// A new instance for mocking. + public static ResourceTypeRegistrationProperties ResourceTypeRegistrationProperties(ResourceRoutingType? routingType = null, AdditionalOptionResourceTypeRegistration? additionalOptions = null, CrossTenantTokenValidation? crossTenantTokenValidation = null, ResourceTypeRegistrationRegionality? regionality = null, IEnumerable endpoints = null, ExtensionOptions extensionOptionsResourceCreationBegin = null, MarketplaceType? marketplaceType = null, IEnumerable swaggerSpecifications = null, IEnumerable allowedUnauthorizedActions = null, IEnumerable allowedUnauthorizedActionsExtensions = null, IEnumerable authorizationActionMappings = null, IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, IEnumerable loggingRules = null, IEnumerable throttlingRules = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, bool? isAsyncOperationEnabled = null, ProviderHubProvisioningState? provisioningState = null, bool? isThirdPartyS2SEnabled = null, SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications = null, bool? isPureProxy = null, IdentityManagementProperties identityManagement = null, CheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications = null, IEnumerable disallowedActionVerbs = null, IEnumerable serviceTreeInfos = null, ProviderRequestHeaderOptions requestHeaderOptions = null, IEnumerable subscriptionStateRules = null, TemplateDeploymentOptions templateDeploymentOptions = null, IEnumerable extendedLocations = null, ResourceMovePolicy resourceMovePolicy = null, ResourceDeletionPolicy? resourceDeletionPolicy = null, IDictionary resourceConcurrencyControlOptions = null, ResourceGraphConfiguration resourceGraphConfiguration = null, ResourceProviderManagement management = null, bool? isNoncompliantCollectionResponseAllowed = null, ResourceTypeOnBehalfOfToken onBehalfOfTokens = null, ResourceTypeCategory? category = null, ResourceValidation? resourceValidation = null, IEnumerable disallowedEndUserOperations = null, IDictionary metadata = null, string skuLink = null, ProviderQuotaRule quotaRule = null, IEnumerable notifications = null, IEnumerable linkedNotificationRules = null, AsyncOperationPollingRules asyncOperationPollingRules = null, TokenAuthConfiguration tokenAuthConfiguration = null, TemplateDeploymentPolicy templateDeploymentPolicy = null, bool? isEmptyRoleAssignmentsAllowed = null, PolicyExecutionType? policyExecutionType = null, AvailabilityZonePolicy? availabilityZonePolicy = null, ProviderDstsConfiguration dstsConfiguration = null, IEnumerable asyncTimeoutRules = null, IEnumerable commonApiVersions = null, IEnumerable apiProfiles = null, IEnumerable linkedOperationRules = null, string legacyName = null, IEnumerable legacyNames = null, IEnumerable allowedTemplateDeploymentReferenceActions = null, ResourceTypeRegistrationLegacyPolicy legacyPolicy = null, string manifestLink = null, ResourceTypeRegistrationCapacityRule capacityRule = null, bool? isAddOnPlanConversionAllowed = null, IEnumerable allowedResourceNames = null, ResourceTypeRegistrationResourceCache resourceCache = null, ProviderResourceQueryFilterOption? resourceQueryManagementFilterOption = null, bool? areTagsSupported = null, ResourceTypeRegistrationResourceManagementOptions resourceManagementOptions = null, string groupingTag = null, bool? isAddResourceListTargetLocationsAllowed = null, CommonApiVersionsMergeMode? commonApiVersionsMergeMode = null, string routingRuleHostResourceType = null, FrontdoorRequestMode? frontdoorRequestMode = null, ProviderResourceSubType? resourceSubType = null, string asyncOperationResourceTypeName = null) + { + endpoints ??= new List(); + swaggerSpecifications ??= new List(); + allowedUnauthorizedActions ??= new List(); + allowedUnauthorizedActionsExtensions ??= new List(); + authorizationActionMappings ??= new List(); + linkedAccessChecks ??= new List(); + loggingRules ??= new List(); + throttlingRules ??= new List(); + requiredFeatures ??= new List(); + disallowedActionVerbs ??= new List(); + serviceTreeInfos ??= new List(); + subscriptionStateRules ??= new List(); + extendedLocations ??= new List(); + resourceConcurrencyControlOptions ??= new Dictionary(); + disallowedEndUserOperations ??= new List(); + metadata ??= new Dictionary(); + notifications ??= new List(); + linkedNotificationRules ??= new List(); + asyncTimeoutRules ??= new List(); + commonApiVersions ??= new List(); + apiProfiles ??= new List(); + linkedOperationRules ??= new List(); + legacyNames ??= new List(); + allowedTemplateDeploymentReferenceActions ??= new List(); + allowedResourceNames ??= new List(); + + return new ResourceTypeRegistrationProperties( + routingType, + additionalOptions, + crossTenantTokenValidation, + regionality, + endpoints?.ToList(), + extensionOptionsResourceCreationBegin != null ? new ResourceTypeExtensionOptions(extensionOptionsResourceCreationBegin, serializedAdditionalRawData: null) : null, + marketplaceType, + swaggerSpecifications?.ToList(), + allowedUnauthorizedActions?.ToList(), + allowedUnauthorizedActionsExtensions?.ToList(), + authorizationActionMappings?.ToList(), + linkedAccessChecks?.ToList(), + defaultApiVersion, + loggingRules?.ToList(), + throttlingRules?.ToList(), + requiredFeatures?.ToList(), + requiredFeaturesPolicy.HasValue ? new ProviderFeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, + isAsyncOperationEnabled, + provisioningState, + isThirdPartyS2SEnabled, + subscriptionLifecycleNotificationSpecifications, + isPureProxy, + identityManagement, + checkNameAvailabilitySpecifications, + disallowedActionVerbs?.ToList(), + serviceTreeInfos?.ToList(), + requestHeaderOptions, + subscriptionStateRules?.ToList(), + templateDeploymentOptions, + extendedLocations?.ToList(), + resourceMovePolicy, + resourceDeletionPolicy, + resourceConcurrencyControlOptions, + resourceGraphConfiguration, + management, + isNoncompliantCollectionResponseAllowed != null ? new OpenApiConfiguration(new OpenApiValidation(isNoncompliantCollectionResponseAllowed, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, + onBehalfOfTokens, + category, + resourceValidation, + disallowedEndUserOperations?.ToList(), + metadata, + skuLink, + quotaRule, + notifications?.ToList(), + linkedNotificationRules?.ToList(), + asyncOperationPollingRules != null ? new ResourceProviderAuthorizationRules(asyncOperationPollingRules, serializedAdditionalRawData: null) : null, + tokenAuthConfiguration, + templateDeploymentPolicy, + isEmptyRoleAssignmentsAllowed, + policyExecutionType, + availabilityZonePolicy != null ? new ResourceTypeRegistrationAvailabilityZoneRule(availabilityZonePolicy, serializedAdditionalRawData: null) : null, + dstsConfiguration, + asyncTimeoutRules?.ToList(), + commonApiVersions?.ToList(), + apiProfiles?.ToList(), + linkedOperationRules?.ToList(), + legacyName, + legacyNames?.ToList(), + allowedTemplateDeploymentReferenceActions?.ToList(), + legacyPolicy, + manifestLink, + capacityRule, + isAddOnPlanConversionAllowed != null ? new ResourceTypeRegistrationMarketplaceOptions(isAddOnPlanConversionAllowed, serializedAdditionalRawData: null) : null, + allowedResourceNames?.ToList(), + resourceCache, + resourceQueryManagementFilterOption != null ? new ProviderResourceQueryManagement(resourceQueryManagementFilterOption, serializedAdditionalRawData: null) : null, + areTagsSupported, + resourceManagementOptions, + groupingTag, + isAddResourceListTargetLocationsAllowed, + commonApiVersionsMergeMode != null ? new ResourceTypeCommonAttributeManagement(commonApiVersionsMergeMode, serializedAdditionalRawData: null) : null, + routingRuleHostResourceType != null ? new ResourceTypeRegistrationRoutingRule(routingRuleHostResourceType, serializedAdditionalRawData: null) : null, + frontdoorRequestMode, + resourceSubType, + asyncOperationResourceTypeName, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// - /// Any object. + /// The type of the error. + /// The error information. /// A new instance for mocking. public static TypedErrorInfo TypedErrorInfo(string typedErrorInfoType = null, BinaryData info = null) { @@ -97,78 +421,113 @@ public static DefaultRolloutData DefaultRolloutData(ResourceIdentifier id = null serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The provisioned state of the resource. + /// The default rollout specification. + /// The default rollout status. + /// A new instance for mocking. + public static DefaultRolloutProperties DefaultRolloutProperties(ProviderHubProvisioningState? provisioningState = null, DefaultRolloutSpecification specification = null, DefaultRolloutStatus status = null) + { + return new DefaultRolloutProperties(provisioningState, specification, status, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Anything. - /// - /// + /// The provider authentication. + /// The provider authorizations. + /// The namespace. + /// The services. + /// The service name. + /// The provider version. + /// The provider type. + /// The required features. + /// The features rule. + /// The request header options. + /// The resource types. + /// The resource provider management. + /// The capabilities. + /// The cross tenant token validation. + /// The metadata. + /// The global notification endpoints. + /// The re-register subscription metadata. + /// Whether tenant linked notification is enabled. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. /// A new instance for mocking. - public static ResourceProviderManifest ResourceProviderManifest(IEnumerable providerAuthenticationAllowedAudiences = null, IEnumerable providerAuthorizations = null, string @namespace = null, string providerVersion = null, ResourceProviderType? providerType = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, OptInHeaderType? optInHeaders = null, IEnumerable resourceTypes = null, ResourceProviderManagement management = null, IEnumerable capabilities = null, BinaryData metadata = null, IEnumerable globalNotificationEndpoints = null, ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null) + public static ResourceProviderManifest ResourceProviderManifest(IEnumerable providerAuthenticationAllowedAudiences = null, IEnumerable providerAuthorizations = null, string @namespace = null, IEnumerable services = null, string serviceName = null, string providerVersion = null, ResourceProviderType? providerType = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, ProviderRequestHeaderOptions requestHeaderOptions = null, IEnumerable resourceTypes = null, ResourceProviderManagement management = null, IEnumerable capabilities = null, CrossTenantTokenValidation? crossTenantTokenValidation = null, BinaryData metadata = null, IEnumerable globalNotificationEndpoints = null, ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null, bool? isTenantLinkedNotificationEnabled = null, IEnumerable notifications = null, IEnumerable linkedNotificationRules = null, AsyncOperationPollingRules asyncOperationPollingRules = null) { providerAuthenticationAllowedAudiences ??= new List(); providerAuthorizations ??= new List(); + services ??= new List(); requiredFeatures ??= new List(); resourceTypes ??= new List(); capabilities ??= new List(); globalNotificationEndpoints ??= new List(); + notifications ??= new List(); + linkedNotificationRules ??= new List(); return new ResourceProviderManifest( providerAuthenticationAllowedAudiences != null ? new ResourceProviderAuthentication(providerAuthenticationAllowedAudiences?.ToList(), serializedAdditionalRawData: null) : null, providerAuthorizations?.ToList(), @namespace, + services?.ToList(), + serviceName, providerVersion, providerType, requiredFeatures?.ToList(), - requiredFeaturesPolicy.HasValue ? new FeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, - optInHeaders != null ? new RequestHeaderOptions(optInHeaders, serializedAdditionalRawData: null) : null, + requiredFeaturesPolicy.HasValue ? new ProviderFeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, + requestHeaderOptions, resourceTypes?.ToList(), management, capabilities?.ToList(), + crossTenantTokenValidation, metadata, globalNotificationEndpoints?.ToList(), reRegisterSubscriptionMetadata, + isTenantLinkedNotificationEnabled, + notifications?.ToList(), + linkedNotificationRules?.ToList(), + asyncOperationPollingRules != null ? new ResourceProviderAuthorizationRules(asyncOperationPollingRules, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Anything. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// + /// The resource type name. + /// The resource routing type. + /// The additional options. + /// The cross tenant token validation. + /// The resource validation. + /// The allowed unauthorized actions. + /// The allowed unauthorized actions extensions. + /// The authorization action mappings. + /// The linked access checks. + /// The default api version. + /// The logging rules. + /// The throttling rules. + /// The endpoints. + /// The marketplace type. + /// The identity management. + /// The metadata. + /// The required features. + /// The features rule. + /// The subscription state rules. + /// The service tree infos. + /// The request header options. + /// The sku link. + /// The disallowed action verbs. + /// The template deployment policy. + /// The extended locations. + /// The linked operation rules. + /// The resource deletion policy. + /// The quota rule. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. /// A new instance for mocking. - public static ProviderResourceType ProviderResourceType(string name = null, ResourceRoutingType? routingType = null, ResourceValidation? resourceValidation = null, IEnumerable allowedUnauthorizedActions = null, IEnumerable authorizationActionMappings = null, IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, IEnumerable loggingRules = null, IEnumerable throttlingRules = null, IEnumerable endpoints = null, MarketplaceType? marketplaceType = null, IdentityManagementType? managementType = null, BinaryData metadata = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, IEnumerable subscriptionStateRules = null, IEnumerable serviceTreeInfos = null, OptInHeaderType? optInHeaders = null, string skuLink = null, IEnumerable disallowedActionVerbs = null, TemplateDeploymentPolicy templateDeploymentPolicy = null, IEnumerable extendedLocations = null, IEnumerable linkedOperationRules = null, ManifestResourceDeletionPolicy? resourceDeletionPolicy = null) + public static ProviderResourceType ProviderResourceType(string name = null, ResourceRoutingType? routingType = null, AdditionalOptionResourceType? additionalOptions = null, CrossTenantTokenValidation? crossTenantTokenValidation = null, ResourceValidation? resourceValidation = null, IEnumerable allowedUnauthorizedActions = null, IEnumerable allowedUnauthorizedActionsExtensions = null, IEnumerable authorizationActionMappings = null, IEnumerable linkedAccessChecks = null, string defaultApiVersion = null, IEnumerable loggingRules = null, IEnumerable throttlingRules = null, IEnumerable endpoints = null, MarketplaceType? marketplaceType = null, IdentityManagementType? managementType = null, BinaryData metadata = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, IEnumerable subscriptionStateRules = null, IEnumerable serviceTreeInfos = null, ProviderRequestHeaderOptions requestHeaderOptions = null, string skuLink = null, IEnumerable disallowedActionVerbs = null, TemplateDeploymentPolicy templateDeploymentPolicy = null, IEnumerable extendedLocations = null, IEnumerable linkedOperationRules = null, ManifestResourceDeletionPolicy? resourceDeletionPolicy = null, ProviderQuotaRule quotaRule = null, IEnumerable notifications = null, IEnumerable linkedNotificationRules = null, AsyncOperationPollingRules asyncOperationPollingRules = null) { allowedUnauthorizedActions ??= new List(); + allowedUnauthorizedActionsExtensions ??= new List(); authorizationActionMappings ??= new List(); linkedAccessChecks ??= new List(); loggingRules ??= new List(); @@ -180,12 +539,17 @@ public static ProviderResourceType ProviderResourceType(string name = null, Reso disallowedActionVerbs ??= new List(); extendedLocations ??= new List(); linkedOperationRules ??= new List(); + notifications ??= new List(); + linkedNotificationRules ??= new List(); return new ProviderResourceType( name, routingType, + additionalOptions, + crossTenantTokenValidation, resourceValidation, allowedUnauthorizedActions?.ToList(), + allowedUnauthorizedActionsExtensions?.ToList(), authorizationActionMappings?.ToList(), linkedAccessChecks?.ToList(), defaultApiVersion, @@ -196,83 +560,32 @@ public static ProviderResourceType ProviderResourceType(string name = null, Reso managementType != null ? new IdentityManagement(managementType, serializedAdditionalRawData: null) : null, metadata, requiredFeatures?.ToList(), - requiredFeaturesPolicy.HasValue ? new FeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, + requiredFeaturesPolicy.HasValue ? new ProviderFeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, subscriptionStateRules?.ToList(), serviceTreeInfos?.ToList(), - optInHeaders != null ? new RequestHeaderOptions(optInHeaders, serializedAdditionalRawData: null) : null, + requestHeaderOptions, skuLink, disallowedActionVerbs?.ToList(), templateDeploymentPolicy, extendedLocations?.ToList(), linkedOperationRules?.ToList(), resourceDeletionPolicy, + quotaRule, + notifications?.ToList(), + linkedNotificationRules?.ToList(), + asyncOperationPollingRules != null ? new ResourceProviderAuthorizationRules(asyncOperationPollingRules, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = null, IEnumerable apiVersions = null, Uri endpointUri = null, IEnumerable locations = null, IEnumerable requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, TimeSpan? timeout = null) - { - apiVersions ??= new List(); - locations ??= new List(); - requiredFeatures ??= new List(); - - return new ResourceProviderEndpoint( - isEnabled, - apiVersions?.ToList(), - endpointUri, - locations?.ToList(), - requiredFeatures?.ToList(), - requiredFeaturesPolicy.HasValue ? new FeaturesRule(requiredFeaturesPolicy.Value, serializedAdditionalRawData: null) : null, - timeout, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static TemplateDeploymentPolicy TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities = default, TemplateDeploymentPreflightOption preflightOptions = default) - { - return new TemplateDeploymentPolicy(capabilities, preflightOptions, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static LinkedOperationRule LinkedOperationRule(LinkedOperation linkedOperation = default, LinkedAction linkedAction = default) - { - return new LinkedOperationRule(linkedOperation, linkedAction, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . - /// - /// + /// Whether it's enabled or not. + /// The concurrency limit. /// A new instance for mocking. public static ReRegisterSubscriptionMetadata ReRegisterSubscriptionMetadata(bool isEnabled = default, int? concurrencyLimit = null) { return new ReRegisterSubscriptionMetadata(isEnabled, concurrencyLimit, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// - /// - /// - /// A new instance for mocking. - public static CheckinManifestInfo CheckinManifestInfo(bool isCheckedIn = default, string statusMessage = null, string pullRequest = null, string commitId = null) - { - return new CheckinManifestInfo(isCheckedIn, statusMessage, pullRequest, commitId, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -291,6 +604,27 @@ public static NotificationRegistrationData NotificationRegistrationData(Resource serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The notification mode. + /// The message scope. + /// The included events. + /// The notification endpoints. + /// The provisioned state of the resource. + /// A new instance for mocking. + public static NotificationRegistrationProperties NotificationRegistrationProperties(NotificationMode? notificationMode = null, MessageScope? messageScope = null, IEnumerable includedEvents = null, IEnumerable notificationEndpoints = null, ProviderHubProvisioningState? provisioningState = null) + { + includedEvents ??= new List(); + notificationEndpoints ??= new List(); + + return new NotificationRegistrationProperties( + notificationMode, + messageScope, + includedEvents?.ToList(), + notificationEndpoints?.ToList(), + provisioningState, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -308,5 +642,107 @@ public static ResourceTypeSkuData ResourceTypeSkuData(ResourceIdentifier id = nu properties, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The sku settings. + /// The provisioning state. + /// A new instance for mocking. + public static ResourceTypeSkuProperties ResourceTypeSkuProperties(IEnumerable skuSettings = null, ProviderHubProvisioningState? provisioningState = null) + { + skuSettings ??= new List(); + + return new ResourceTypeSkuProperties(skuSettings?.ToList(), provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource id. + /// The home tenant id. + /// The location. + /// The operation status. + /// A new instance for mocking. + public static ResourceManagementEntity ResourceManagementEntity(ResourceIdentifier resourceId = null, string homeTenantId = null, AzureLocation? location = null, string status = null) + { + return new ResourceManagementEntity(resourceId, homeTenantId, location, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// A new instance for mocking. + public static ProviderAuthorizedApplicationData ProviderAuthorizedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProviderAuthorizedApplicationProperties properties = null) + { + return new ProviderAuthorizedApplicationData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The authorizations that determine the level of data access permissions on the specified resource types. + /// The provisioning state. + /// A new instance for mocking. + public static ProviderAuthorizedApplicationProperties ProviderAuthorizedApplicationProperties(ApplicationProviderAuthorization providerAuthorization = null, IEnumerable dataAuthorizations = null, ProviderHubProvisioningState? provisioningState = null) + { + dataAuthorizations ??= new List(); + + return new ProviderAuthorizedApplicationProperties(providerAuthorization, dataAuthorizations?.ToList(), provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// A new instance for mocking. + public static ProviderMonitorSettingData ProviderMonitorSettingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProviderHubProvisioningState? providerMonitorSettingProvisioningState = null) + { + tags ??= new Dictionary(); + + return new ProviderMonitorSettingData( + id, + name, + resourceType, + systemData, + tags, + location, + providerMonitorSettingProvisioningState != null ? new ProviderMonitorSettingProperties(providerMonitorSettingProvisioningState, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProviderRegistrationData ProviderRegistrationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProviderRegistrationProperties properties) + { + return ProviderRegistrationData(id: id, name: name, resourceType: resourceType, systemData: systemData, properties: properties, kind: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ResourceTypeRegistrationData ResourceTypeRegistrationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceTypeRegistrationProperties properties) + { + return ResourceTypeRegistrationData(id: id, name: name, resourceType: resourceType, systemData: systemData, properties: properties, kind: default); + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutCollection.cs index e94d922421b4..490cd69d33b3 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -88,9 +88,7 @@ public virtual async Task> CreateOrUpdateAsy try { var response = await _customRolloutRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.Name, rolloutName, data, cancellationToken).ConfigureAwait(false); - var uri = _customRolloutRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Name, rolloutName, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ProviderHubArmOperation(Response.FromValue(new CustomRolloutResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new ProviderHubArmOperation(new CustomRolloutOperationSource(Client), _customRolloutClientDiagnostics, Pipeline, _customRolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Name, rolloutName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -115,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -139,9 +137,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait try { var response = _customRolloutRestClient.CreateOrUpdate(Id.SubscriptionId, Id.Name, rolloutName, data, cancellationToken); - var uri = _customRolloutRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Name, rolloutName, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ProviderHubArmOperation(Response.FromValue(new CustomRolloutResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new ProviderHubArmOperation(new CustomRolloutOperationSource(Client), _customRolloutClientDiagnostics, Pipeline, _customRolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Name, rolloutName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -166,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -211,7 +207,7 @@ public virtual async Task> GetAsync(string rollo /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -256,7 +252,7 @@ public virtual Response Get(string rolloutName, Cancellat /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -286,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -316,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -359,7 +355,7 @@ public virtual async Task> ExistsAsync(string rolloutName, Cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -402,7 +398,7 @@ public virtual Response Exists(string rolloutName, CancellationToken cance /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -447,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutData.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutData.cs index cef998eb799c..d0c22d0ab8db 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutData.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutData.cs @@ -13,10 +13,7 @@ namespace Azure.ResourceManager.ProviderHub { - /// - /// A class representing the CustomRollout data model. - /// Rollout details. - /// + /// A class representing the CustomRollout data model. public partial class CustomRolloutData : ResourceData { /// diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.cs index ed347ab5eeea..902333e38216 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -167,6 +167,94 @@ public virtual Response Get(CancellationToken cancellatio } } + /// + /// Deletes the custom rollout resource. Custom rollout must be in terminal state. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName} + /// + /// + /// Operation Id + /// CustomRollouts_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customRolloutClientDiagnostics.CreateScope("CustomRolloutResource.Delete"); + scope.Start(); + try + { + var response = await _customRolloutRestClient.DeleteAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _customRolloutRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the custom rollout resource. Custom rollout must be in terminal state. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName} + /// + /// + /// Operation Id + /// CustomRollouts_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customRolloutClientDiagnostics.CreateScope("CustomRolloutResource.Delete"); + scope.Start(); + try + { + var response = _customRolloutRestClient.Delete(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _customRolloutRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Creates or updates the rollout details. /// @@ -180,7 +268,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -201,9 +289,7 @@ public virtual async Task> UpdateAsync(WaitU try { var response = await _customRolloutRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var uri = _customRolloutRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ProviderHubArmOperation(Response.FromValue(new CustomRolloutResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new ProviderHubArmOperation(new CustomRolloutOperationSource(Client), _customRolloutClientDiagnostics, Pipeline, _customRolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -228,7 +314,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -249,9 +335,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, C try { var response = _customRolloutRestClient.CreateOrUpdate(Id.SubscriptionId, Id.Parent.Name, Id.Name, data, cancellationToken); - var uri = _customRolloutRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ProviderHubArmOperation(Response.FromValue(new CustomRolloutResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new ProviderHubArmOperation(new CustomRolloutOperationSource(Client), _customRolloutClientDiagnostics, Pipeline, _customRolloutRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -262,5 +346,81 @@ public virtual ArmOperation Update(WaitUntil waitUntil, C throw; } } + + /// + /// Stops or cancels the custom rollout, if in progress. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}/stop + /// + /// + /// Operation Id + /// CustomRollouts_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task StopAsync(CancellationToken cancellationToken = default) + { + using var scope = _customRolloutClientDiagnostics.CreateScope("CustomRolloutResource.Stop"); + scope.Start(); + try + { + var response = await _customRolloutRestClient.StopAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops or cancels the custom rollout, if in progress. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}/stop + /// + /// + /// Operation Id + /// CustomRollouts_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Stop(CancellationToken cancellationToken = default) + { + using var scope = _customRolloutClientDiagnostics.CreateScope("CustomRolloutResource.Stop"); + scope.Start(); + try + { + var response = _customRolloutRestClient.Stop(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutCollection.cs index a6516aef216a..d3f110310384 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string roll /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string rolloutName, Cancella /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string rolloutName, Cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string rolloutName, CancellationToken cance /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutData.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutData.cs index 8818593fc135..ae001ffc7dd4 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutData.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutData.cs @@ -13,10 +13,7 @@ namespace Azure.ResourceManager.ProviderHub { - /// - /// A class representing the DefaultRollout data model. - /// Default rollout definition. - /// + /// A class representing the DefaultRollout data model. public partial class DefaultRolloutData : ResourceData { /// diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.cs index 4f263cba4881..deeb9fce068f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task StopAsync(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubArmClient.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubArmClient.cs index 8f759aaf2326..c169d9f9850f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubArmClient.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubArmClient.cs @@ -58,6 +58,18 @@ public virtual DefaultRolloutResource GetDefaultRolloutResource(ResourceIdentifi return new DefaultRolloutResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual RegistrationNewRegionFrontloadReleaseResource GetRegistrationNewRegionFrontloadReleaseResource(ResourceIdentifier id) + { + RegistrationNewRegionFrontloadReleaseResource.ValidateResourceId(id); + return new RegistrationNewRegionFrontloadReleaseResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -141,5 +153,29 @@ public virtual NestedResourceTypeThirdSkuResource GetNestedResourceTypeThirdSkuR NestedResourceTypeThirdSkuResource.ValidateResourceId(id); return new NestedResourceTypeThirdSkuResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ProviderAuthorizedApplicationResource GetProviderAuthorizedApplicationResource(ResourceIdentifier id) + { + ProviderAuthorizedApplicationResource.ValidateResourceId(id); + return new ProviderAuthorizedApplicationResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ProviderMonitorSettingResource GetProviderMonitorSettingResource(ResourceIdentifier id) + { + ProviderMonitorSettingResource.ValidateResourceId(id); + return new ProviderMonitorSettingResource(Client, id); + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubResourceGroupResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubResourceGroupResource.cs new file mode 100644 index 000000000000..df66fdce6d7e --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubResourceGroupResource.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableProviderHubResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableProviderHubResourceGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableProviderHubResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of ProviderMonitorSettingResources in the ResourceGroupResource. + /// An object representing collection of ProviderMonitorSettingResources and their operations over a ProviderMonitorSettingResource. + public virtual ProviderMonitorSettingCollection GetProviderMonitorSettings() + { + return GetCachedClient(client => new ProviderMonitorSettingCollection(client, Id)); + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetProviderMonitorSettingAsync(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + return await GetProviderMonitorSettings().GetAsync(providerMonitorSettingName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetProviderMonitorSetting(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + return GetProviderMonitorSettings().Get(providerMonitorSettingName, cancellationToken); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubSubscriptionResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubSubscriptionResource.cs index 655bb769040e..13927128eb69 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubSubscriptionResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/MockableProviderHubSubscriptionResource.cs @@ -8,13 +8,18 @@ using System; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure.Core; +using Azure.Core.Pipeline; namespace Azure.ResourceManager.ProviderHub.Mocking { /// A class to add extension methods to SubscriptionResource. public partial class MockableProviderHubSubscriptionResource : ArmResource { + private ClientDiagnostics _providerMonitorSettingClientDiagnostics; + private ProviderMonitorSettingsRestOperations _providerMonitorSettingRestClient; + /// Initializes a new instance of the class for mocking. protected MockableProviderHubSubscriptionResource() { @@ -27,6 +32,9 @@ internal MockableProviderHubSubscriptionResource(ArmClient client, ResourceIdent { } + private ClientDiagnostics ProviderMonitorSettingClientDiagnostics => _providerMonitorSettingClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ProviderMonitorSettingResource.ResourceType.Namespace, Diagnostics); + private ProviderMonitorSettingsRestOperations ProviderMonitorSettingRestClient => _providerMonitorSettingRestClient ??= new ProviderMonitorSettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ProviderMonitorSettingResource.ResourceType)); + private string GetApiVersionOrNull(ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); @@ -53,7 +61,7 @@ public virtual ProviderRegistrationCollection GetProviderRegistrations() /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -84,7 +92,7 @@ public virtual async Task> GetProviderReg /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -101,5 +109,65 @@ public virtual Response GetProviderRegistration(st { return GetProviderRegistrations().Get(providerNamespace, cancellationToken); } + + /// + /// Gets the list of the provider monitor settings in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerMonitorSettings + /// + /// + /// Operation Id + /// ProviderMonitorSettings_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetProviderMonitorSettingsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ProviderMonitorSettingRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProviderMonitorSettingRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProviderMonitorSettingResource(Client, ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(e)), ProviderMonitorSettingClientDiagnostics, Pipeline, "MockableProviderHubSubscriptionResource.GetProviderMonitorSettings", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of the provider monitor settings in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerMonitorSettings + /// + /// + /// Operation Id + /// ProviderMonitorSettings_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetProviderMonitorSettings(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ProviderMonitorSettingRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProviderMonitorSettingRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProviderMonitorSettingResource(Client, ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(e)), ProviderMonitorSettingClientDiagnostics, Pipeline, "MockableProviderHubSubscriptionResource.GetProviderMonitorSettings", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/ProviderHubExtensions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/ProviderHubExtensions.cs index 8686a1a20423..0e129e337b99 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/ProviderHubExtensions.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Extensions/ProviderHubExtensions.cs @@ -22,6 +22,11 @@ private static MockableProviderHubArmClient GetMockableProviderHubArmClient(ArmC return client.GetCachedClient(client0 => new MockableProviderHubArmClient(client0)); } + private static MockableProviderHubResourceGroupResource GetMockableProviderHubResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableProviderHubResourceGroupResource(client, resource.Id)); + } + private static MockableProviderHubSubscriptionResource GetMockableProviderHubSubscriptionResource(ArmResource resource) { return resource.GetCachedClient(client => new MockableProviderHubSubscriptionResource(client, resource.Id)); @@ -65,6 +70,25 @@ public static DefaultRolloutResource GetDefaultRolloutResource(this ArmClient cl return GetMockableProviderHubArmClient(client).GetDefaultRolloutResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static RegistrationNewRegionFrontloadReleaseResource GetRegistrationNewRegionFrontloadReleaseResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableProviderHubArmClient(client).GetRegistrationNewRegionFrontloadReleaseResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -198,6 +222,137 @@ public static NestedResourceTypeThirdSkuResource GetNestedResourceTypeThirdSkuRe return GetMockableProviderHubArmClient(client).GetNestedResourceTypeThirdSkuResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ProviderAuthorizedApplicationResource GetProviderAuthorizedApplicationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableProviderHubArmClient(client).GetProviderAuthorizedApplicationResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ProviderMonitorSettingResource GetProviderMonitorSettingResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableProviderHubArmClient(client).GetProviderMonitorSettingResource(id); + } + + /// + /// Gets a collection of ProviderMonitorSettingResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ProviderMonitorSettingResources and their operations over a ProviderMonitorSettingResource. + public static ProviderMonitorSettingCollection GetProviderMonitorSettings(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableProviderHubResourceGroupResource(resourceGroupResource).GetProviderMonitorSettings(); + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetProviderMonitorSettingAsync(this ResourceGroupResource resourceGroupResource, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableProviderHubResourceGroupResource(resourceGroupResource).GetProviderMonitorSettingAsync(providerMonitorSettingName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetProviderMonitorSetting(this ResourceGroupResource resourceGroupResource, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableProviderHubResourceGroupResource(resourceGroupResource).GetProviderMonitorSetting(providerMonitorSettingName, cancellationToken); + } + /// /// Gets a collection of ProviderRegistrationResources in the SubscriptionResource. /// @@ -228,7 +383,7 @@ public static ProviderRegistrationCollection GetProviderRegistrations(this Subsc /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -266,7 +421,7 @@ public static async Task> GetProviderRegi /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -290,5 +445,77 @@ public static Response GetProviderRegistration(thi return GetMockableProviderHubSubscriptionResource(subscriptionResource).GetProviderRegistration(providerNamespace, cancellationToken); } + + /// + /// Gets the list of the provider monitor settings in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerMonitorSettings + /// + /// + /// Operation Id + /// ProviderMonitorSettings_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetProviderMonitorSettingsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableProviderHubSubscriptionResource(subscriptionResource).GetProviderMonitorSettingsAsync(cancellationToken); + } + + /// + /// Gets the list of the provider monitor settings in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerMonitorSettings + /// + /// + /// Operation Id + /// ProviderMonitorSettings_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetProviderMonitorSettings(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableProviderHubSubscriptionResource(subscriptionResource).GetProviderMonitorSettings(cancellationToken); + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/CustomRolloutOperationSource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/CustomRolloutOperationSource.cs new file mode 100644 index 000000000000..4bc2c7b3baaf --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/CustomRolloutOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub +{ + internal class CustomRolloutOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CustomRolloutOperationSource(ArmClient client) + { + _client = client; + } + + CustomRolloutResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerProviderHubContext.Default); + return new CustomRolloutResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerProviderHubContext.Default); + return await Task.FromResult(new CustomRolloutResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/ProviderAuthorizedApplicationOperationSource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/ProviderAuthorizedApplicationOperationSource.cs new file mode 100644 index 000000000000..91d40c327403 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/ProviderAuthorizedApplicationOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub +{ + internal class ProviderAuthorizedApplicationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ProviderAuthorizedApplicationOperationSource(ArmClient client) + { + _client = client; + } + + ProviderAuthorizedApplicationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerProviderHubContext.Default); + return new ProviderAuthorizedApplicationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerProviderHubContext.Default); + return await Task.FromResult(new ProviderAuthorizedApplicationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/ProviderMonitorSettingOperationSource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/ProviderMonitorSettingOperationSource.cs new file mode 100644 index 000000000000..688cd5a554a8 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/LongRunningOperation/ProviderMonitorSettingOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub +{ + internal class ProviderMonitorSettingOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ProviderMonitorSettingOperationSource(ArmClient client) + { + _client = client; + } + + ProviderMonitorSettingResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerProviderHubContext.Default); + return new ProviderMonitorSettingResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerProviderHubContext.Default); + return await Task.FromResult(new ProviderMonitorSettingResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionAsyncOperation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionAsyncOperation.cs new file mode 100644 index 000000000000..822d456a23c3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionAsyncOperation.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The additional options. + public readonly partial struct AdditionalOptionAsyncOperation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AdditionalOptionAsyncOperation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProtectedAsyncOperationPollingValue = "ProtectedAsyncOperationPolling"; + private const string ProtectedAsyncOperationPollingAuditOnlyValue = "ProtectedAsyncOperationPollingAuditOnly"; + + /// ProtectedAsyncOperationPolling. + public static AdditionalOptionAsyncOperation ProtectedAsyncOperationPolling { get; } = new AdditionalOptionAsyncOperation(ProtectedAsyncOperationPollingValue); + /// ProtectedAsyncOperationPollingAuditOnly. + public static AdditionalOptionAsyncOperation ProtectedAsyncOperationPollingAuditOnly { get; } = new AdditionalOptionAsyncOperation(ProtectedAsyncOperationPollingAuditOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(AdditionalOptionAsyncOperation left, AdditionalOptionAsyncOperation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AdditionalOptionAsyncOperation left, AdditionalOptionAsyncOperation right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AdditionalOptionAsyncOperation(string value) => new AdditionalOptionAsyncOperation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AdditionalOptionAsyncOperation other && Equals(other); + /// + public bool Equals(AdditionalOptionAsyncOperation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionResourceType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionResourceType.cs new file mode 100644 index 000000000000..ce741258b05f --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionResourceType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The additional options. + public readonly partial struct AdditionalOptionResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AdditionalOptionResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProtectedAsyncOperationPollingValue = "ProtectedAsyncOperationPolling"; + private const string ProtectedAsyncOperationPollingAuditOnlyValue = "ProtectedAsyncOperationPollingAuditOnly"; + + /// ProtectedAsyncOperationPolling. + public static AdditionalOptionResourceType ProtectedAsyncOperationPolling { get; } = new AdditionalOptionResourceType(ProtectedAsyncOperationPollingValue); + /// ProtectedAsyncOperationPollingAuditOnly. + public static AdditionalOptionResourceType ProtectedAsyncOperationPollingAuditOnly { get; } = new AdditionalOptionResourceType(ProtectedAsyncOperationPollingAuditOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(AdditionalOptionResourceType left, AdditionalOptionResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AdditionalOptionResourceType left, AdditionalOptionResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AdditionalOptionResourceType(string value) => new AdditionalOptionResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AdditionalOptionResourceType other && Equals(other); + /// + public bool Equals(AdditionalOptionResourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionResourceTypeRegistration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionResourceTypeRegistration.cs new file mode 100644 index 000000000000..1efd6ab46910 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AdditionalOptionResourceTypeRegistration.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The additional options. + public readonly partial struct AdditionalOptionResourceTypeRegistration : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AdditionalOptionResourceTypeRegistration(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProtectedAsyncOperationPollingValue = "ProtectedAsyncOperationPolling"; + private const string ProtectedAsyncOperationPollingAuditOnlyValue = "ProtectedAsyncOperationPollingAuditOnly"; + + /// ProtectedAsyncOperationPolling. + public static AdditionalOptionResourceTypeRegistration ProtectedAsyncOperationPolling { get; } = new AdditionalOptionResourceTypeRegistration(ProtectedAsyncOperationPollingValue); + /// ProtectedAsyncOperationPollingAuditOnly. + public static AdditionalOptionResourceTypeRegistration ProtectedAsyncOperationPollingAuditOnly { get; } = new AdditionalOptionResourceTypeRegistration(ProtectedAsyncOperationPollingAuditOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(AdditionalOptionResourceTypeRegistration left, AdditionalOptionResourceTypeRegistration right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AdditionalOptionResourceTypeRegistration left, AdditionalOptionResourceTypeRegistration right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AdditionalOptionResourceTypeRegistration(string value) => new AdditionalOptionResourceTypeRegistration(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AdditionalOptionResourceTypeRegistration other && Equals(other); + /// + public bool Equals(AdditionalOptionResourceTypeRegistration other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedResourceName.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedResourceName.Serialization.cs new file mode 100644 index 000000000000..cca3d5529648 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedResourceName.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class AllowedResourceName : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AllowedResourceName)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(GetActionVerb)) + { + writer.WritePropertyName("getActionVerb"u8); + writer.WriteStringValue(GetActionVerb); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AllowedResourceName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AllowedResourceName)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAllowedResourceName(document.RootElement, options); + } + + internal static AllowedResourceName DeserializeAllowedResourceName(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string getActionVerb = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("getActionVerb"u8)) + { + getActionVerb = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AllowedResourceName(name, getActionVerb, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(AllowedResourceName)} does not support writing '{options.Format}' format."); + } + } + + AllowedResourceName IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAllowedResourceName(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AllowedResourceName)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedResourceName.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedResourceName.cs new file mode 100644 index 000000000000..6cf4f1d8ba8a --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedResourceName.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The AllowedResourceName. + public partial class AllowedResourceName + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AllowedResourceName() + { + } + + /// Initializes a new instance of . + /// Resource name. + /// Get action verb. + /// Keeps track of any properties unknown to the library. + internal AllowedResourceName(string name, string getActionVerb, IDictionary serializedAdditionalRawData) + { + Name = name; + GetActionVerb = getActionVerb; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource name. + public string Name { get; set; } + /// Get action verb. + public string GetActionVerb { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionIntent.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionIntent.cs new file mode 100644 index 000000000000..cfdf00d905a4 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionIntent.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The intent. + public readonly partial struct AllowedUnauthorizedActionIntent : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AllowedUnauthorizedActionIntent(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NOT_SPECIFIED"; + private const string LowPrivilegeValue = "LOW_PRIVILEGE"; + private const string DeferredAccessCheckValue = "DEFERRED_ACCESS_CHECK"; + private const string RPContractValue = "RP_CONTRACT"; + + /// Default value. + public static AllowedUnauthorizedActionIntent NotSpecified { get; } = new AllowedUnauthorizedActionIntent(NotSpecifiedValue); + /// Data is not sensitive and ok to access. + public static AllowedUnauthorizedActionIntent LowPrivilege { get; } = new AllowedUnauthorizedActionIntent(LowPrivilegeValue); + /// Used for RP's using a custom authorization check outside of ARM. + public static AllowedUnauthorizedActionIntent DeferredAccessCheck { get; } = new AllowedUnauthorizedActionIntent(DeferredAccessCheckValue); + /// RP contract allows certain operations to be unauthorized action. + public static AllowedUnauthorizedActionIntent RPContract { get; } = new AllowedUnauthorizedActionIntent(RPContractValue); + /// Determines if two values are the same. + public static bool operator ==(AllowedUnauthorizedActionIntent left, AllowedUnauthorizedActionIntent right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AllowedUnauthorizedActionIntent left, AllowedUnauthorizedActionIntent right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AllowedUnauthorizedActionIntent(string value) => new AllowedUnauthorizedActionIntent(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AllowedUnauthorizedActionIntent other && Equals(other); + /// + public bool Equals(AllowedUnauthorizedActionIntent other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionsExtension.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionsExtension.Serialization.cs new file mode 100644 index 000000000000..6b42ff7ca195 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionsExtension.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class AllowedUnauthorizedActionsExtension : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AllowedUnauthorizedActionsExtension)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action); + } + if (Optional.IsDefined(Intent)) + { + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AllowedUnauthorizedActionsExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AllowedUnauthorizedActionsExtension)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAllowedUnauthorizedActionsExtension(document.RootElement, options); + } + + internal static AllowedUnauthorizedActionsExtension DeserializeAllowedUnauthorizedActionsExtension(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string action = default; + AllowedUnauthorizedActionIntent? intent = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action"u8)) + { + action = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + intent = new AllowedUnauthorizedActionIntent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AllowedUnauthorizedActionsExtension(action, intent, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(AllowedUnauthorizedActionsExtension)} does not support writing '{options.Format}' format."); + } + } + + AllowedUnauthorizedActionsExtension IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAllowedUnauthorizedActionsExtension(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AllowedUnauthorizedActionsExtension)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionsExtension.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionsExtension.cs new file mode 100644 index 000000000000..e6611a9a0c9c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AllowedUnauthorizedActionsExtension.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The AllowedUnauthorizedActionsExtension. + public partial class AllowedUnauthorizedActionsExtension + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AllowedUnauthorizedActionsExtension() + { + } + + /// Initializes a new instance of . + /// The action. + /// The intent. + /// Keeps track of any properties unknown to the library. + internal AllowedUnauthorizedActionsExtension(string action, AllowedUnauthorizedActionIntent? intent, IDictionary serializedAdditionalRawData) + { + Action = action; + Intent = intent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The action. + public string Action { get; set; } + /// The intent. + public AllowedUnauthorizedActionIntent? Intent { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationDataAuthorization.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationDataAuthorization.Serialization.cs new file mode 100644 index 000000000000..6ea941f72505 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationDataAuthorization.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ApplicationDataAuthorization : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationDataAuthorization)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.ToString()); + if (Optional.IsCollectionDefined(ResourceTypes)) + { + writer.WritePropertyName("resourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in ResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationDataAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationDataAuthorization)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationDataAuthorization(document.RootElement, options); + } + + internal static ApplicationDataAuthorization DeserializeApplicationDataAuthorization(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApplicationOwnershipRole role = default; + IList resourceTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("role"u8)) + { + role = new ApplicationOwnershipRole(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationDataAuthorization(role, resourceTypes ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ApplicationDataAuthorization)} does not support writing '{options.Format}' format."); + } + } + + ApplicationDataAuthorization IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationDataAuthorization(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationDataAuthorization)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationDataAuthorization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationDataAuthorization.cs new file mode 100644 index 000000000000..61fe4fe94863 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationDataAuthorization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ApplicationDataAuthorization. + public partial class ApplicationDataAuthorization + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ownership role the application has on the resource types. The service owner role gives the application owner permissions. The limited owner role gives elevated permissions but does not allow all the permissions of a service owner, such as read/write on internal metadata. + public ApplicationDataAuthorization(ApplicationOwnershipRole role) + { + Role = role; + ResourceTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The ownership role the application has on the resource types. The service owner role gives the application owner permissions. The limited owner role gives elevated permissions but does not allow all the permissions of a service owner, such as read/write on internal metadata. + /// The resource types from the defined resource types in the provider namespace that the application can access. If no resource types are specified and the role is service owner, the default is * which is all resource types. + /// Keeps track of any properties unknown to the library. + internal ApplicationDataAuthorization(ApplicationOwnershipRole role, IList resourceTypes, IDictionary serializedAdditionalRawData) + { + Role = role; + ResourceTypes = resourceTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApplicationDataAuthorization() + { + } + + /// The ownership role the application has on the resource types. The service owner role gives the application owner permissions. The limited owner role gives elevated permissions but does not allow all the permissions of a service owner, such as read/write on internal metadata. + public ApplicationOwnershipRole Role { get; set; } + /// The resource types from the defined resource types in the provider namespace that the application can access. If no resource types are specified and the role is service owner, the default is * which is all resource types. + public IList ResourceTypes { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationOwnershipRole.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationOwnershipRole.cs new file mode 100644 index 000000000000..93825e197442 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationOwnershipRole.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ownership role the application has on the resource types. The service owner role gives the application owner permissions. The limited owner role gives elevated permissions but does not allow all the permissions of a service owner, such as read/write on internal metadata. + public readonly partial struct ApplicationOwnershipRole : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationOwnershipRole(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceOwnerValue = "ServiceOwner"; + private const string LimitedOwnerValue = "LimitedOwner"; + + /// ServiceOwner. + public static ApplicationOwnershipRole ServiceOwner { get; } = new ApplicationOwnershipRole(ServiceOwnerValue); + /// LimitedOwner. + public static ApplicationOwnershipRole LimitedOwner { get; } = new ApplicationOwnershipRole(LimitedOwnerValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationOwnershipRole left, ApplicationOwnershipRole right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationOwnershipRole left, ApplicationOwnershipRole right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ApplicationOwnershipRole(string value) => new ApplicationOwnershipRole(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationOwnershipRole other && Equals(other); + /// + public bool Equals(ApplicationOwnershipRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationProviderAuthorization.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationProviderAuthorization.Serialization.cs new file mode 100644 index 000000000000..0e79868f0953 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationProviderAuthorization.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ApplicationProviderAuthorization : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationProviderAuthorization)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RoleDefinitionId)) + { + writer.WritePropertyName("roleDefinitionId"u8); + writer.WriteStringValue(RoleDefinitionId); + } + if (Optional.IsDefined(ManagedByRoleDefinitionId)) + { + writer.WritePropertyName("managedByRoleDefinitionId"u8); + writer.WriteStringValue(ManagedByRoleDefinitionId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationProviderAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationProviderAuthorization)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationProviderAuthorization(document.RootElement, options); + } + + internal static ApplicationProviderAuthorization DeserializeApplicationProviderAuthorization(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string roleDefinitionId = default; + string managedByRoleDefinitionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("roleDefinitionId"u8)) + { + roleDefinitionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("managedByRoleDefinitionId"u8)) + { + managedByRoleDefinitionId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationProviderAuthorization(roleDefinitionId, managedByRoleDefinitionId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ApplicationProviderAuthorization)} does not support writing '{options.Format}' format."); + } + } + + ApplicationProviderAuthorization IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationProviderAuthorization(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationProviderAuthorization)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationProviderAuthorization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationProviderAuthorization.cs new file mode 100644 index 000000000000..c733d795c996 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ApplicationProviderAuthorization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ApplicationProviderAuthorization. + public partial class ApplicationProviderAuthorization + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ApplicationProviderAuthorization() + { + } + + /// Initializes a new instance of . + /// The role definition ID for the application. + /// The managed by role definition ID for the application. + /// Keeps track of any properties unknown to the library. + internal ApplicationProviderAuthorization(string roleDefinitionId, string managedByRoleDefinitionId, IDictionary serializedAdditionalRawData) + { + RoleDefinitionId = roleDefinitionId; + ManagedByRoleDefinitionId = managedByRoleDefinitionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The role definition ID for the application. + public string RoleDefinitionId { get; set; } + /// The managed by role definition ID for the application. + public string ManagedByRoleDefinitionId { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncOperationPollingRules.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncOperationPollingRules.Serialization.cs new file mode 100644 index 000000000000..8c6e1a0fe5ce --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncOperationPollingRules.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class AsyncOperationPollingRules : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AsyncOperationPollingRules)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AuthorizationActions)) + { + writer.WritePropertyName("authorizationActions"u8); + writer.WriteStartArray(); + foreach (var item in AuthorizationActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AdditionalOptions)) + { + writer.WritePropertyName("additionalOptions"u8); + writer.WriteStringValue(AdditionalOptions.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AsyncOperationPollingRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AsyncOperationPollingRules)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAsyncOperationPollingRules(document.RootElement, options); + } + + internal static AsyncOperationPollingRules DeserializeAsyncOperationPollingRules(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList authorizationActions = default; + AdditionalOptionAsyncOperation? additionalOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorizationActions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + authorizationActions = array; + continue; + } + if (property.NameEquals("additionalOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalOptions = new AdditionalOptionAsyncOperation(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AsyncOperationPollingRules(authorizationActions ?? new ChangeTrackingList(), additionalOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(AsyncOperationPollingRules)} does not support writing '{options.Format}' format."); + } + } + + AsyncOperationPollingRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAsyncOperationPollingRules(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AsyncOperationPollingRules)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncOperationPollingRules.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncOperationPollingRules.cs new file mode 100644 index 000000000000..84cce7afafde --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncOperationPollingRules.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The AsyncOperationPollingRules. + public partial class AsyncOperationPollingRules + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AsyncOperationPollingRules() + { + AuthorizationActions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The authorization actions. + /// The additional options. + /// Keeps track of any properties unknown to the library. + internal AsyncOperationPollingRules(IList authorizationActions, AdditionalOptionAsyncOperation? additionalOptions, IDictionary serializedAdditionalRawData) + { + AuthorizationActions = authorizationActions; + AdditionalOptions = additionalOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The authorization actions. + public IList AuthorizationActions { get; } + /// The additional options. + public AdditionalOptionAsyncOperation? AdditionalOptions { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncTimeoutRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncTimeoutRule.Serialization.cs new file mode 100644 index 000000000000..9d3ff950689b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncTimeoutRule.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class AsyncTimeoutRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AsyncTimeoutRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ActionName)) + { + writer.WritePropertyName("actionName"u8); + writer.WriteStringValue(ActionName); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AsyncTimeoutRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AsyncTimeoutRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAsyncTimeoutRule(document.RootElement, options); + } + + internal static AsyncTimeoutRule DeserializeAsyncTimeoutRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string actionName = default; + string timeout = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionName"u8)) + { + actionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeout"u8)) + { + timeout = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AsyncTimeoutRule(actionName, timeout, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(AsyncTimeoutRule)} does not support writing '{options.Format}' format."); + } + } + + AsyncTimeoutRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAsyncTimeoutRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AsyncTimeoutRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncTimeoutRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncTimeoutRule.cs new file mode 100644 index 000000000000..4c5cc0c4ecdc --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AsyncTimeoutRule.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The AsyncTimeoutRule. + public partial class AsyncTimeoutRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AsyncTimeoutRule() + { + } + + /// Initializes a new instance of . + /// + /// This is a TimeSpan property. + /// Keeps track of any properties unknown to the library. + internal AsyncTimeoutRule(string actionName, string timeout, IDictionary serializedAdditionalRawData) + { + ActionName = actionName; + Timeout = timeout; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the action name. + public string ActionName { get; set; } + /// This is a TimeSpan property. + public string Timeout { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizationActionMapping.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizationActionMapping.cs index 9d3732607051..5e2d51b92c18 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizationActionMapping.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizationActionMapping.cs @@ -51,8 +51,8 @@ public AuthorizationActionMapping() } /// Initializes a new instance of . - /// - /// + /// The original action name. + /// The desired action name. /// Keeps track of any properties unknown to the library. internal AuthorizationActionMapping(string original, string desired, IDictionary serializedAdditionalRawData) { @@ -61,9 +61,9 @@ internal AuthorizationActionMapping(string original, string desired, IDictionary _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the original. + /// The original action name. public string Original { get; set; } - /// Gets or sets the desired. + /// The desired action name. public string Desired { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizedApplicationArrayResponseWithContinuation.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizedApplicationArrayResponseWithContinuation.Serialization.cs new file mode 100644 index 000000000000..82daa2093f9c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizedApplicationArrayResponseWithContinuation.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class AuthorizedApplicationArrayResponseWithContinuation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizedApplicationArrayResponseWithContinuation)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AuthorizedApplicationArrayResponseWithContinuation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizedApplicationArrayResponseWithContinuation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizedApplicationArrayResponseWithContinuation(document.RootElement, options); + } + + internal static AuthorizedApplicationArrayResponseWithContinuation DeserializeAuthorizedApplicationArrayResponseWithContinuation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderAuthorizedApplicationData.DeserializeProviderAuthorizedApplicationData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizedApplicationArrayResponseWithContinuation(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(AuthorizedApplicationArrayResponseWithContinuation)} does not support writing '{options.Format}' format."); + } + } + + AuthorizedApplicationArrayResponseWithContinuation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAuthorizedApplicationArrayResponseWithContinuation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizedApplicationArrayResponseWithContinuation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizedApplicationArrayResponseWithContinuation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizedApplicationArrayResponseWithContinuation.cs new file mode 100644 index 000000000000..b3648d850e55 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AuthorizedApplicationArrayResponseWithContinuation.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The AuthorizedApplicationArrayResponseWithContinuation. + internal partial class AuthorizedApplicationArrayResponseWithContinuation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AuthorizedApplicationArrayResponseWithContinuation() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The value. + /// The URL to get to the next set of results, if there are any. + /// Keeps track of any properties unknown to the library. + internal AuthorizedApplicationArrayResponseWithContinuation(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The value. + public IReadOnlyList Value { get; } + /// The URL to get to the next set of results, if there are any. + public string NextLink { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AvailabilityZonePolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AvailabilityZonePolicy.cs new file mode 100644 index 000000000000..e18388ac2a88 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AvailabilityZonePolicy.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The AvailabilityZonePolicy. + public readonly partial struct AvailabilityZonePolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AvailabilityZonePolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string SingleZonedValue = "SingleZoned"; + private const string MultiZonedValue = "MultiZoned"; + + /// NotSpecified. + public static AvailabilityZonePolicy NotSpecified { get; } = new AvailabilityZonePolicy(NotSpecifiedValue); + /// SingleZoned. + public static AvailabilityZonePolicy SingleZoned { get; } = new AvailabilityZonePolicy(SingleZonedValue); + /// MultiZoned. + public static AvailabilityZonePolicy MultiZoned { get; } = new AvailabilityZonePolicy(MultiZonedValue); + /// Determines if two values are the same. + public static bool operator ==(AvailabilityZonePolicy left, AvailabilityZonePolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvailabilityZonePolicy left, AvailabilityZonePolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AvailabilityZonePolicy(string value) => new AvailabilityZonePolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvailabilityZonePolicy other && Equals(other); + /// + public bool Equals(AvailabilityZonePolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AvailableCheckInManifestEnvironment.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AvailableCheckInManifestEnvironment.cs new file mode 100644 index 000000000000..6c9c4c1a3eff --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AvailableCheckInManifestEnvironment.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The environment type. + public readonly partial struct AvailableCheckInManifestEnvironment : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AvailableCheckInManifestEnvironment(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string CanaryValue = "Canary"; + private const string ProdValue = "Prod"; + private const string AllValue = "All"; + private const string MooncakeValue = "Mooncake"; + private const string FairfaxValue = "Fairfax"; + + /// NotSpecified. + public static AvailableCheckInManifestEnvironment NotSpecified { get; } = new AvailableCheckInManifestEnvironment(NotSpecifiedValue); + /// Canary. + public static AvailableCheckInManifestEnvironment Canary { get; } = new AvailableCheckInManifestEnvironment(CanaryValue); + /// Prod. + public static AvailableCheckInManifestEnvironment Prod { get; } = new AvailableCheckInManifestEnvironment(ProdValue); + /// All. + public static AvailableCheckInManifestEnvironment All { get; } = new AvailableCheckInManifestEnvironment(AllValue); + /// Mooncake. + public static AvailableCheckInManifestEnvironment Mooncake { get; } = new AvailableCheckInManifestEnvironment(MooncakeValue); + /// Fairfax. + public static AvailableCheckInManifestEnvironment Fairfax { get; } = new AvailableCheckInManifestEnvironment(FairfaxValue); + /// Determines if two values are the same. + public static bool operator ==(AvailableCheckInManifestEnvironment left, AvailableCheckInManifestEnvironment right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvailableCheckInManifestEnvironment left, AvailableCheckInManifestEnvironment right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AvailableCheckInManifestEnvironment(string value) => new AvailableCheckInManifestEnvironment(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvailableCheckInManifestEnvironment other && Equals(other); + /// + public bool Equals(AvailableCheckInManifestEnvironment other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AzureResourceManagerProviderHubContext.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AzureResourceManagerProviderHubContext.cs index 09f43447f80b..521a9b920e5d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AzureResourceManagerProviderHubContext.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/AzureResourceManagerProviderHubContext.cs @@ -15,33 +15,50 @@ namespace Azure.ResourceManager.ProviderHub /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// + [ModelReaderWriterBuildable(typeof(AllowedResourceName))] + [ModelReaderWriterBuildable(typeof(AllowedUnauthorizedActionsExtension))] + [ModelReaderWriterBuildable(typeof(ApplicationDataAuthorization))] + [ModelReaderWriterBuildable(typeof(ApplicationProviderAuthorization))] + [ModelReaderWriterBuildable(typeof(AsyncOperationPollingRules))] + [ModelReaderWriterBuildable(typeof(AsyncTimeoutRule))] [ModelReaderWriterBuildable(typeof(AuthorizationActionMapping))] + [ModelReaderWriterBuildable(typeof(AuthorizedApplicationArrayResponseWithContinuation))] + [ModelReaderWriterBuildable(typeof(BatchProvisioningSupport))] [ModelReaderWriterBuildable(typeof(CanaryTrafficRegionRolloutConfiguration))] [ModelReaderWriterBuildable(typeof(CheckinManifestContent))] [ModelReaderWriterBuildable(typeof(CheckinManifestInfo))] [ModelReaderWriterBuildable(typeof(CheckNameAvailabilitySpecifications))] + [ModelReaderWriterBuildable(typeof(CustomRolloutAutoProvisionConfig))] [ModelReaderWriterBuildable(typeof(CustomRolloutData))] [ModelReaderWriterBuildable(typeof(CustomRolloutListResult))] [ModelReaderWriterBuildable(typeof(CustomRolloutProperties))] [ModelReaderWriterBuildable(typeof(CustomRolloutResource))] [ModelReaderWriterBuildable(typeof(CustomRolloutSpecification))] [ModelReaderWriterBuildable(typeof(CustomRolloutStatus))] + [ModelReaderWriterBuildable(typeof(DefaultRolloutAutoProvisionConfig))] [ModelReaderWriterBuildable(typeof(DefaultRolloutData))] [ModelReaderWriterBuildable(typeof(DefaultRolloutListResult))] [ModelReaderWriterBuildable(typeof(DefaultRolloutProperties))] [ModelReaderWriterBuildable(typeof(DefaultRolloutResource))] [ModelReaderWriterBuildable(typeof(DefaultRolloutSpecification))] + [ModelReaderWriterBuildable(typeof(DefaultRolloutSpecificationExpeditedRollout))] [ModelReaderWriterBuildable(typeof(DefaultRolloutStatus))] + [ModelReaderWriterBuildable(typeof(ExpeditedRolloutDefinition))] + [ModelReaderWriterBuildable(typeof(ExpeditedRolloutMetadata))] [ModelReaderWriterBuildable(typeof(ExtendedErrorInfo))] [ModelReaderWriterBuildable(typeof(ExtensionOptions))] - [ModelReaderWriterBuildable(typeof(FeaturesRule))] + [ModelReaderWriterBuildable(typeof(FanoutLinkedNotificationRule))] [ModelReaderWriterBuildable(typeof(IdentityManagement))] [ModelReaderWriterBuildable(typeof(IdentityManagementProperties))] + [ModelReaderWriterBuildable(typeof(LegacyDisallowedCondition))] [ModelReaderWriterBuildable(typeof(LightHouseAuthorization))] [ModelReaderWriterBuildable(typeof(LinkedAccessCheck))] + [ModelReaderWriterBuildable(typeof(LinkedNotificationRule))] [ModelReaderWriterBuildable(typeof(LinkedOperationRule))] [ModelReaderWriterBuildable(typeof(LoggingHiddenPropertyPaths))] [ModelReaderWriterBuildable(typeof(LoggingRule))] + [ModelReaderWriterBuildable(typeof(ManifestLevelPropertyBag))] + [ModelReaderWriterBuildable(typeof(NestedProvisioningSupport))] [ModelReaderWriterBuildable(typeof(NestedResourceTypeFirstSkuResource))] [ModelReaderWriterBuildable(typeof(NestedResourceTypeSecondSkuResource))] [ModelReaderWriterBuildable(typeof(NestedResourceTypeThirdSkuResource))] @@ -50,32 +67,80 @@ namespace Azure.ResourceManager.ProviderHub [ModelReaderWriterBuildable(typeof(NotificationRegistrationListResult))] [ModelReaderWriterBuildable(typeof(NotificationRegistrationProperties))] [ModelReaderWriterBuildable(typeof(NotificationRegistrationResource))] + [ModelReaderWriterBuildable(typeof(OpenApiConfiguration))] + [ModelReaderWriterBuildable(typeof(OpenApiValidation))] + [ModelReaderWriterBuildable(typeof(PrivateResourceProviderConfiguration))] + [ModelReaderWriterBuildable(typeof(ProviderAdditionalAuthorization))] + [ModelReaderWriterBuildable(typeof(ProviderAuthorizedApplicationData))] + [ModelReaderWriterBuildable(typeof(ProviderAuthorizedApplicationProperties))] + [ModelReaderWriterBuildable(typeof(ProviderAuthorizedApplicationResource))] + [ModelReaderWriterBuildable(typeof(ProviderDstsConfiguration))] + [ModelReaderWriterBuildable(typeof(ProviderEndpointInformation))] + [ModelReaderWriterBuildable(typeof(ProviderFeaturesRule))] + [ModelReaderWriterBuildable(typeof(ProviderFilterRule))] + [ModelReaderWriterBuildable(typeof(ProviderFrontloadPayload))] + [ModelReaderWriterBuildable(typeof(ProviderFrontloadPayloadProperties))] [ModelReaderWriterBuildable(typeof(ProviderHubExtendedLocationOptions))] [ModelReaderWriterBuildable(typeof(ProviderHubMetadata))] + [ModelReaderWriterBuildable(typeof(ProviderLocationQuotaRule))] + [ModelReaderWriterBuildable(typeof(ProviderMonitorSettingArrayResponseWithContinuation))] + [ModelReaderWriterBuildable(typeof(ProviderMonitorSettingData))] + [ModelReaderWriterBuildable(typeof(ProviderMonitorSettingProperties))] + [ModelReaderWriterBuildable(typeof(ProviderMonitorSettingResource))] + [ModelReaderWriterBuildable(typeof(ProviderNotification))] + [ModelReaderWriterBuildable(typeof(ProviderQuotaRule))] [ModelReaderWriterBuildable(typeof(ProviderRegistrationData))] [ModelReaderWriterBuildable(typeof(ProviderRegistrationListResult))] [ModelReaderWriterBuildable(typeof(ProviderRegistrationProperties))] + [ModelReaderWriterBuildable(typeof(ProviderRegistrationPropertiesPrivateResourceProviderConfiguration))] [ModelReaderWriterBuildable(typeof(ProviderRegistrationResource))] + [ModelReaderWriterBuildable(typeof(ProviderRequestHeaderOptions))] + [ModelReaderWriterBuildable(typeof(ProviderResourceQueryManagement))] [ModelReaderWriterBuildable(typeof(ProviderResourceType))] [ModelReaderWriterBuildable(typeof(ProviderSubscriptionStateRule))] - [ModelReaderWriterBuildable(typeof(RequestHeaderOptions))] + [ModelReaderWriterBuildable(typeof(RegistrationNewRegionFrontloadReleaseResource))] [ModelReaderWriterBuildable(typeof(ReRegisterSubscriptionMetadata))] + [ModelReaderWriterBuildable(typeof(ResourceAccessRole))] + [ModelReaderWriterBuildable(typeof(ResourceConcurrencyControlOption))] + [ModelReaderWriterBuildable(typeof(ResourceGraphConfiguration))] + [ModelReaderWriterBuildable(typeof(ResourceHydrationAccount))] + [ModelReaderWriterBuildable(typeof(ResourceManagementAction))] + [ModelReaderWriterBuildable(typeof(ResourceManagementEntity))] [ModelReaderWriterBuildable(typeof(ResourceMovePolicy))] [ModelReaderWriterBuildable(typeof(ResourceProviderAuthentication))] [ModelReaderWriterBuildable(typeof(ResourceProviderAuthorization))] + [ModelReaderWriterBuildable(typeof(ResourceProviderAuthorizationRules))] [ModelReaderWriterBuildable(typeof(ResourceProviderCapabilities))] [ModelReaderWriterBuildable(typeof(ResourceProviderEndpoint))] + [ModelReaderWriterBuildable(typeof(ResourceProviderErrorResponseMessageOptions))] + [ModelReaderWriterBuildable(typeof(ResourceProviderManagedByAuthorization))] [ModelReaderWriterBuildable(typeof(ResourceProviderManagement))] [ModelReaderWriterBuildable(typeof(ResourceProviderManifest))] + [ModelReaderWriterBuildable(typeof(ResourceProviderManifestNotificationSettings))] [ModelReaderWriterBuildable(typeof(ResourceProviderManifestProperties))] + [ModelReaderWriterBuildable(typeof(ResourceProviderManifestResourceGroupLockOptionDuringMove))] + [ModelReaderWriterBuildable(typeof(ResourceProviderManifestResponseOptions))] + [ModelReaderWriterBuildable(typeof(ResourceProviderService))] [ModelReaderWriterBuildable(typeof(ResourceSkuCapability))] + [ModelReaderWriterBuildable(typeof(ResourceTypeCommonAttributeManagement))] [ModelReaderWriterBuildable(typeof(ResourceTypeEndpoint))] + [ModelReaderWriterBuildable(typeof(ResourceTypeEndpointBase))] [ModelReaderWriterBuildable(typeof(ResourceTypeExtension))] [ModelReaderWriterBuildable(typeof(ResourceTypeExtensionOptions))] + [ModelReaderWriterBuildable(typeof(ResourceTypeOnBehalfOfToken))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationApiProfile))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationAvailabilityZoneRule))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationCapacityRule))] [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationData))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationDeleteDependency))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationLegacyPolicy))] [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationListResult))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationMarketplaceOptions))] [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationProperties))] [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationResource))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationResourceCache))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationResourceManagementOptions))] + [ModelReaderWriterBuildable(typeof(ResourceTypeRegistrationRoutingRule))] [ModelReaderWriterBuildable(typeof(ResourceTypeSkuCapacity))] [ModelReaderWriterBuildable(typeof(ResourceTypeSkuCost))] [ModelReaderWriterBuildable(typeof(ResourceTypeSkuData))] @@ -88,15 +153,18 @@ namespace Azure.ResourceManager.ProviderHub [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(RolloutStatusBase))] [ModelReaderWriterBuildable(typeof(ServiceTreeInfo))] + [ModelReaderWriterBuildable(typeof(SubscriberSetting))] [ModelReaderWriterBuildable(typeof(SubscriptionLifecycleNotificationSpecifications))] [ModelReaderWriterBuildable(typeof(SubscriptionStateOverrideAction))] [ModelReaderWriterBuildable(typeof(SwaggerSpecification))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(TemplateDeploymentOptions))] [ModelReaderWriterBuildable(typeof(TemplateDeploymentPolicy))] + [ModelReaderWriterBuildable(typeof(ThirdPartyExtension))] [ModelReaderWriterBuildable(typeof(ThirdPartyProviderAuthorization))] [ModelReaderWriterBuildable(typeof(ThrottlingMetric))] [ModelReaderWriterBuildable(typeof(ThrottlingRule))] + [ModelReaderWriterBuildable(typeof(TokenAuthConfiguration))] [ModelReaderWriterBuildable(typeof(TrafficRegionRolloutConfiguration))] [ModelReaderWriterBuildable(typeof(TrafficRegions))] [ModelReaderWriterBuildable(typeof(TypedErrorInfo))] diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BatchProvisioningSupport.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BatchProvisioningSupport.Serialization.cs new file mode 100644 index 000000000000..ae82f7d3fceb --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BatchProvisioningSupport.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class BatchProvisioningSupport : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchProvisioningSupport)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SupportedOperations)) + { + writer.WritePropertyName("supportedOperations"u8); + writer.WriteStringValue(SupportedOperations.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BatchProvisioningSupport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchProvisioningSupport)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchProvisioningSupport(document.RootElement, options); + } + + internal static BatchProvisioningSupport DeserializeBatchProvisioningSupport(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceManagementSupportedOperation? supportedOperations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("supportedOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + supportedOperations = new ResourceManagementSupportedOperation(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchProvisioningSupport(supportedOperations, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(BatchProvisioningSupport)} does not support writing '{options.Format}' format."); + } + } + + BatchProvisioningSupport IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBatchProvisioningSupport(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchProvisioningSupport)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BatchProvisioningSupport.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BatchProvisioningSupport.cs new file mode 100644 index 000000000000..a4be3ec586e7 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BatchProvisioningSupport.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Batch provisioning support. + internal partial class BatchProvisioningSupport + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchProvisioningSupport() + { + } + + /// Initializes a new instance of . + /// Supported operations. + /// Keeps track of any properties unknown to the library. + internal BatchProvisioningSupport(ResourceManagementSupportedOperation? supportedOperations, IDictionary serializedAdditionalRawData) + { + SupportedOperations = supportedOperations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Supported operations. + public ResourceManagementSupportedOperation? SupportedOperations { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BlockActionVerb.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BlockActionVerb.cs new file mode 100644 index 000000000000..64de834aa897 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/BlockActionVerb.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The action verb that will be blocked when the resource group is locked during move. + public readonly partial struct BlockActionVerb : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BlockActionVerb(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string ReadValue = "Read"; + private const string WriteValue = "Write"; + private const string ActionValue = "Action"; + private const string DeleteValue = "Delete"; + private const string UnrecognizedValue = "Unrecognized"; + + /// NotSpecified. + public static BlockActionVerb NotSpecified { get; } = new BlockActionVerb(NotSpecifiedValue); + /// Read. + public static BlockActionVerb Read { get; } = new BlockActionVerb(ReadValue); + /// Write. + public static BlockActionVerb Write { get; } = new BlockActionVerb(WriteValue); + /// Action. + public static BlockActionVerb Action { get; } = new BlockActionVerb(ActionValue); + /// Delete. + public static BlockActionVerb Delete { get; } = new BlockActionVerb(DeleteValue); + /// Unrecognized. + public static BlockActionVerb Unrecognized { get; } = new BlockActionVerb(UnrecognizedValue); + /// Determines if two values are the same. + public static bool operator ==(BlockActionVerb left, BlockActionVerb right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BlockActionVerb left, BlockActionVerb right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BlockActionVerb(string value) => new BlockActionVerb(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BlockActionVerb other && Equals(other); + /// + public bool Equals(BlockActionVerb other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CanaryTrafficRegionRolloutConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CanaryTrafficRegionRolloutConfiguration.cs index acc5f1e3ffdd..ccd449f0fe77 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CanaryTrafficRegionRolloutConfiguration.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CanaryTrafficRegionRolloutConfiguration.cs @@ -54,8 +54,8 @@ public CanaryTrafficRegionRolloutConfiguration() } /// Initializes a new instance of . - /// - /// + /// The skip regions. + /// The regions. /// Keeps track of any properties unknown to the library. internal CanaryTrafficRegionRolloutConfiguration(IList skipRegions, IList regions, IDictionary serializedAdditionalRawData) { @@ -64,9 +64,9 @@ internal CanaryTrafficRegionRolloutConfiguration(IList skipRegion _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the skip regions. + /// The skip regions. public IList SkipRegions { get; } - /// Gets the regions. + /// The regions. public IList Regions { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckNameAvailabilitySpecifications.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckNameAvailabilitySpecifications.cs index abea0dc2ff1e..d825c8b24637 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckNameAvailabilitySpecifications.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckNameAvailabilitySpecifications.cs @@ -52,8 +52,8 @@ public CheckNameAvailabilitySpecifications() } /// Initializes a new instance of . - /// - /// + /// Whether default validation is enabled. + /// The resource types with custom validation. /// Keeps track of any properties unknown to the library. internal CheckNameAvailabilitySpecifications(bool? isDefaultValidationEnabled, IList resourceTypesWithCustomValidation, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal CheckNameAvailabilitySpecifications(bool? isDefaultValidationEnabled, I _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the is default validation enabled. + /// Whether default validation is enabled. public bool? IsDefaultValidationEnabled { get; set; } - /// Gets the resource types with custom validation. + /// The resource types with custom validation. public IList ResourceTypesWithCustomValidation { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckinManifestInfo.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckinManifestInfo.cs index 207ab5f3d387..e690e6f1fac8 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckinManifestInfo.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CheckinManifestInfo.cs @@ -46,10 +46,10 @@ public partial class CheckinManifestInfo private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// + /// Whether the manifest is checked in. + /// The status message. /// is null. - internal CheckinManifestInfo(bool isCheckedIn, string statusMessage) + public CheckinManifestInfo(bool isCheckedIn, string statusMessage) { Argument.AssertNotNull(statusMessage, nameof(statusMessage)); @@ -58,10 +58,10 @@ internal CheckinManifestInfo(bool isCheckedIn, string statusMessage) } /// Initializes a new instance of . - /// - /// - /// - /// + /// Whether the manifest is checked in. + /// The status message. + /// The pull request. + /// The commit id. /// Keeps track of any properties unknown to the library. internal CheckinManifestInfo(bool isCheckedIn, string statusMessage, string pullRequest, string commitId, IDictionary serializedAdditionalRawData) { @@ -77,13 +77,13 @@ internal CheckinManifestInfo() { } - /// Gets the is checked in. - public bool IsCheckedIn { get; } - /// Gets the status message. - public string StatusMessage { get; } - /// Gets the pull request. - public string PullRequest { get; } - /// Gets the commit id. - public string CommitId { get; } + /// Whether the manifest is checked in. + public bool IsCheckedIn { get; set; } + /// The status message. + public string StatusMessage { get; set; } + /// The pull request. + public string PullRequest { get; set; } + /// The commit id. + public string CommitId { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CommonApiVersionsMergeMode.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CommonApiVersionsMergeMode.cs new file mode 100644 index 000000000000..4de9be3818cb --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CommonApiVersionsMergeMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Common api versions merge mode. + public readonly partial struct CommonApiVersionsMergeMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CommonApiVersionsMergeMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MergeValue = "Merge"; + private const string OverwriteValue = "Overwrite"; + + /// Merge. + public static CommonApiVersionsMergeMode Merge { get; } = new CommonApiVersionsMergeMode(MergeValue); + /// Overwrite. + public static CommonApiVersionsMergeMode Overwrite { get; } = new CommonApiVersionsMergeMode(OverwriteValue); + /// Determines if two values are the same. + public static bool operator ==(CommonApiVersionsMergeMode left, CommonApiVersionsMergeMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CommonApiVersionsMergeMode left, CommonApiVersionsMergeMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CommonApiVersionsMergeMode(string value) => new CommonApiVersionsMergeMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CommonApiVersionsMergeMode other && Equals(other); + /// + public bool Equals(CommonApiVersionsMergeMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CrossTenantTokenValidation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CrossTenantTokenValidation.cs new file mode 100644 index 000000000000..ed46afa6fccf --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CrossTenantTokenValidation.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The cross tenant token validation. + public readonly partial struct CrossTenantTokenValidation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CrossTenantTokenValidation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnsureSecureValidationValue = "EnsureSecureValidation"; + private const string PassthroughInsecureTokenValue = "PassthroughInsecureToken"; + + /// EnsureSecureValidation. + public static CrossTenantTokenValidation EnsureSecureValidation { get; } = new CrossTenantTokenValidation(EnsureSecureValidationValue); + /// PassthroughInsecureToken. + public static CrossTenantTokenValidation PassthroughInsecureToken { get; } = new CrossTenantTokenValidation(PassthroughInsecureTokenValue); + /// Determines if two values are the same. + public static bool operator ==(CrossTenantTokenValidation left, CrossTenantTokenValidation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CrossTenantTokenValidation left, CrossTenantTokenValidation right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CrossTenantTokenValidation(string value) => new CrossTenantTokenValidation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CrossTenantTokenValidation other && Equals(other); + /// + public bool Equals(CrossTenantTokenValidation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutAutoProvisionConfig.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutAutoProvisionConfig.Serialization.cs new file mode 100644 index 000000000000..126d1b8716fe --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutAutoProvisionConfig.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class CustomRolloutAutoProvisionConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomRolloutAutoProvisionConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsStorageEnabled)) + { + writer.WritePropertyName("storage"u8); + writer.WriteBooleanValue(IsStorageEnabled.Value); + } + if (Optional.IsDefined(IsResourceGraphEnabled)) + { + writer.WritePropertyName("resourceGraph"u8); + writer.WriteBooleanValue(IsResourceGraphEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomRolloutAutoProvisionConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomRolloutAutoProvisionConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomRolloutAutoProvisionConfig(document.RootElement, options); + } + + internal static CustomRolloutAutoProvisionConfig DeserializeCustomRolloutAutoProvisionConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? storage = default; + bool? resourceGraph = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storage = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceGraph"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGraph = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomRolloutAutoProvisionConfig(storage, resourceGraph, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(CustomRolloutAutoProvisionConfig)} does not support writing '{options.Format}' format."); + } + } + + CustomRolloutAutoProvisionConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomRolloutAutoProvisionConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomRolloutAutoProvisionConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutAutoProvisionConfig.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutAutoProvisionConfig.cs new file mode 100644 index 000000000000..f714d3141f4a --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutAutoProvisionConfig.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The auto provisioning configuration. + public partial class CustomRolloutAutoProvisionConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomRolloutAutoProvisionConfig() + { + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal CustomRolloutAutoProvisionConfig(bool? isStorageEnabled, bool? isResourceGraphEnabled, IDictionary serializedAdditionalRawData) + { + IsStorageEnabled = isStorageEnabled; + IsResourceGraphEnabled = isResourceGraphEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the is storage enabled. + public bool? IsStorageEnabled { get; set; } + /// Gets or sets the is resource graph enabled. + public bool? IsResourceGraphEnabled { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.Serialization.cs index 83046e30f883..eed620a73ce4 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CustomRolloutProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.cs index 8f41eb026227..6b100432fc82 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutProperties.cs @@ -46,7 +46,7 @@ public partial class CustomRolloutProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The specification. /// is null. public CustomRolloutProperties(CustomRolloutSpecification specification) { @@ -56,9 +56,9 @@ public CustomRolloutProperties(CustomRolloutSpecification specification) } /// Initializes a new instance of . - /// - /// - /// + /// The provisioned state of the resource. + /// The specification. + /// The status. /// Keeps track of any properties unknown to the library. internal CustomRolloutProperties(ProviderHubProvisioningState? provisioningState, CustomRolloutSpecification specification, CustomRolloutStatus status, IDictionary serializedAdditionalRawData) { @@ -72,12 +72,9 @@ internal CustomRolloutProperties(ProviderHubProvisioningState? provisioningState internal CustomRolloutProperties() { } - - /// Gets or sets the provisioning state. - public ProviderHubProvisioningState? ProvisioningState { get; set; } - /// Gets or sets the specification. + /// The specification. public CustomRolloutSpecification Specification { get; set; } - /// Gets or sets the status. + /// The status. public CustomRolloutStatus Status { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.Serialization.cs index 3136a52293c1..5250030da363 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.Serialization.cs @@ -34,8 +34,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CustomRolloutSpecification)} does not support writing '{format}' format."); } - writer.WritePropertyName("canary"u8); - writer.WriteObjectValue(Canary, options); + if (Optional.IsDefined(AutoProvisionConfig)) + { + writer.WritePropertyName("autoProvisionConfig"u8); + writer.WriteObjectValue(AutoProvisionConfig, options); + } + if (Optional.IsDefined(Canary)) + { + writer.WritePropertyName("canary"u8); + writer.WriteObjectValue(Canary, options); + } + if (Optional.IsCollectionDefined(ReleaseScopes)) + { + writer.WritePropertyName("releaseScopes"u8); + writer.WriteStartArray(); + foreach (var item in ReleaseScopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(RefreshSubscriptionRegistration)) + { + writer.WritePropertyName("refreshSubscriptionRegistration"u8); + writer.WriteBooleanValue(RefreshSubscriptionRegistration.Value); + } + if (Optional.IsDefined(SkipReleaseScopeValidation)) + { + writer.WritePropertyName("skipReleaseScopeValidation"u8); + writer.WriteBooleanValue(SkipReleaseScopeValidation.Value); + } if (Optional.IsDefined(ProviderRegistration)) { writer.WritePropertyName("providerRegistration"u8); @@ -88,18 +116,67 @@ internal static CustomRolloutSpecification DeserializeCustomRolloutSpecification { return null; } + CustomRolloutAutoProvisionConfig autoProvisionConfig = default; TrafficRegions canary = default; + IList releaseScopes = default; + bool? refreshSubscriptionRegistration = default; + bool? skipReleaseScopeValidation = default; ProviderRegistrationData providerRegistration = default; IList resourceTypeRegistrations = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("autoProvisionConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoProvisionConfig = CustomRolloutAutoProvisionConfig.DeserializeCustomRolloutAutoProvisionConfig(property.Value, options); + continue; + } if (property.NameEquals("canary"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } canary = TrafficRegions.DeserializeTrafficRegions(property.Value, options); continue; } + if (property.NameEquals("releaseScopes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + releaseScopes = array; + continue; + } + if (property.NameEquals("refreshSubscriptionRegistration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + refreshSubscriptionRegistration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("skipReleaseScopeValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + skipReleaseScopeValidation = property.Value.GetBoolean(); + continue; + } if (property.NameEquals("providerRegistration"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -129,7 +206,15 @@ internal static CustomRolloutSpecification DeserializeCustomRolloutSpecification } } serializedAdditionalRawData = rawDataDictionary; - return new CustomRolloutSpecification(canary, providerRegistration, resourceTypeRegistrations ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new CustomRolloutSpecification( + autoProvisionConfig, + canary, + releaseScopes ?? new ChangeTrackingList(), + refreshSubscriptionRegistration, + skipReleaseScopeValidation, + providerRegistration, + resourceTypeRegistrations ?? new ChangeTrackingList(), + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.cs index 28ad35e984ac..f7e70cf13a6d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutSpecification.cs @@ -47,35 +47,36 @@ public partial class CustomRolloutSpecification private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// is null. - public CustomRolloutSpecification(TrafficRegions canary) + public CustomRolloutSpecification() { - Argument.AssertNotNull(canary, nameof(canary)); - - Canary = canary; + ReleaseScopes = new ChangeTrackingList(); ResourceTypeRegistrations = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// + /// The auto provisioning configuration. + /// The canary region configuration. + /// The list of ARM regions scoped for the release. + /// Whether refreshing subscription registration is enabled or disabled. + /// Whether release scope validation should be skipped. + /// The provider registration. + /// The resource type registrations. /// Keeps track of any properties unknown to the library. - internal CustomRolloutSpecification(TrafficRegions canary, ProviderRegistrationData providerRegistration, IList resourceTypeRegistrations, IDictionary serializedAdditionalRawData) + internal CustomRolloutSpecification(CustomRolloutAutoProvisionConfig autoProvisionConfig, TrafficRegions canary, IList releaseScopes, bool? refreshSubscriptionRegistration, bool? skipReleaseScopeValidation, ProviderRegistrationData providerRegistration, IList resourceTypeRegistrations, IDictionary serializedAdditionalRawData) { + AutoProvisionConfig = autoProvisionConfig; Canary = canary; + ReleaseScopes = releaseScopes; + RefreshSubscriptionRegistration = refreshSubscriptionRegistration; + SkipReleaseScopeValidation = skipReleaseScopeValidation; ProviderRegistration = providerRegistration; ResourceTypeRegistrations = resourceTypeRegistrations; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomRolloutSpecification() - { - } - - /// Gets or sets the canary. + /// The auto provisioning configuration. + public CustomRolloutAutoProvisionConfig AutoProvisionConfig { get; set; } + /// The canary region configuration. internal TrafficRegions Canary { get; set; } /// Gets the canary regions. public IList CanaryRegions @@ -88,9 +89,15 @@ public IList CanaryRegions } } - /// Gets or sets the provider registration. + /// The list of ARM regions scoped for the release. + public IList ReleaseScopes { get; } + /// Whether refreshing subscription registration is enabled or disabled. + public bool? RefreshSubscriptionRegistration { get; set; } + /// Whether release scope validation should be skipped. + public bool? SkipReleaseScopeValidation { get; set; } + /// The provider registration. public ProviderRegistrationData ProviderRegistration { get; set; } - /// Gets the resource type registrations. + /// The resource type registrations. public IList ResourceTypeRegistrations { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.Serialization.cs index b43985f3f60b..095f2bf69efb 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.Serialization.cs @@ -55,6 +55,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } + if (Optional.IsDefined(ManifestCheckinStatus)) + { + writer.WritePropertyName("manifestCheckinStatus"u8); + writer.WriteObjectValue(ManifestCheckinStatus, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -94,6 +99,7 @@ internal static CustomRolloutStatus DeserializeCustomRolloutStatus(JsonElement e } IList completedRegions = default; IDictionary failedOrSkippedRegions = default; + CheckinManifestInfo manifestCheckinStatus = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,13 +132,22 @@ internal static CustomRolloutStatus DeserializeCustomRolloutStatus(JsonElement e failedOrSkippedRegions = dictionary; continue; } + if (property.NameEquals("manifestCheckinStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + manifestCheckinStatus = CheckinManifestInfo.DeserializeCheckinManifestInfo(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new CustomRolloutStatus(completedRegions ?? new ChangeTrackingList(), failedOrSkippedRegions ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new CustomRolloutStatus(completedRegions ?? new ChangeTrackingList(), failedOrSkippedRegions ?? new ChangeTrackingDictionary(), manifestCheckinStatus, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.cs index b9a14dfa4801..5cb3f1fec8be 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/CustomRolloutStatus.cs @@ -54,19 +54,23 @@ public CustomRolloutStatus() } /// Initializes a new instance of . - /// - /// Dictionary of <ExtendedErrorInfo>. + /// The completed regions. + /// The failed or skipped regions. + /// The manifest checkin status. /// Keeps track of any properties unknown to the library. - internal CustomRolloutStatus(IList completedRegions, IDictionary failedOrSkippedRegions, IDictionary serializedAdditionalRawData) + internal CustomRolloutStatus(IList completedRegions, IDictionary failedOrSkippedRegions, CheckinManifestInfo manifestCheckinStatus, IDictionary serializedAdditionalRawData) { CompletedRegions = completedRegions; FailedOrSkippedRegions = failedOrSkippedRegions; + ManifestCheckinStatus = manifestCheckinStatus; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the completed regions. + /// The completed regions. public IList CompletedRegions { get; } - /// Dictionary of <ExtendedErrorInfo>. + /// The failed or skipped regions. public IDictionary FailedOrSkippedRegions { get; } + /// The manifest checkin status. + public CheckinManifestInfo ManifestCheckinStatus { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutAutoProvisionConfig.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutAutoProvisionConfig.Serialization.cs new file mode 100644 index 000000000000..eec9c2d617fa --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutAutoProvisionConfig.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class DefaultRolloutAutoProvisionConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultRolloutAutoProvisionConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsStorageEnabled)) + { + writer.WritePropertyName("storage"u8); + writer.WriteBooleanValue(IsStorageEnabled.Value); + } + if (Optional.IsDefined(IsResourceGraphEnabled)) + { + writer.WritePropertyName("resourceGraph"u8); + writer.WriteBooleanValue(IsResourceGraphEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DefaultRolloutAutoProvisionConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultRolloutAutoProvisionConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefaultRolloutAutoProvisionConfig(document.RootElement, options); + } + + internal static DefaultRolloutAutoProvisionConfig DeserializeDefaultRolloutAutoProvisionConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? storage = default; + bool? resourceGraph = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storage = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceGraph"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGraph = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefaultRolloutAutoProvisionConfig(storage, resourceGraph, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(DefaultRolloutAutoProvisionConfig)} does not support writing '{options.Format}' format."); + } + } + + DefaultRolloutAutoProvisionConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDefaultRolloutAutoProvisionConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefaultRolloutAutoProvisionConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutAutoProvisionConfig.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutAutoProvisionConfig.cs new file mode 100644 index 000000000000..f04cf23b1042 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutAutoProvisionConfig.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The auto provisioning config. + public partial class DefaultRolloutAutoProvisionConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DefaultRolloutAutoProvisionConfig() + { + } + + /// Initializes a new instance of . + /// Whether auto provisioning for storage is enabled. + /// Whether auto provisioning for resource graph is enabled. + /// Keeps track of any properties unknown to the library. + internal DefaultRolloutAutoProvisionConfig(bool? isStorageEnabled, bool? isResourceGraphEnabled, IDictionary serializedAdditionalRawData) + { + IsStorageEnabled = isStorageEnabled; + IsResourceGraphEnabled = isResourceGraphEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether auto provisioning for storage is enabled. + public bool? IsStorageEnabled { get; set; } + /// Whether auto provisioning for resource graph is enabled. + public bool? IsResourceGraphEnabled { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.Serialization.cs index 01c2c22832c1..c7a38dae0bf7 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DefaultRolloutProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.cs index 3e7a5161aa28..7f58aac3a416 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutProperties.cs @@ -51,9 +51,9 @@ public DefaultRolloutProperties() } /// Initializes a new instance of . - /// - /// - /// + /// The provisioned state of the resource. + /// The default rollout specification. + /// The default rollout status. /// Keeps track of any properties unknown to the library. internal DefaultRolloutProperties(ProviderHubProvisioningState? provisioningState, DefaultRolloutSpecification specification, DefaultRolloutStatus status, IDictionary serializedAdditionalRawData) { @@ -62,12 +62,9 @@ internal DefaultRolloutProperties(ProviderHubProvisioningState? provisioningStat Status = status; _serializedAdditionalRawData = serializedAdditionalRawData; } - - /// Gets or sets the provisioning state. - public ProviderHubProvisioningState? ProvisioningState { get; set; } - /// Gets or sets the specification. + /// The default rollout specification. public DefaultRolloutSpecification Specification { get; set; } - /// Gets or sets the status. + /// The default rollout status. public DefaultRolloutStatus Status { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.Serialization.cs index 9117d2cb4bc8..93769a4e4260 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.Serialization.cs @@ -34,6 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DefaultRolloutSpecification)} does not support writing '{format}' format."); } + if (Optional.IsDefined(ExpeditedRollout)) + { + writer.WritePropertyName("expeditedRollout"u8); + writer.WriteObjectValue(ExpeditedRollout, options); + } if (Optional.IsDefined(Canary)) { writer.WritePropertyName("canary"u8); @@ -79,6 +84,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(AutoProvisionConfig)) + { + writer.WritePropertyName("autoProvisionConfig"u8); + writer.WriteObjectValue(AutoProvisionConfig, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -116,6 +126,7 @@ internal static DefaultRolloutSpecification DeserializeDefaultRolloutSpecificati { return null; } + DefaultRolloutSpecificationExpeditedRollout expeditedRollout = default; CanaryTrafficRegionRolloutConfiguration canary = default; TrafficRegionRolloutConfiguration lowTraffic = default; TrafficRegionRolloutConfiguration mediumTraffic = default; @@ -124,10 +135,20 @@ internal static DefaultRolloutSpecification DeserializeDefaultRolloutSpecificati TrafficRegionRolloutConfiguration restOfTheWorldGroupTwo = default; ProviderRegistrationData providerRegistration = default; IList resourceTypeRegistrations = default; + DefaultRolloutAutoProvisionConfig autoProvisionConfig = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("expeditedRollout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expeditedRollout = DefaultRolloutSpecificationExpeditedRollout.DeserializeDefaultRolloutSpecificationExpeditedRollout(property.Value, options); + continue; + } if (property.NameEquals("canary"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -205,6 +226,15 @@ internal static DefaultRolloutSpecification DeserializeDefaultRolloutSpecificati resourceTypeRegistrations = array; continue; } + if (property.NameEquals("autoProvisionConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoProvisionConfig = DefaultRolloutAutoProvisionConfig.DeserializeDefaultRolloutAutoProvisionConfig(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -212,6 +242,7 @@ internal static DefaultRolloutSpecification DeserializeDefaultRolloutSpecificati } serializedAdditionalRawData = rawDataDictionary; return new DefaultRolloutSpecification( + expeditedRollout, canary, lowTraffic, mediumTraffic, @@ -220,6 +251,7 @@ internal static DefaultRolloutSpecification DeserializeDefaultRolloutSpecificati restOfTheWorldGroupTwo, providerRegistration, resourceTypeRegistrations ?? new ChangeTrackingList(), + autoProvisionConfig, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.cs index f6a92e459092..da1ebefef0f5 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecification.cs @@ -52,17 +52,20 @@ public DefaultRolloutSpecification() } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// + /// The expedited rollout definition. + /// The canary traffic region configuration. + /// The low traffic region configuration. + /// The medium traffic region configuration. + /// The high traffic region configuration. + /// The rest of the world group one region configuration. + /// The rest of the world group two region configuration. + /// The provider registration. + /// The resource type registrations. + /// The auto provisioning config. /// Keeps track of any properties unknown to the library. - internal DefaultRolloutSpecification(CanaryTrafficRegionRolloutConfiguration canary, TrafficRegionRolloutConfiguration lowTraffic, TrafficRegionRolloutConfiguration mediumTraffic, TrafficRegionRolloutConfiguration highTraffic, TrafficRegionRolloutConfiguration restOfTheWorldGroupOne, TrafficRegionRolloutConfiguration restOfTheWorldGroupTwo, ProviderRegistrationData providerRegistration, IList resourceTypeRegistrations, IDictionary serializedAdditionalRawData) + internal DefaultRolloutSpecification(DefaultRolloutSpecificationExpeditedRollout expeditedRollout, CanaryTrafficRegionRolloutConfiguration canary, TrafficRegionRolloutConfiguration lowTraffic, TrafficRegionRolloutConfiguration mediumTraffic, TrafficRegionRolloutConfiguration highTraffic, TrafficRegionRolloutConfiguration restOfTheWorldGroupOne, TrafficRegionRolloutConfiguration restOfTheWorldGroupTwo, ProviderRegistrationData providerRegistration, IList resourceTypeRegistrations, DefaultRolloutAutoProvisionConfig autoProvisionConfig, IDictionary serializedAdditionalRawData) { + ExpeditedRollout = expeditedRollout; Canary = canary; LowTraffic = lowTraffic; MediumTraffic = mediumTraffic; @@ -71,24 +74,41 @@ internal DefaultRolloutSpecification(CanaryTrafficRegionRolloutConfiguration can RestOfTheWorldGroupTwo = restOfTheWorldGroupTwo; ProviderRegistration = providerRegistration; ResourceTypeRegistrations = resourceTypeRegistrations; + AutoProvisionConfig = autoProvisionConfig; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the canary. + /// The expedited rollout definition. + internal DefaultRolloutSpecificationExpeditedRollout ExpeditedRollout { get; set; } + /// Indicates whether expedited rollout is enabled/disabled. + public bool? IsExpeditedRolloutEnabled + { + get => ExpeditedRollout is null ? default : ExpeditedRollout.IsExpeditedRolloutEnabled; + set + { + if (ExpeditedRollout is null) + ExpeditedRollout = new DefaultRolloutSpecificationExpeditedRollout(); + ExpeditedRollout.IsExpeditedRolloutEnabled = value; + } + } + + /// The canary traffic region configuration. public CanaryTrafficRegionRolloutConfiguration Canary { get; set; } - /// Gets or sets the low traffic. + /// The low traffic region configuration. public TrafficRegionRolloutConfiguration LowTraffic { get; set; } - /// Gets or sets the medium traffic. + /// The medium traffic region configuration. public TrafficRegionRolloutConfiguration MediumTraffic { get; set; } - /// Gets or sets the high traffic. + /// The high traffic region configuration. public TrafficRegionRolloutConfiguration HighTraffic { get; set; } - /// Gets or sets the rest of the world group one. + /// The rest of the world group one region configuration. public TrafficRegionRolloutConfiguration RestOfTheWorldGroupOne { get; set; } - /// Gets or sets the rest of the world group two. + /// The rest of the world group two region configuration. public TrafficRegionRolloutConfiguration RestOfTheWorldGroupTwo { get; set; } - /// Gets or sets the provider registration. + /// The provider registration. public ProviderRegistrationData ProviderRegistration { get; set; } - /// Gets the resource type registrations. + /// The resource type registrations. public IList ResourceTypeRegistrations { get; } + /// The auto provisioning config. + public DefaultRolloutAutoProvisionConfig AutoProvisionConfig { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecificationExpeditedRollout.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecificationExpeditedRollout.Serialization.cs new file mode 100644 index 000000000000..cc4cc033cadb --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecificationExpeditedRollout.Serialization.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class DefaultRolloutSpecificationExpeditedRollout : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultRolloutSpecificationExpeditedRollout)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DefaultRolloutSpecificationExpeditedRollout IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultRolloutSpecificationExpeditedRollout)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefaultRolloutSpecificationExpeditedRollout(document.RootElement, options); + } + + internal static DefaultRolloutSpecificationExpeditedRollout DeserializeDefaultRolloutSpecificationExpeditedRollout(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefaultRolloutSpecificationExpeditedRollout(enabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(DefaultRolloutSpecificationExpeditedRollout)} does not support writing '{options.Format}' format."); + } + } + + DefaultRolloutSpecificationExpeditedRollout IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDefaultRolloutSpecificationExpeditedRollout(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefaultRolloutSpecificationExpeditedRollout)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecificationExpeditedRollout.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecificationExpeditedRollout.cs new file mode 100644 index 000000000000..c514c068ec7b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutSpecificationExpeditedRollout.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The expedited rollout definition. + internal partial class DefaultRolloutSpecificationExpeditedRollout : ExpeditedRolloutDefinition + { + /// Initializes a new instance of . + public DefaultRolloutSpecificationExpeditedRollout() + { + } + + /// Initializes a new instance of . + /// Indicates whether expedited rollout is enabled/disabled. + /// Keeps track of any properties unknown to the library. + internal DefaultRolloutSpecificationExpeditedRollout(bool? isExpeditedRolloutEnabled, IDictionary serializedAdditionalRawData) : base(isExpeditedRolloutEnabled, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.Serialization.cs index 1487da337dc0..2401702f8a96 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.Serialization.cs @@ -50,6 +50,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("subscriptionReregistrationResult"u8); writer.WriteStringValue(SubscriptionReregistrationResult.Value.ToString()); } + if (Optional.IsDefined(ManifestCheckinStatus)) + { + writer.WritePropertyName("manifestCheckinStatus"u8); + writer.WriteObjectValue(ManifestCheckinStatus, options); + } } DefaultRolloutStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -75,6 +80,7 @@ internal static DefaultRolloutStatus DeserializeDefaultRolloutStatus(JsonElement TrafficRegionCategory? nextTrafficRegion = default; DateTimeOffset? nextTrafficRegionScheduledTime = default; SubscriptionReregistrationResult? subscriptionReregistrationResult = default; + CheckinManifestInfo manifestCheckinStatus = default; IList completedRegions = default; IDictionary failedOrSkippedRegions = default; IDictionary serializedAdditionalRawData = default; @@ -108,6 +114,15 @@ internal static DefaultRolloutStatus DeserializeDefaultRolloutStatus(JsonElement subscriptionReregistrationResult = new SubscriptionReregistrationResult(property.Value.GetString()); continue; } + if (property.NameEquals("manifestCheckinStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + manifestCheckinStatus = CheckinManifestInfo.DeserializeCheckinManifestInfo(property.Value, options); + continue; + } if (property.NameEquals("completedRegions"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -148,7 +163,8 @@ internal static DefaultRolloutStatus DeserializeDefaultRolloutStatus(JsonElement serializedAdditionalRawData, nextTrafficRegion, nextTrafficRegionScheduledTime, - subscriptionReregistrationResult); + subscriptionReregistrationResult, + manifestCheckinStatus); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.cs index 162007a0743e..447c475d0b71 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/DefaultRolloutStatus.cs @@ -20,24 +20,28 @@ public DefaultRolloutStatus() } /// Initializes a new instance of . - /// - /// Dictionary of <ExtendedErrorInfo>. + /// The completed regions. + /// The failed or skipped regions. /// Keeps track of any properties unknown to the library. - /// - /// - /// - internal DefaultRolloutStatus(IList completedRegions, IDictionary failedOrSkippedRegions, IDictionary serializedAdditionalRawData, TrafficRegionCategory? nextTrafficRegion, DateTimeOffset? nextTrafficRegionScheduledOn, SubscriptionReregistrationResult? subscriptionReregistrationResult) : base(completedRegions, failedOrSkippedRegions, serializedAdditionalRawData) + /// The next traffic region. + /// The next traffic region scheduled time. + /// The subscription reregistration result. + /// The manifest checkin status. + internal DefaultRolloutStatus(IList completedRegions, IDictionary failedOrSkippedRegions, IDictionary serializedAdditionalRawData, TrafficRegionCategory? nextTrafficRegion, DateTimeOffset? nextTrafficRegionScheduledOn, SubscriptionReregistrationResult? subscriptionReregistrationResult, CheckinManifestInfo manifestCheckinStatus) : base(completedRegions, failedOrSkippedRegions, serializedAdditionalRawData) { NextTrafficRegion = nextTrafficRegion; NextTrafficRegionScheduledOn = nextTrafficRegionScheduledOn; SubscriptionReregistrationResult = subscriptionReregistrationResult; + ManifestCheckinStatus = manifestCheckinStatus; } - /// Gets or sets the next traffic region. + /// The next traffic region. public TrafficRegionCategory? NextTrafficRegion { get; set; } - /// Gets or sets the next traffic region scheduled on. + /// The next traffic region scheduled time. public DateTimeOffset? NextTrafficRegionScheduledOn { get; set; } - /// Gets or sets the subscription reregistration result. + /// The subscription reregistration result. public SubscriptionReregistrationResult? SubscriptionReregistrationResult { get; set; } + /// The manifest checkin status. + public CheckinManifestInfo ManifestCheckinStatus { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutDefinition.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutDefinition.Serialization.cs new file mode 100644 index 000000000000..2983c60b56dd --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutDefinition.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ExpeditedRolloutDefinition : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpeditedRolloutDefinition)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsExpeditedRolloutEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsExpeditedRolloutEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExpeditedRolloutDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpeditedRolloutDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExpeditedRolloutDefinition(document.RootElement, options); + } + + internal static ExpeditedRolloutDefinition DeserializeExpeditedRolloutDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExpeditedRolloutDefinition(enabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ExpeditedRolloutDefinition)} does not support writing '{options.Format}' format."); + } + } + + ExpeditedRolloutDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExpeditedRolloutDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExpeditedRolloutDefinition)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutDefinition.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutDefinition.cs new file mode 100644 index 000000000000..50f838b23b3f --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutDefinition.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ExpeditedRolloutDefinition. + internal partial class ExpeditedRolloutDefinition + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExpeditedRolloutDefinition() + { + } + + /// Initializes a new instance of . + /// Indicates whether expedited rollout is enabled/disabled. + /// Keeps track of any properties unknown to the library. + internal ExpeditedRolloutDefinition(bool? isExpeditedRolloutEnabled, IDictionary serializedAdditionalRawData) + { + IsExpeditedRolloutEnabled = isExpeditedRolloutEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether expedited rollout is enabled/disabled. + public bool? IsExpeditedRolloutEnabled { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutIntent.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutIntent.cs new file mode 100644 index 000000000000..571e52141edb --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutIntent.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Expedited rollout intent. + public readonly partial struct ExpeditedRolloutIntent : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExpeditedRolloutIntent(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string HotfixValue = "Hotfix"; + + /// NotSpecified. + public static ExpeditedRolloutIntent NotSpecified { get; } = new ExpeditedRolloutIntent(NotSpecifiedValue); + /// Hotfix. + public static ExpeditedRolloutIntent Hotfix { get; } = new ExpeditedRolloutIntent(HotfixValue); + /// Determines if two values are the same. + public static bool operator ==(ExpeditedRolloutIntent left, ExpeditedRolloutIntent right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExpeditedRolloutIntent left, ExpeditedRolloutIntent right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExpeditedRolloutIntent(string value) => new ExpeditedRolloutIntent(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExpeditedRolloutIntent other && Equals(other); + /// + public bool Equals(ExpeditedRolloutIntent other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutMetadata.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutMetadata.Serialization.cs new file mode 100644 index 000000000000..971b516a0d5d --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutMetadata.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ExpeditedRolloutMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpeditedRolloutMetadata)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(ExpeditedRolloutIntent)) + { + writer.WritePropertyName("expeditedRolloutIntent"u8); + writer.WriteStringValue(ExpeditedRolloutIntent.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExpeditedRolloutMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpeditedRolloutMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExpeditedRolloutMetadata(document.RootElement, options); + } + + internal static ExpeditedRolloutMetadata DeserializeExpeditedRolloutMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + ExpeditedRolloutIntent? expeditedRolloutIntent = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("expeditedRolloutIntent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expeditedRolloutIntent = new ExpeditedRolloutIntent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExpeditedRolloutMetadata(enabled, expeditedRolloutIntent, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ExpeditedRolloutMetadata)} does not support writing '{options.Format}' format."); + } + } + + ExpeditedRolloutMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExpeditedRolloutMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExpeditedRolloutMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutMetadata.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutMetadata.cs new file mode 100644 index 000000000000..99264cac8fe2 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExpeditedRolloutMetadata.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Metadata for expedited rollout. + public partial class ExpeditedRolloutMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExpeditedRolloutMetadata() + { + } + + /// Initializes a new instance of . + /// Expedited rollout enabled?. + /// Expedited rollout intent. + /// Keeps track of any properties unknown to the library. + internal ExpeditedRolloutMetadata(bool? isEnabled, ExpeditedRolloutIntent? expeditedRolloutIntent, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + ExpeditedRolloutIntent = expeditedRolloutIntent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Expedited rollout enabled?. + public bool? IsEnabled { get; set; } + /// Expedited rollout intent. + public ExpeditedRolloutIntent? ExpeditedRolloutIntent { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtendedErrorInfo.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtendedErrorInfo.cs index 6a89991dde74..a6fe774a1baa 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtendedErrorInfo.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtendedErrorInfo.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ExtendedErrorInfo. + /// Error information. public partial class ExtendedErrorInfo { /// @@ -53,11 +53,11 @@ public ExtendedErrorInfo() } /// Initializes a new instance of . - /// - /// - /// - /// - /// + /// The error code. + /// The target of the error. + /// The error message. + /// The error details. + /// The additional error information. /// Keeps track of any properties unknown to the library. internal ExtendedErrorInfo(string code, string target, string message, IList details, IList additionalInfo, IDictionary serializedAdditionalRawData) { @@ -69,15 +69,15 @@ internal ExtendedErrorInfo(string code, string target, string message, IList Gets or sets the code. + /// The error code. public string Code { get; set; } - /// Gets or sets the target. + /// The target of the error. public string Target { get; set; } - /// Gets or sets the message. + /// The error message. public string Message { get; set; } - /// Gets the details. + /// The error details. public IList Details { get; } - /// Gets the additional info. + /// The additional error information. public IList AdditionalInfo { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtensionOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtensionOptions.cs index 0b74cbcb3006..59223fdeb132 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtensionOptions.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ExtensionOptions.cs @@ -53,8 +53,8 @@ public ExtensionOptions() } /// Initializes a new instance of . - /// - /// + /// The request. + /// The response. /// Keeps track of any properties unknown to the library. internal ExtensionOptions(IList request, IList response, IDictionary serializedAdditionalRawData) { @@ -63,9 +63,9 @@ internal ExtensionOptions(IList request, IList Gets the request. + /// The request. public IList Request { get; } - /// Gets the response. + /// The response. public IList Response { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FanoutLinkedNotificationRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FanoutLinkedNotificationRule.Serialization.cs new file mode 100644 index 000000000000..67a569a99c24 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FanoutLinkedNotificationRule.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class FanoutLinkedNotificationRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FanoutLinkedNotificationRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TokenAuthConfiguration)) + { + writer.WritePropertyName("tokenAuthConfiguration"u8); + writer.WriteObjectValue(TokenAuthConfiguration, options); + } + if (Optional.IsCollectionDefined(Actions)) + { + writer.WritePropertyName("actions"u8); + writer.WriteStartArray(); + foreach (var item in Actions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Endpoints)) + { + writer.WritePropertyName("endpoints"u8); + writer.WriteStartArray(); + foreach (var item in Endpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DstsConfiguration)) + { + writer.WritePropertyName("dstsConfiguration"u8); + writer.WriteObjectValue(DstsConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FanoutLinkedNotificationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FanoutLinkedNotificationRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFanoutLinkedNotificationRule(document.RootElement, options); + } + + internal static FanoutLinkedNotificationRule DeserializeFanoutLinkedNotificationRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TokenAuthConfiguration tokenAuthConfiguration = default; + IList actions = default; + IList endpoints = default; + ProviderDstsConfiguration dstsConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tokenAuthConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenAuthConfiguration = TokenAuthConfiguration.DeserializeTokenAuthConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("actions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + actions = array; + continue; + } + if (property.NameEquals("endpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderEndpoint.DeserializeResourceProviderEndpoint(item, options)); + } + endpoints = array; + continue; + } + if (property.NameEquals("dstsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dstsConfiguration = ProviderDstsConfiguration.DeserializeProviderDstsConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FanoutLinkedNotificationRule(tokenAuthConfiguration, actions ?? new ChangeTrackingList(), endpoints ?? new ChangeTrackingList(), dstsConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(FanoutLinkedNotificationRule)} does not support writing '{options.Format}' format."); + } + } + + FanoutLinkedNotificationRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFanoutLinkedNotificationRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FanoutLinkedNotificationRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FanoutLinkedNotificationRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FanoutLinkedNotificationRule.cs new file mode 100644 index 000000000000..66b3827d7537 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FanoutLinkedNotificationRule.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The FanoutLinkedNotificationRule. + public partial class FanoutLinkedNotificationRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FanoutLinkedNotificationRule() + { + Actions = new ChangeTrackingList(); + Endpoints = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The token auth configuration. + /// The actions. + /// The endpoints. + /// The dsts configuration. + /// Keeps track of any properties unknown to the library. + internal FanoutLinkedNotificationRule(TokenAuthConfiguration tokenAuthConfiguration, IList actions, IList endpoints, ProviderDstsConfiguration dstsConfiguration, IDictionary serializedAdditionalRawData) + { + TokenAuthConfiguration = tokenAuthConfiguration; + Actions = actions; + Endpoints = endpoints; + DstsConfiguration = dstsConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The token auth configuration. + public TokenAuthConfiguration TokenAuthConfiguration { get; set; } + /// The actions. + public IList Actions { get; } + /// The endpoints. + public IList Endpoints { get; } + /// The dsts configuration. + public ProviderDstsConfiguration DstsConfiguration { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesPolicy.cs index 3659dd3d457d..13e25a15bc65 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesPolicy.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The FeaturesPolicy. + /// The required feature policy. public readonly partial struct FeaturesPolicy : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FrontdoorRequestMode.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FrontdoorRequestMode.cs new file mode 100644 index 000000000000..8c187109233d --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FrontdoorRequestMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The frontdoor request mode. + public readonly partial struct FrontdoorRequestMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FrontdoorRequestMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string UseManifestValue = "UseManifest"; + + /// NotSpecified. + public static FrontdoorRequestMode NotSpecified { get; } = new FrontdoorRequestMode(NotSpecifiedValue); + /// UseManifest. + public static FrontdoorRequestMode UseManifest { get; } = new FrontdoorRequestMode(UseManifestValue); + /// Determines if two values are the same. + public static bool operator ==(FrontdoorRequestMode left, FrontdoorRequestMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FrontdoorRequestMode left, FrontdoorRequestMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FrontdoorRequestMode(string value) => new FrontdoorRequestMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FrontdoorRequestMode other && Equals(other); + /// + public bool Equals(FrontdoorRequestMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagement.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagement.cs index 5c6d19ecbb8f..928db39b6bf9 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagement.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagement.cs @@ -51,7 +51,7 @@ internal IdentityManagement() } /// Initializes a new instance of . - /// + /// The type. /// Keeps track of any properties unknown to the library. internal IdentityManagement(IdentityManagementType? managementType, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal IdentityManagement(IdentityManagementType? managementType, IDictionary< _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the management type. + /// The type. public IdentityManagementType? ManagementType { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.Serialization.cs index 70a69084cf52..613931dca1ba 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.Serialization.cs @@ -44,6 +44,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("applicationId"u8); writer.WriteStringValue(ApplicationId); } + if (Optional.IsCollectionDefined(ApplicationIds)) + { + writer.WritePropertyName("applicationIds"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DelegationAppIds)) + { + writer.WritePropertyName("delegationAppIds"u8); + writer.WriteStartArray(); + foreach (var item in DelegationAppIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,6 +103,8 @@ internal static IdentityManagementProperties DeserializeIdentityManagementProper } IdentityManagementType? type = default; string applicationId = default; + IList applicationIds = default; + IList delegationAppIds = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -101,13 +123,41 @@ internal static IdentityManagementProperties DeserializeIdentityManagementProper applicationId = property.Value.GetString(); continue; } + if (property.NameEquals("applicationIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + applicationIds = array; + continue; + } + if (property.NameEquals("delegationAppIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + delegationAppIds = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new IdentityManagementProperties(type, applicationId, serializedAdditionalRawData); + return new IdentityManagementProperties(type, applicationId, applicationIds ?? new ChangeTrackingList(), delegationAppIds ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.cs index 9106b881ac02..217928b32b5c 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementProperties.cs @@ -48,22 +48,32 @@ public partial class IdentityManagementProperties /// Initializes a new instance of . public IdentityManagementProperties() { + ApplicationIds = new ChangeTrackingList(); + DelegationAppIds = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// + /// The type. + /// The application id. + /// The application ids. + /// The delegation app ids. /// Keeps track of any properties unknown to the library. - internal IdentityManagementProperties(IdentityManagementType? managementType, string applicationId, IDictionary serializedAdditionalRawData) + internal IdentityManagementProperties(IdentityManagementType? managementType, string applicationId, IList applicationIds, IList delegationAppIds, IDictionary serializedAdditionalRawData) { ManagementType = managementType; ApplicationId = applicationId; + ApplicationIds = applicationIds; + DelegationAppIds = delegationAppIds; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the management type. + /// The type. public IdentityManagementType? ManagementType { get; set; } - /// Gets or sets the application id. + /// The application id. public string ApplicationId { get; set; } + /// The application ids. + public IList ApplicationIds { get; } + /// The delegation app ids. + public IList DelegationAppIds { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementType.cs index ea6ebb6eb6fc..2ed2e2366c6f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/IdentityManagementType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The IdentityManagementType. + /// The type. public readonly partial struct IdentityManagementType : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LegacyDisallowedCondition.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LegacyDisallowedCondition.Serialization.cs new file mode 100644 index 000000000000..1c6fd61696fb --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LegacyDisallowedCondition.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class LegacyDisallowedCondition : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LegacyDisallowedCondition)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(DisallowedLegacyOperations)) + { + writer.WritePropertyName("disallowedLegacyOperations"u8); + writer.WriteStartArray(); + foreach (var item in DisallowedLegacyOperations) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Feature)) + { + writer.WritePropertyName("feature"u8); + writer.WriteStringValue(Feature); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LegacyDisallowedCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LegacyDisallowedCondition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLegacyDisallowedCondition(document.RootElement, options); + } + + internal static LegacyDisallowedCondition DeserializeLegacyDisallowedCondition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList disallowedLegacyOperations = default; + string feature = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disallowedLegacyOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ProviderLegacyOperation(item.GetString())); + } + disallowedLegacyOperations = array; + continue; + } + if (property.NameEquals("feature"u8)) + { + feature = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LegacyDisallowedCondition(disallowedLegacyOperations ?? new ChangeTrackingList(), feature, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(LegacyDisallowedCondition)} does not support writing '{options.Format}' format."); + } + } + + LegacyDisallowedCondition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLegacyDisallowedCondition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LegacyDisallowedCondition)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LegacyDisallowedCondition.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LegacyDisallowedCondition.cs new file mode 100644 index 000000000000..b6bd33de3152 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LegacyDisallowedCondition.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The LegacyDisallowedCondition. + public partial class LegacyDisallowedCondition + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LegacyDisallowedCondition() + { + DisallowedLegacyOperations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The disallowed legacy operations. + /// Feature string. + /// Keeps track of any properties unknown to the library. + internal LegacyDisallowedCondition(IList disallowedLegacyOperations, string feature, IDictionary serializedAdditionalRawData) + { + DisallowedLegacyOperations = disallowedLegacyOperations; + Feature = feature; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The disallowed legacy operations. + public IList DisallowedLegacyOperations { get; } + /// Feature string. + public string Feature { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LightHouseAuthorization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LightHouseAuthorization.cs index eb6650f5aaac..d4b892924382 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LightHouseAuthorization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LightHouseAuthorization.cs @@ -46,8 +46,8 @@ public partial class LightHouseAuthorization private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// + /// The principal id. + /// The role definition id. /// or is null. public LightHouseAuthorization(string principalId, string roleDefinitionId) { @@ -59,8 +59,8 @@ public LightHouseAuthorization(string principalId, string roleDefinitionId) } /// Initializes a new instance of . - /// - /// + /// The principal id. + /// The role definition id. /// Keeps track of any properties unknown to the library. internal LightHouseAuthorization(string principalId, string roleDefinitionId, IDictionary serializedAdditionalRawData) { @@ -74,9 +74,9 @@ internal LightHouseAuthorization() { } - /// Gets or sets the principal id. + /// The principal id. public string PrincipalId { get; set; } - /// Gets or sets the role definition id. + /// The role definition id. public string RoleDefinitionId { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAccessCheck.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAccessCheck.cs index 1e7d9bf26b86..15a75f1372cd 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAccessCheck.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAccessCheck.cs @@ -51,11 +51,11 @@ public LinkedAccessCheck() } /// Initializes a new instance of . - /// - /// - /// - /// - /// + /// The action name. + /// The linked property. + /// The linked action. + /// The linked action verb. + /// The linked type. /// Keeps track of any properties unknown to the library. internal LinkedAccessCheck(string actionName, string linkedProperty, string linkedAction, string linkedActionVerb, string linkedType, IDictionary serializedAdditionalRawData) { @@ -67,15 +67,15 @@ internal LinkedAccessCheck(string actionName, string linkedProperty, string link _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the action name. + /// The action name. public string ActionName { get; set; } - /// Gets or sets the linked property. + /// The linked property. public string LinkedProperty { get; set; } - /// Gets or sets the linked action. + /// The linked action. public string LinkedAction { get; set; } - /// Gets or sets the linked action verb. + /// The linked action verb. public string LinkedActionVerb { get; set; } - /// Gets or sets the linked type. + /// The linked type. public string LinkedType { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAction.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAction.cs index 8d8fbee2f14a..6aa6efc14b6b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAction.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedAction.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The LinkedAction. + /// The linked action. public readonly partial struct LinkedAction : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedNotificationRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedNotificationRule.Serialization.cs new file mode 100644 index 000000000000..38bf713529c0 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedNotificationRule.Serialization.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class LinkedNotificationRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinkedNotificationRule)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Actions)) + { + writer.WritePropertyName("actions"u8); + writer.WriteStartArray(); + foreach (var item in Actions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ActionsOnFailedOperation)) + { + writer.WritePropertyName("actionsOnFailedOperation"u8); + writer.WriteStartArray(); + foreach (var item in ActionsOnFailedOperation) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(FastPathActions)) + { + writer.WritePropertyName("fastPathActions"u8); + writer.WriteStartArray(); + foreach (var item in FastPathActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(FastPathActionsOnFailedOperation)) + { + writer.WritePropertyName("fastPathActionsOnFailedOperation"u8); + writer.WriteStartArray(); + foreach (var item in FastPathActionsOnFailedOperation) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LinkedNotificationTimeout)) + { + writer.WritePropertyName("linkedNotificationTimeout"u8); + writer.WriteStringValue(LinkedNotificationTimeout.Value, "P"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LinkedNotificationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinkedNotificationRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLinkedNotificationRule(document.RootElement, options); + } + + internal static LinkedNotificationRule DeserializeLinkedNotificationRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList actions = default; + IList actionsOnFailedOperation = default; + IList fastPathActions = default; + IList fastPathActionsOnFailedOperation = default; + TimeSpan? linkedNotificationTimeout = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + actions = array; + continue; + } + if (property.NameEquals("actionsOnFailedOperation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + actionsOnFailedOperation = array; + continue; + } + if (property.NameEquals("fastPathActions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + fastPathActions = array; + continue; + } + if (property.NameEquals("fastPathActionsOnFailedOperation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + fastPathActionsOnFailedOperation = array; + continue; + } + if (property.NameEquals("linkedNotificationTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkedNotificationTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LinkedNotificationRule( + actions ?? new ChangeTrackingList(), + actionsOnFailedOperation ?? new ChangeTrackingList(), + fastPathActions ?? new ChangeTrackingList(), + fastPathActionsOnFailedOperation ?? new ChangeTrackingList(), + linkedNotificationTimeout, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(LinkedNotificationRule)} does not support writing '{options.Format}' format."); + } + } + + LinkedNotificationRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLinkedNotificationRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LinkedNotificationRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedNotificationRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedNotificationRule.cs new file mode 100644 index 000000000000..9bbd69174402 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedNotificationRule.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The LinkedNotificationRule. + public partial class LinkedNotificationRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LinkedNotificationRule() + { + Actions = new ChangeTrackingList(); + ActionsOnFailedOperation = new ChangeTrackingList(); + FastPathActions = new ChangeTrackingList(); + FastPathActionsOnFailedOperation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The actions. + /// The actions on failed operation. + /// The fast path actions. + /// The fast path action on failed operation. + /// This is a TimeSpan property. + /// Keeps track of any properties unknown to the library. + internal LinkedNotificationRule(IList actions, IList actionsOnFailedOperation, IList fastPathActions, IList fastPathActionsOnFailedOperation, TimeSpan? linkedNotificationTimeout, IDictionary serializedAdditionalRawData) + { + Actions = actions; + ActionsOnFailedOperation = actionsOnFailedOperation; + FastPathActions = fastPathActions; + FastPathActionsOnFailedOperation = fastPathActionsOnFailedOperation; + LinkedNotificationTimeout = linkedNotificationTimeout; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The actions. + public IList Actions { get; } + /// The actions on failed operation. + public IList ActionsOnFailedOperation { get; } + /// The fast path actions. + public IList FastPathActions { get; } + /// The fast path action on failed operation. + public IList FastPathActionsOnFailedOperation { get; } + /// This is a TimeSpan property. + public TimeSpan? LinkedNotificationTimeout { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperation.cs index f0e1a80b49a3..6634e64dcf82 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperation.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperation.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The LinkedOperation. + /// The linked operation. public readonly partial struct LinkedOperation : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.Serialization.cs index 2c97c5a7147c..baf351841326 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.Serialization.cs @@ -38,6 +38,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(LinkedOperation.ToString()); writer.WritePropertyName("linkedAction"u8); writer.WriteStringValue(LinkedAction.ToString()); + if (Optional.IsCollectionDefined(DependsOnTypes)) + { + writer.WritePropertyName("dependsOnTypes"u8); + writer.WriteStartArray(); + foreach (var item in DependsOnTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +87,7 @@ internal static LinkedOperationRule DeserializeLinkedOperationRule(JsonElement e } LinkedOperation linkedOperation = default; LinkedAction linkedAction = default; + IList dependsOnTypes = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +102,27 @@ internal static LinkedOperationRule DeserializeLinkedOperationRule(JsonElement e linkedAction = new LinkedAction(property.Value.GetString()); continue; } + if (property.NameEquals("dependsOnTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dependsOnTypes = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new LinkedOperationRule(linkedOperation, linkedAction, serializedAdditionalRawData); + return new LinkedOperationRule(linkedOperation, linkedAction, dependsOnTypes ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.cs index 8102305cfef6..8cc985167d29 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LinkedOperationRule.cs @@ -46,22 +46,25 @@ public partial class LinkedOperationRule private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// - internal LinkedOperationRule(LinkedOperation linkedOperation, LinkedAction linkedAction) + /// The linked operation. + /// The linked action. + public LinkedOperationRule(LinkedOperation linkedOperation, LinkedAction linkedAction) { LinkedOperation = linkedOperation; LinkedAction = linkedAction; + DependsOnTypes = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// + /// The linked operation. + /// The linked action. + /// Depends on types. /// Keeps track of any properties unknown to the library. - internal LinkedOperationRule(LinkedOperation linkedOperation, LinkedAction linkedAction, IDictionary serializedAdditionalRawData) + internal LinkedOperationRule(LinkedOperation linkedOperation, LinkedAction linkedAction, IList dependsOnTypes, IDictionary serializedAdditionalRawData) { LinkedOperation = linkedOperation; LinkedAction = linkedAction; + DependsOnTypes = dependsOnTypes; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -70,9 +73,11 @@ internal LinkedOperationRule() { } - /// Gets the linked operation. - public LinkedOperation LinkedOperation { get; } - /// Gets the linked action. - public LinkedAction LinkedAction { get; } + /// The linked operation. + public LinkedOperation LinkedOperation { get; set; } + /// The linked action. + public LinkedAction LinkedAction { get; set; } + /// Depends on types. + public IList DependsOnTypes { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDetail.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDetail.cs index ff86b9f226ad..3c58434dfbb1 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDetail.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDetail.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The LoggingDetail. + /// The detail level. public readonly partial struct LoggingDetail : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDirection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDirection.cs index 3f04a7a10257..cc9eafb97f1a 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDirection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingDirection.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The LoggingDirection. + /// The direction. public readonly partial struct LoggingDirection : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingHiddenPropertyPaths.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingHiddenPropertyPaths.cs index 064aaafdf14a..f74993a7f13a 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingHiddenPropertyPaths.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingHiddenPropertyPaths.cs @@ -53,8 +53,8 @@ public LoggingHiddenPropertyPaths() } /// Initializes a new instance of . - /// - /// + /// The hidden paths on request. + /// The hidden paths on response. /// Keeps track of any properties unknown to the library. internal LoggingHiddenPropertyPaths(IList hiddenPathsOnRequest, IList hiddenPathsOnResponse, IDictionary serializedAdditionalRawData) { @@ -63,9 +63,9 @@ internal LoggingHiddenPropertyPaths(IList hiddenPathsOnRequest, IList Gets the hidden paths on request. + /// The hidden paths on request. public IList HiddenPathsOnRequest { get; } - /// Gets the hidden paths on response. + /// The hidden paths on response. public IList HiddenPathsOnResponse { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingRule.cs index 0c417f449fad..1e19e2f91d2a 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingRule.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/LoggingRule.cs @@ -46,9 +46,9 @@ public partial class LoggingRule private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// - /// + /// The action. + /// The direction. + /// The detail level. /// is null. public LoggingRule(string action, LoggingDirection direction, LoggingDetail detailLevel) { @@ -60,10 +60,10 @@ public LoggingRule(string action, LoggingDirection direction, LoggingDetail deta } /// Initializes a new instance of . - /// - /// - /// - /// + /// The action. + /// The direction. + /// The detail level. + /// The hidden property paths. /// Keeps track of any properties unknown to the library. internal LoggingRule(string action, LoggingDirection direction, LoggingDetail detailLevel, LoggingHiddenPropertyPaths hiddenPropertyPaths, IDictionary serializedAdditionalRawData) { @@ -79,13 +79,13 @@ internal LoggingRule() { } - /// Gets or sets the action. + /// The action. public string Action { get; set; } - /// Gets or sets the direction. + /// The direction. public LoggingDirection Direction { get; set; } - /// Gets or sets the detail level. + /// The detail level. public LoggingDetail DetailLevel { get; set; } - /// Gets or sets the hidden property paths. + /// The hidden property paths. public LoggingHiddenPropertyPaths HiddenPropertyPaths { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestLevelPropertyBag.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestLevelPropertyBag.Serialization.cs new file mode 100644 index 000000000000..acadc44e8eb5 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestLevelPropertyBag.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ManifestLevelPropertyBag : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManifestLevelPropertyBag)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(ResourceHydrationAccounts)) + { + writer.WritePropertyName("resourceHydrationAccounts"u8); + writer.WriteStartArray(); + foreach (var item in ResourceHydrationAccounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManifestLevelPropertyBag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManifestLevelPropertyBag)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManifestLevelPropertyBag(document.RootElement, options); + } + + internal static ManifestLevelPropertyBag DeserializeManifestLevelPropertyBag(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resourceHydrationAccounts = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceHydrationAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceHydrationAccount.DeserializeResourceHydrationAccount(item, options)); + } + resourceHydrationAccounts = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManifestLevelPropertyBag(resourceHydrationAccounts ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ManifestLevelPropertyBag)} does not support writing '{options.Format}' format."); + } + } + + ManifestLevelPropertyBag IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManifestLevelPropertyBag(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManifestLevelPropertyBag)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestLevelPropertyBag.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestLevelPropertyBag.cs new file mode 100644 index 000000000000..f51cc00d7535 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestLevelPropertyBag.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ManifestLevelPropertyBag. + public partial class ManifestLevelPropertyBag + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ManifestLevelPropertyBag() + { + ResourceHydrationAccounts = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The resource hydration accounts. + /// Keeps track of any properties unknown to the library. + internal ManifestLevelPropertyBag(IList resourceHydrationAccounts, IDictionary serializedAdditionalRawData) + { + ResourceHydrationAccounts = resourceHydrationAccounts; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource hydration accounts. + public IList ResourceHydrationAccounts { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestResourceDeletionPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestResourceDeletionPolicy.cs index a790420bf462..a0e08e169aec 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestResourceDeletionPolicy.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ManifestResourceDeletionPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ManifestResourceDeletionPolicy. + /// The resource deletion policy. public readonly partial struct ManifestResourceDeletionPolicy : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MarketplaceType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MarketplaceType.cs index 8847f7d259de..d1227c8fb90c 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MarketplaceType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MarketplaceType.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The MarketplaceType. + /// The marketplace type. public enum MarketplaceType { /// NotSpecified. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MessageScope.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MessageScope.cs index 4b5685b82b12..52d0fab100c7 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MessageScope.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/MessageScope.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The MessageScope. + /// The message scope. public readonly partial struct MessageScope : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NestedProvisioningSupport.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NestedProvisioningSupport.Serialization.cs new file mode 100644 index 000000000000..be05673f577c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NestedProvisioningSupport.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class NestedProvisioningSupport : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NestedProvisioningSupport)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MinimumApiVersion)) + { + writer.WritePropertyName("minimumApiVersion"u8); + writer.WriteStringValue(MinimumApiVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NestedProvisioningSupport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NestedProvisioningSupport)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNestedProvisioningSupport(document.RootElement, options); + } + + internal static NestedProvisioningSupport DeserializeNestedProvisioningSupport(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string minimumApiVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minimumApiVersion"u8)) + { + minimumApiVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NestedProvisioningSupport(minimumApiVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(NestedProvisioningSupport)} does not support writing '{options.Format}' format."); + } + } + + NestedProvisioningSupport IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNestedProvisioningSupport(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NestedProvisioningSupport)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NestedProvisioningSupport.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NestedProvisioningSupport.cs new file mode 100644 index 000000000000..2d03a915064d --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NestedProvisioningSupport.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Nested provisioning support. + internal partial class NestedProvisioningSupport + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NestedProvisioningSupport() + { + } + + /// Initializes a new instance of . + /// Minimum API version. + /// Keeps track of any properties unknown to the library. + internal NestedProvisioningSupport(string minimumApiVersion, IDictionary serializedAdditionalRawData) + { + MinimumApiVersion = minimumApiVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Minimum API version. + public string MinimumApiVersion { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationEndpoint.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationEndpoint.cs index 7278cb361342..a5e67086f9a0 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationEndpoint.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationEndpoint.cs @@ -53,8 +53,8 @@ public NotificationEndpoint() } /// Initializes a new instance of . - /// - /// + /// The notification destination. + /// The locations. /// Keeps track of any properties unknown to the library. internal NotificationEndpoint(ResourceIdentifier notificationDestination, IList locations, IDictionary serializedAdditionalRawData) { @@ -63,9 +63,9 @@ internal NotificationEndpoint(ResourceIdentifier notificationDestination, IList< _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the notification destination. + /// The notification destination. public ResourceIdentifier NotificationDestination { get; set; } - /// Gets the locations. + /// The locations. public IList Locations { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationMode.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationMode.cs index 046a65b2e346..205a5934ebbb 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationMode.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationMode.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The NotificationMode. + /// The notification mode. public readonly partial struct NotificationMode : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationListResult.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationListResult.cs index 5d6539ce6b19..8d04debf3021 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationListResult.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationListResult.cs @@ -52,7 +52,7 @@ internal NotificationRegistrationListResult() } /// Initializes a new instance of . - /// + /// The value. /// The URL to get to the next set of results, if there are any. /// Keeps track of any properties unknown to the library. internal NotificationRegistrationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) @@ -62,7 +62,7 @@ internal NotificationRegistrationListResult(IReadOnlyList Gets the value. + /// The value. public IReadOnlyList Value { get; } /// The URL to get to the next set of results, if there are any. public string NextLink { get; } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.Serialization.cs index 5942f24e56dd..4bf75fc70de3 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.Serialization.cs @@ -64,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.cs index fc931154bef5..d2819e113bd3 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/NotificationRegistrationProperties.cs @@ -53,11 +53,11 @@ public NotificationRegistrationProperties() } /// Initializes a new instance of . - /// - /// - /// - /// - /// + /// The notification mode. + /// The message scope. + /// The included events. + /// The notification endpoints. + /// The provisioned state of the resource. /// Keeps track of any properties unknown to the library. internal NotificationRegistrationProperties(NotificationMode? notificationMode, MessageScope? messageScope, IList includedEvents, IList notificationEndpoints, ProviderHubProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { @@ -69,15 +69,13 @@ internal NotificationRegistrationProperties(NotificationMode? notificationMode, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the notification mode. + /// The notification mode. public NotificationMode? NotificationMode { get; set; } - /// Gets or sets the message scope. + /// The message scope. public MessageScope? MessageScope { get; set; } - /// Gets the included events. + /// The included events. public IList IncludedEvents { get; } - /// Gets the notification endpoints. + /// The notification endpoints. public IList NotificationEndpoints { get; } - /// Gets or sets the provisioning state. - public ProviderHubProvisioningState? ProvisioningState { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RequestHeaderOptions.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiConfiguration.Serialization.cs similarity index 67% rename from sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RequestHeaderOptions.Serialization.cs rename to sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiConfiguration.Serialization.cs index 1dabc7f2b66d..8bde6123b716 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RequestHeaderOptions.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiConfiguration.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.ProviderHub.Models { - internal partial class RequestHeaderOptions : IUtf8JsonSerializable, IJsonModel + internal partial class OpenApiConfiguration : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RequestHeaderOptions)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OpenApiConfiguration)} does not support writing '{format}' format."); } - if (Optional.IsDefined(OptInHeaders)) + if (Optional.IsDefined(Validation)) { - writer.WritePropertyName("optInHeaders"u8); - writer.WriteStringValue(OptInHeaders.Value.ToString()); + writer.WritePropertyName("validation"u8); + writer.WriteObjectValue(Validation, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -56,19 +56,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - RequestHeaderOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenApiConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(RequestHeaderOptions)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenApiConfiguration)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRequestHeaderOptions(document.RootElement, options); + return DeserializeOpenApiConfiguration(document.RootElement, options); } - internal static RequestHeaderOptions DeserializeRequestHeaderOptions(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenApiConfiguration DeserializeOpenApiConfiguration(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -76,18 +76,18 @@ internal static RequestHeaderOptions DeserializeRequestHeaderOptions(JsonElement { return null; } - OptInHeaderType? optInHeaders = default; + OpenApiValidation validation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("optInHeaders"u8)) + if (property.NameEquals("validation"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - optInHeaders = new OptInHeaderType(property.Value.GetString()); + validation = OpenApiValidation.DeserializeOpenApiValidation(property.Value, options); continue; } if (options.Format != "W") @@ -96,38 +96,38 @@ internal static RequestHeaderOptions DeserializeRequestHeaderOptions(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new RequestHeaderOptions(optInHeaders, serializedAdditionalRawData); + return new OpenApiConfiguration(validation, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); default: - throw new FormatException($"The model {nameof(RequestHeaderOptions)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenApiConfiguration)} does not support writing '{options.Format}' format."); } } - RequestHeaderOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OpenApiConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRequestHeaderOptions(document.RootElement, options); + return DeserializeOpenApiConfiguration(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(RequestHeaderOptions)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenApiConfiguration)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiConfiguration.cs new file mode 100644 index 000000000000..4ba789c193d0 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiConfiguration.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The OpenApiConfiguration. + internal partial class OpenApiConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenApiConfiguration() + { + } + + /// Initializes a new instance of . + /// The open api validation. + /// Keeps track of any properties unknown to the library. + internal OpenApiConfiguration(OpenApiValidation validation, IDictionary serializedAdditionalRawData) + { + Validation = validation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The open api validation. + internal OpenApiValidation Validation { get; set; } + /// Indicates whether a non compliance response is allowed for a LIST call. + public bool? IsNoncompliantCollectionResponseAllowed + { + get => Validation is null ? default : Validation.IsNoncompliantCollectionResponseAllowed; + set + { + if (Validation is null) + Validation = new OpenApiValidation(); + Validation.IsNoncompliantCollectionResponseAllowed = value; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiValidation.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiValidation.Serialization.cs new file mode 100644 index 000000000000..c4b0a4ec12a8 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiValidation.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class OpenApiValidation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenApiValidation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsNoncompliantCollectionResponseAllowed)) + { + writer.WritePropertyName("allowNoncompliantCollectionResponse"u8); + writer.WriteBooleanValue(IsNoncompliantCollectionResponseAllowed.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OpenApiValidation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenApiValidation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenApiValidation(document.RootElement, options); + } + + internal static OpenApiValidation DeserializeOpenApiValidation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? allowNoncompliantCollectionResponse = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowNoncompliantCollectionResponse"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowNoncompliantCollectionResponse = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenApiValidation(allowNoncompliantCollectionResponse, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(OpenApiValidation)} does not support writing '{options.Format}' format."); + } + } + + OpenApiValidation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOpenApiValidation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenApiValidation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiValidation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiValidation.cs new file mode 100644 index 000000000000..a67fff67b25b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OpenApiValidation.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The OpenApiValidation. + internal partial class OpenApiValidation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenApiValidation() + { + } + + /// Initializes a new instance of . + /// Indicates whether a non compliance response is allowed for a LIST call. + /// Keeps track of any properties unknown to the library. + internal OpenApiValidation(bool? isNoncompliantCollectionResponseAllowed, IDictionary serializedAdditionalRawData) + { + IsNoncompliantCollectionResponseAllowed = isNoncompliantCollectionResponseAllowed; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether a non compliance response is allowed for a LIST call. + public bool? IsNoncompliantCollectionResponseAllowed { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OptInHeaderType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OptInHeaderType.cs index 6bc037bb114f..1090beb6707a 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OptInHeaderType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OptInHeaderType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The OptInHeaderType. + /// The opt in headers. public readonly partial struct OptInHeaderType : IEquatable { private readonly string _value; @@ -27,6 +27,13 @@ public OptInHeaderType(string value) private const string ClientGroupMembershipValue = "ClientGroupMembership"; private const string SignedAuxiliaryTokensValue = "SignedAuxiliaryTokens"; private const string UnboundedClientGroupMembershipValue = "UnboundedClientGroupMembership"; + private const string PrivateLinkIdValue = "PrivateLinkId"; + private const string PrivateLinkResourceIdValue = "PrivateLinkResourceId"; + private const string ManagementGroupAncestorsEncodedValue = "ManagementGroupAncestorsEncoded"; + private const string PrivateLinkVnetTrafficTagValue = "PrivateLinkVnetTrafficTag"; + private const string ResourceGroupLocationValue = "ResourceGroupLocation"; + private const string ClientPrincipalNameEncodedValue = "ClientPrincipalNameEncoded"; + private const string MSIResourceIdEncodedValue = "MSIResourceIdEncoded"; /// NotSpecified. public static OptInHeaderType NotSpecified { get; } = new OptInHeaderType(NotSpecifiedValue); @@ -38,6 +45,20 @@ public OptInHeaderType(string value) public static OptInHeaderType SignedAuxiliaryTokens { get; } = new OptInHeaderType(SignedAuxiliaryTokensValue); /// UnboundedClientGroupMembership. public static OptInHeaderType UnboundedClientGroupMembership { get; } = new OptInHeaderType(UnboundedClientGroupMembershipValue); + /// PrivateLinkId. + public static OptInHeaderType PrivateLinkId { get; } = new OptInHeaderType(PrivateLinkIdValue); + /// PrivateLinkResourceId. + public static OptInHeaderType PrivateLinkResourceId { get; } = new OptInHeaderType(PrivateLinkResourceIdValue); + /// ManagementGroupAncestorsEncoded. + public static OptInHeaderType ManagementGroupAncestorsEncoded { get; } = new OptInHeaderType(ManagementGroupAncestorsEncodedValue); + /// PrivateLinkVnetTrafficTag. + public static OptInHeaderType PrivateLinkVnetTrafficTag { get; } = new OptInHeaderType(PrivateLinkVnetTrafficTagValue); + /// ResourceGroupLocation. + public static OptInHeaderType ResourceGroupLocation { get; } = new OptInHeaderType(ResourceGroupLocationValue); + /// ClientPrincipalNameEncoded. + public static OptInHeaderType ClientPrincipalNameEncoded { get; } = new OptInHeaderType(ClientPrincipalNameEncodedValue); + /// MSIResourceIdEncoded. + public static OptInHeaderType MSIResourceIdEncoded { get; } = new OptInHeaderType(MSIResourceIdEncodedValue); /// Determines if two values are the same. public static bool operator ==(OptInHeaderType left, OptInHeaderType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OptOutHeaderType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OptOutHeaderType.cs new file mode 100644 index 000000000000..7f2e229a3375 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/OptOutHeaderType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The opt out headers. + public readonly partial struct OptOutHeaderType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OptOutHeaderType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string SystemDataCreatedByLastModifiedByValue = "SystemDataCreatedByLastModifiedBy"; + + /// NotSpecified. + public static OptOutHeaderType NotSpecified { get; } = new OptOutHeaderType(NotSpecifiedValue); + /// SystemDataCreatedByLastModifiedBy. + public static OptOutHeaderType SystemDataCreatedByLastModifiedBy { get; } = new OptOutHeaderType(SystemDataCreatedByLastModifiedByValue); + /// Determines if two values are the same. + public static bool operator ==(OptOutHeaderType left, OptOutHeaderType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OptOutHeaderType left, OptOutHeaderType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OptOutHeaderType(string value) => new OptOutHeaderType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OptOutHeaderType other && Equals(other); + /// + public bool Equals(OptOutHeaderType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PolicyExecutionType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PolicyExecutionType.cs new file mode 100644 index 000000000000..a5efb4904da5 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PolicyExecutionType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The policy execution type. + public readonly partial struct PolicyExecutionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyExecutionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string ExecutePoliciesValue = "ExecutePolicies"; + private const string BypassPoliciesValue = "BypassPolicies"; + private const string ExpectPartialPutRequestsValue = "ExpectPartialPutRequests"; + + /// NotSpecified. + public static PolicyExecutionType NotSpecified { get; } = new PolicyExecutionType(NotSpecifiedValue); + /// ExecutePolicies. + public static PolicyExecutionType ExecutePolicies { get; } = new PolicyExecutionType(ExecutePoliciesValue); + /// BypassPolicies. + public static PolicyExecutionType BypassPolicies { get; } = new PolicyExecutionType(BypassPoliciesValue); + /// ExpectPartialPutRequests. + public static PolicyExecutionType ExpectPartialPutRequests { get; } = new PolicyExecutionType(ExpectPartialPutRequestsValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyExecutionType left, PolicyExecutionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyExecutionType left, PolicyExecutionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PolicyExecutionType(string value) => new PolicyExecutionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyExecutionType other && Equals(other); + /// + public bool Equals(PolicyExecutionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PrivateResourceProviderConfiguration.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PrivateResourceProviderConfiguration.Serialization.cs new file mode 100644 index 000000000000..1074ea91fd41 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PrivateResourceProviderConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class PrivateResourceProviderConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateResourceProviderConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AllowedSubscriptions)) + { + writer.WritePropertyName("allowedSubscriptions"u8); + writer.WriteStartArray(); + foreach (var item in AllowedSubscriptions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PrivateResourceProviderConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateResourceProviderConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrivateResourceProviderConfiguration(document.RootElement, options); + } + + internal static PrivateResourceProviderConfiguration DeserializePrivateResourceProviderConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedSubscriptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedSubscriptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedSubscriptions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrivateResourceProviderConfiguration(allowedSubscriptions ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(PrivateResourceProviderConfiguration)} does not support writing '{options.Format}' format."); + } + } + + PrivateResourceProviderConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePrivateResourceProviderConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrivateResourceProviderConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PrivateResourceProviderConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PrivateResourceProviderConfiguration.cs new file mode 100644 index 000000000000..7676f95f58b6 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/PrivateResourceProviderConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The PrivateResourceProviderConfiguration. + internal partial class PrivateResourceProviderConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PrivateResourceProviderConfiguration() + { + AllowedSubscriptions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The allowed subscriptions. + /// Keeps track of any properties unknown to the library. + internal PrivateResourceProviderConfiguration(IList allowedSubscriptions, IDictionary serializedAdditionalRawData) + { + AllowedSubscriptions = allowedSubscriptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The allowed subscriptions. + public IList AllowedSubscriptions { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAdditionalAuthorization.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAdditionalAuthorization.Serialization.cs new file mode 100644 index 000000000000..c663ce86e003 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAdditionalAuthorization.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderAdditionalAuthorization : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderAdditionalAuthorization)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ApplicationId)) + { + writer.WritePropertyName("applicationId"u8); + writer.WriteStringValue(ApplicationId); + } + if (Optional.IsDefined(RoleDefinitionId)) + { + writer.WritePropertyName("roleDefinitionId"u8); + writer.WriteStringValue(RoleDefinitionId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderAdditionalAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderAdditionalAuthorization)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderAdditionalAuthorization(document.RootElement, options); + } + + internal static ProviderAdditionalAuthorization DeserializeProviderAdditionalAuthorization(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string applicationId = default; + string roleDefinitionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("applicationId"u8)) + { + applicationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("roleDefinitionId"u8)) + { + roleDefinitionId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderAdditionalAuthorization(applicationId, roleDefinitionId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderAdditionalAuthorization)} does not support writing '{options.Format}' format."); + } + } + + ProviderAdditionalAuthorization IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderAdditionalAuthorization(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderAdditionalAuthorization)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAdditionalAuthorization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAdditionalAuthorization.cs new file mode 100644 index 000000000000..4955e031e386 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAdditionalAuthorization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderAdditionalAuthorization. + public partial class ProviderAdditionalAuthorization + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderAdditionalAuthorization() + { + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal ProviderAdditionalAuthorization(string applicationId, string roleDefinitionId, IDictionary serializedAdditionalRawData) + { + ApplicationId = applicationId; + RoleDefinitionId = roleDefinitionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the application id. + public string ApplicationId { get; set; } + /// Gets or sets the role definition id. + public string RoleDefinitionId { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthenticationScheme.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthenticationScheme.cs new file mode 100644 index 000000000000..7b3b8d746efc --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthenticationScheme.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The authentication scheme. + public readonly partial struct ProviderAuthenticationScheme : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderAuthenticationScheme(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PoPValue = "PoP"; + private const string BearerValue = "Bearer"; + + /// PoP. + public static ProviderAuthenticationScheme PoP { get; } = new ProviderAuthenticationScheme(PoPValue); + /// Bearer. + public static ProviderAuthenticationScheme Bearer { get; } = new ProviderAuthenticationScheme(BearerValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderAuthenticationScheme left, ProviderAuthenticationScheme right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderAuthenticationScheme left, ProviderAuthenticationScheme right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderAuthenticationScheme(string value) => new ProviderAuthenticationScheme(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderAuthenticationScheme other && Equals(other); + /// + public bool Equals(ProviderAuthenticationScheme other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthorizedApplicationProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthorizedApplicationProperties.Serialization.cs new file mode 100644 index 000000000000..fe29d74eed51 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthorizedApplicationProperties.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderAuthorizedApplicationProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProviderAuthorization)) + { + writer.WritePropertyName("providerAuthorization"u8); + writer.WriteObjectValue(ProviderAuthorization, options); + } + if (Optional.IsCollectionDefined(DataAuthorizations)) + { + writer.WritePropertyName("dataAuthorizations"u8); + writer.WriteStartArray(); + foreach (var item in DataAuthorizations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderAuthorizedApplicationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderAuthorizedApplicationProperties(document.RootElement, options); + } + + internal static ProviderAuthorizedApplicationProperties DeserializeProviderAuthorizedApplicationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApplicationProviderAuthorization providerAuthorization = default; + IList dataAuthorizations = default; + ProviderHubProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("providerAuthorization"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + providerAuthorization = ApplicationProviderAuthorization.DeserializeApplicationProviderAuthorization(property.Value, options); + continue; + } + if (property.NameEquals("dataAuthorizations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationDataAuthorization.DeserializeApplicationDataAuthorization(item, options)); + } + dataAuthorizations = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProviderHubProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderAuthorizedApplicationProperties(providerAuthorization, dataAuthorizations ?? new ChangeTrackingList(), provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationProperties)} does not support writing '{options.Format}' format."); + } + } + + ProviderAuthorizedApplicationProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderAuthorizedApplicationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthorizedApplicationProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthorizedApplicationProperties.cs new file mode 100644 index 000000000000..c100cff99aed --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderAuthorizedApplicationProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderAuthorizedApplicationProperties. + public partial class ProviderAuthorizedApplicationProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderAuthorizedApplicationProperties() + { + DataAuthorizations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The authorizations that determine the level of data access permissions on the specified resource types. + /// The provisioning state. + /// Keeps track of any properties unknown to the library. + internal ProviderAuthorizedApplicationProperties(ApplicationProviderAuthorization providerAuthorization, IList dataAuthorizations, ProviderHubProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProviderAuthorization = providerAuthorization; + DataAuthorizations = dataAuthorizations; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the provider authorization. + public ApplicationProviderAuthorization ProviderAuthorization { get; set; } + /// The authorizations that determine the level of data access permissions on the specified resource types. + public IList DataAuthorizations { get; } + /// The provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderDstsConfiguration.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderDstsConfiguration.Serialization.cs new file mode 100644 index 000000000000..189f69cd45f3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderDstsConfiguration.Serialization.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderDstsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderDstsConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + if (Optional.IsDefined(ServiceDnsName)) + { + writer.WritePropertyName("serviceDnsName"u8); + writer.WriteStringValue(ServiceDnsName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderDstsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderDstsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderDstsConfiguration(document.RootElement, options); + } + + internal static ProviderDstsConfiguration DeserializeProviderDstsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string serviceName = default; + string serviceDnsName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceName"u8)) + { + serviceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceDnsName"u8)) + { + serviceDnsName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderDstsConfiguration(serviceName, serviceDnsName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderDstsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ProviderDstsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderDstsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderDstsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderDstsConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderDstsConfiguration.cs new file mode 100644 index 000000000000..a9b3080d93b8 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderDstsConfiguration.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderDstsConfiguration. + public partial class ProviderDstsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The service name. + /// is null. + public ProviderDstsConfiguration(string serviceName) + { + Argument.AssertNotNull(serviceName, nameof(serviceName)); + + ServiceName = serviceName; + } + + /// Initializes a new instance of . + /// The service name. + /// This is a URI property. + /// Keeps track of any properties unknown to the library. + internal ProviderDstsConfiguration(string serviceName, string serviceDnsName, IDictionary serializedAdditionalRawData) + { + ServiceName = serviceName; + ServiceDnsName = serviceDnsName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProviderDstsConfiguration() + { + } + + /// The service name. + public string ServiceName { get; set; } + /// This is a URI property. + public string ServiceDnsName { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointInformation.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointInformation.Serialization.cs new file mode 100644 index 000000000000..01f17725e131 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointInformation.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderEndpointInformation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderEndpointInformation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + if (Optional.IsDefined(EndpointType)) + { + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.Value.ToString()); + } + if (Optional.IsDefined(SchemaVersion)) + { + writer.WritePropertyName("schemaVersion"u8); + writer.WriteStringValue(SchemaVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderEndpointInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderEndpointInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderEndpointInformation(document.RootElement, options); + } + + internal static ProviderEndpointInformation DeserializeProviderEndpointInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string endpoint = default; + ProviderNotificationEndpointType? endpointType = default; + string schemaVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpoint"u8)) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointType = new ProviderNotificationEndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("schemaVersion"u8)) + { + schemaVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderEndpointInformation(endpoint, endpointType, schemaVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderEndpointInformation)} does not support writing '{options.Format}' format."); + } + } + + ProviderEndpointInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderEndpointInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderEndpointInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointInformation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointInformation.cs new file mode 100644 index 000000000000..611841b0736c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointInformation.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderEndpointInformation. + public partial class ProviderEndpointInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderEndpointInformation() + { + } + + /// Initializes a new instance of . + /// The endpoint. + /// The endpoint type. + /// The schema version. + /// Keeps track of any properties unknown to the library. + internal ProviderEndpointInformation(string endpoint, ProviderNotificationEndpointType? endpointType, string schemaVersion, IDictionary serializedAdditionalRawData) + { + Endpoint = endpoint; + EndpointType = endpointType; + SchemaVersion = schemaVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The endpoint. + public string Endpoint { get; set; } + /// The endpoint type. + public ProviderNotificationEndpointType? EndpointType { get; set; } + /// The schema version. + public string SchemaVersion { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointType.cs new file mode 100644 index 000000000000..0d432dca825e --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The endpoint type. + public readonly partial struct ProviderEndpointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderEndpointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string CanaryValue = "Canary"; + private const string ProductionValue = "Production"; + private const string TestInProductionValue = "TestInProduction"; + + /// NotSpecified. + public static ProviderEndpointType NotSpecified { get; } = new ProviderEndpointType(NotSpecifiedValue); + /// Canary. + public static ProviderEndpointType Canary { get; } = new ProviderEndpointType(CanaryValue); + /// Production. + public static ProviderEndpointType Production { get; } = new ProviderEndpointType(ProductionValue); + /// TestInProduction. + public static ProviderEndpointType TestInProduction { get; } = new ProviderEndpointType(TestInProductionValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderEndpointType left, ProviderEndpointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderEndpointType left, ProviderEndpointType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderEndpointType(string value) => new ProviderEndpointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderEndpointType other && Equals(other); + /// + public bool Equals(ProviderEndpointType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointTypeResourceType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointTypeResourceType.cs new file mode 100644 index 000000000000..bc9e34aa8da7 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderEndpointTypeResourceType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The endpoint type. + public readonly partial struct ProviderEndpointTypeResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderEndpointTypeResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string CanaryValue = "Canary"; + private const string ProductionValue = "Production"; + private const string TestInProductionValue = "TestInProduction"; + + /// NotSpecified. + public static ProviderEndpointTypeResourceType NotSpecified { get; } = new ProviderEndpointTypeResourceType(NotSpecifiedValue); + /// Canary. + public static ProviderEndpointTypeResourceType Canary { get; } = new ProviderEndpointTypeResourceType(CanaryValue); + /// Production. + public static ProviderEndpointTypeResourceType Production { get; } = new ProviderEndpointTypeResourceType(ProductionValue); + /// TestInProduction. + public static ProviderEndpointTypeResourceType TestInProduction { get; } = new ProviderEndpointTypeResourceType(TestInProductionValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderEndpointTypeResourceType left, ProviderEndpointTypeResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderEndpointTypeResourceType left, ProviderEndpointTypeResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderEndpointTypeResourceType(string value) => new ProviderEndpointTypeResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderEndpointTypeResourceType other && Equals(other); + /// + public bool Equals(ProviderEndpointTypeResourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderExtendedLocationType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderExtendedLocationType.cs new file mode 100644 index 000000000000..45cbb95fa5b5 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderExtendedLocationType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The extended location type. + public readonly partial struct ProviderExtendedLocationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderExtendedLocationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string CustomLocationValue = "CustomLocation"; + private const string EdgeZoneValue = "EdgeZone"; + private const string ArcZoneValue = "ArcZone"; + + /// The extended location type is not specified. + public static ProviderExtendedLocationType NotSpecified { get; } = new ProviderExtendedLocationType(NotSpecifiedValue); + /// The extended location type is custom location. + public static ProviderExtendedLocationType CustomLocation { get; } = new ProviderExtendedLocationType(CustomLocationValue); + /// The extended location type is edge zone. + public static ProviderExtendedLocationType EdgeZone { get; } = new ProviderExtendedLocationType(EdgeZoneValue); + /// The extended location type is arc zone. + public static ProviderExtendedLocationType ArcZone { get; } = new ProviderExtendedLocationType(ArcZoneValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderExtendedLocationType left, ProviderExtendedLocationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderExtendedLocationType left, ProviderExtendedLocationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderExtendedLocationType(string value) => new ProviderExtendedLocationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderExtendedLocationType other && Equals(other); + /// + public bool Equals(ProviderExtendedLocationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFeaturesRule.Serialization.cs similarity index 65% rename from sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesRule.Serialization.cs rename to sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFeaturesRule.Serialization.cs index b1bb6190a733..4c1525274536 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesRule.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFeaturesRule.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.ProviderHub.Models { - internal partial class FeaturesRule : IUtf8JsonSerializable, IJsonModel + public partial class ProviderFeaturesRule : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FeaturesRule)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ProviderFeaturesRule)} does not support writing '{format}' format."); } writer.WritePropertyName("requiredFeaturesPolicy"u8); @@ -53,19 +53,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - FeaturesRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ProviderFeaturesRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FeaturesRule)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ProviderFeaturesRule)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFeaturesRule(document.RootElement, options); + return DeserializeProviderFeaturesRule(document.RootElement, options); } - internal static FeaturesRule DeserializeFeaturesRule(JsonElement element, ModelReaderWriterOptions options = null) + internal static ProviderFeaturesRule DeserializeProviderFeaturesRule(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -89,38 +89,38 @@ internal static FeaturesRule DeserializeFeaturesRule(JsonElement element, ModelR } } serializedAdditionalRawData = rawDataDictionary; - return new FeaturesRule(requiredFeaturesPolicy, serializedAdditionalRawData); + return new ProviderFeaturesRule(requiredFeaturesPolicy, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); default: - throw new FormatException($"The model {nameof(FeaturesRule)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ProviderFeaturesRule)} does not support writing '{options.Format}' format."); } } - FeaturesRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ProviderFeaturesRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFeaturesRule(document.RootElement, options); + return DeserializeProviderFeaturesRule(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(FeaturesRule)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ProviderFeaturesRule)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFeaturesRule.cs similarity index 69% rename from sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesRule.cs rename to sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFeaturesRule.cs index 2caab3b5e70c..9ed51aaa4962 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/FeaturesRule.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFeaturesRule.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The FeaturesRule. - internal partial class FeaturesRule + /// The ProviderFeaturesRule. + public partial class ProviderFeaturesRule { /// /// Keeps track of any properties unknown to the library. @@ -45,28 +45,28 @@ internal partial class FeaturesRule /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// - public FeaturesRule(FeaturesPolicy requiredFeaturesPolicy) + /// Initializes a new instance of . + /// The required feature policy. + public ProviderFeaturesRule(FeaturesPolicy requiredFeaturesPolicy) { RequiredFeaturesPolicy = requiredFeaturesPolicy; } - /// Initializes a new instance of . - /// + /// Initializes a new instance of . + /// The required feature policy. /// Keeps track of any properties unknown to the library. - internal FeaturesRule(FeaturesPolicy requiredFeaturesPolicy, IDictionary serializedAdditionalRawData) + internal ProviderFeaturesRule(FeaturesPolicy requiredFeaturesPolicy, IDictionary serializedAdditionalRawData) { RequiredFeaturesPolicy = requiredFeaturesPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal FeaturesRule() + /// Initializes a new instance of for deserialization. + internal ProviderFeaturesRule() { } - /// Gets or sets the required features policy. + /// The required feature policy. public FeaturesPolicy RequiredFeaturesPolicy { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFilterRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFilterRule.Serialization.cs new file mode 100644 index 000000000000..ce1feba2098c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFilterRule.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderFilterRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderFilterRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(FilterQuery)) + { + writer.WritePropertyName("filterQuery"u8); + writer.WriteStringValue(FilterQuery); + } + if (Optional.IsCollectionDefined(EndpointInformation)) + { + writer.WritePropertyName("endpointInformation"u8); + writer.WriteStartArray(); + foreach (var item in EndpointInformation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderFilterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderFilterRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderFilterRule(document.RootElement, options); + } + + internal static ProviderFilterRule DeserializeProviderFilterRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string filterQuery = default; + IList endpointInformation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filterQuery"u8)) + { + filterQuery = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderEndpointInformation.DeserializeProviderEndpointInformation(item, options)); + } + endpointInformation = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderFilterRule(filterQuery, endpointInformation ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderFilterRule)} does not support writing '{options.Format}' format."); + } + } + + ProviderFilterRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderFilterRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderFilterRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFilterRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFilterRule.cs new file mode 100644 index 000000000000..3636125436d3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFilterRule.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderFilterRule. + public partial class ProviderFilterRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderFilterRule() + { + EndpointInformation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The filter query. + /// The endpoint information. + /// Keeps track of any properties unknown to the library. + internal ProviderFilterRule(string filterQuery, IList endpointInformation, IDictionary serializedAdditionalRawData) + { + FilterQuery = filterQuery; + EndpointInformation = endpointInformation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The filter query. + public string FilterQuery { get; set; } + /// The endpoint information. + public IList EndpointInformation { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayload.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayload.Serialization.cs new file mode 100644 index 000000000000..863feb9b407a --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayload.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderFrontloadPayload : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderFrontloadPayload)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderFrontloadPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderFrontloadPayload)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderFrontloadPayload(document.RootElement, options); + } + + internal static ProviderFrontloadPayload DeserializeProviderFrontloadPayload(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderFrontloadPayloadProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = ProviderFrontloadPayloadProperties.DeserializeProviderFrontloadPayloadProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderFrontloadPayload(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderFrontloadPayload)} does not support writing '{options.Format}' format."); + } + } + + ProviderFrontloadPayload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderFrontloadPayload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderFrontloadPayload)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayload.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayload.cs new file mode 100644 index 000000000000..bd6fbcc4842b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayload.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderFrontloadPayload. + public partial class ProviderFrontloadPayload + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Properties of the frontload payload. + /// is null. + public ProviderFrontloadPayload(ProviderFrontloadPayloadProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of . + /// Properties of the frontload payload. + /// Keeps track of any properties unknown to the library. + internal ProviderFrontloadPayload(ProviderFrontloadPayloadProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProviderFrontloadPayload() + { + } + + /// Properties of the frontload payload. + public ProviderFrontloadPayloadProperties Properties { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayloadProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayloadProperties.Serialization.cs new file mode 100644 index 000000000000..77b91055e324 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayloadProperties.Serialization.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderFrontloadPayloadProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderFrontloadPayloadProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("operationType"u8); + writer.WriteStringValue(OperationType); + writer.WritePropertyName("providerNamespace"u8); + writer.WriteStringValue(ProviderNamespace); + writer.WritePropertyName("frontloadLocation"u8); + writer.WriteStringValue(FrontloadLocation); + writer.WritePropertyName("copyFromLocation"u8); + writer.WriteStringValue(CopyFromLocation); + writer.WritePropertyName("environmentType"u8); + writer.WriteStringValue(EnvironmentType.ToString()); + writer.WritePropertyName("serviceFeatureFlag"u8); + writer.WriteStringValue(ServiceFeatureFlag.ToString()); + writer.WritePropertyName("includeResourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in IncludeResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("excludeResourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in ExcludeResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("overrideManifestLevelFields"u8); + writer.WriteObjectValue(OverrideManifestLevelFields, options); + writer.WritePropertyName("overrideEndpointLevelFields"u8); + writer.WriteObjectValue(OverrideEndpointLevelFields, options); + writer.WritePropertyName("ignoreFields"u8); + writer.WriteStartArray(); + foreach (var item in IgnoreFields) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderFrontloadPayloadProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderFrontloadPayloadProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderFrontloadPayloadProperties(document.RootElement, options); + } + + internal static ProviderFrontloadPayloadProperties DeserializeProviderFrontloadPayloadProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string operationType = default; + string providerNamespace = default; + string frontloadLocation = default; + string copyFromLocation = default; + AvailableCheckInManifestEnvironment environmentType = default; + ServiceFeatureFlagAction serviceFeatureFlag = default; + IList includeResourceTypes = default; + IList excludeResourceTypes = default; + ManifestLevelPropertyBag overrideManifestLevelFields = default; + ResourceTypeEndpointBase overrideEndpointLevelFields = default; + IList ignoreFields = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationType"u8)) + { + operationType = property.Value.GetString(); + continue; + } + if (property.NameEquals("providerNamespace"u8)) + { + providerNamespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("frontloadLocation"u8)) + { + frontloadLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("copyFromLocation"u8)) + { + copyFromLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentType"u8)) + { + environmentType = new AvailableCheckInManifestEnvironment(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceFeatureFlag"u8)) + { + serviceFeatureFlag = new ServiceFeatureFlagAction(property.Value.GetString()); + continue; + } + if (property.NameEquals("includeResourceTypes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + includeResourceTypes = array; + continue; + } + if (property.NameEquals("excludeResourceTypes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + excludeResourceTypes = array; + continue; + } + if (property.NameEquals("overrideManifestLevelFields"u8)) + { + overrideManifestLevelFields = ManifestLevelPropertyBag.DeserializeManifestLevelPropertyBag(property.Value, options); + continue; + } + if (property.NameEquals("overrideEndpointLevelFields"u8)) + { + overrideEndpointLevelFields = ResourceTypeEndpointBase.DeserializeResourceTypeEndpointBase(property.Value, options); + continue; + } + if (property.NameEquals("ignoreFields"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ignoreFields = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderFrontloadPayloadProperties( + operationType, + providerNamespace, + frontloadLocation, + copyFromLocation, + environmentType, + serviceFeatureFlag, + includeResourceTypes, + excludeResourceTypes, + overrideManifestLevelFields, + overrideEndpointLevelFields, + ignoreFields, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderFrontloadPayloadProperties)} does not support writing '{options.Format}' format."); + } + } + + ProviderFrontloadPayloadProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderFrontloadPayloadProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderFrontloadPayloadProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayloadProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayloadProperties.cs new file mode 100644 index 000000000000..9f37d109e575 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderFrontloadPayloadProperties.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderFrontloadPayloadProperties. + public partial class ProviderFrontloadPayloadProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The operation type. + /// The provider namespace. + /// The frontload location. + /// The copy from location. + /// The environment type. + /// The service feature flag. + /// The resource types to include. + /// The resource types to exclude. + /// The manifest level fields to override. + /// The endpoint level fields to override. + /// The fields to ignore. + /// , , , , , , , or is null. + public ProviderFrontloadPayloadProperties(string operationType, string providerNamespace, string frontloadLocation, string copyFromLocation, AvailableCheckInManifestEnvironment environmentType, ServiceFeatureFlagAction serviceFeatureFlag, IEnumerable includeResourceTypes, IEnumerable excludeResourceTypes, ManifestLevelPropertyBag overrideManifestLevelFields, ResourceTypeEndpointBase overrideEndpointLevelFields, IEnumerable ignoreFields) + { + Argument.AssertNotNull(operationType, nameof(operationType)); + Argument.AssertNotNull(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNull(frontloadLocation, nameof(frontloadLocation)); + Argument.AssertNotNull(copyFromLocation, nameof(copyFromLocation)); + Argument.AssertNotNull(includeResourceTypes, nameof(includeResourceTypes)); + Argument.AssertNotNull(excludeResourceTypes, nameof(excludeResourceTypes)); + Argument.AssertNotNull(overrideManifestLevelFields, nameof(overrideManifestLevelFields)); + Argument.AssertNotNull(overrideEndpointLevelFields, nameof(overrideEndpointLevelFields)); + Argument.AssertNotNull(ignoreFields, nameof(ignoreFields)); + + OperationType = operationType; + ProviderNamespace = providerNamespace; + FrontloadLocation = frontloadLocation; + CopyFromLocation = copyFromLocation; + EnvironmentType = environmentType; + ServiceFeatureFlag = serviceFeatureFlag; + IncludeResourceTypes = includeResourceTypes.ToList(); + ExcludeResourceTypes = excludeResourceTypes.ToList(); + OverrideManifestLevelFields = overrideManifestLevelFields; + OverrideEndpointLevelFields = overrideEndpointLevelFields; + IgnoreFields = ignoreFields.ToList(); + } + + /// Initializes a new instance of . + /// The operation type. + /// The provider namespace. + /// The frontload location. + /// The copy from location. + /// The environment type. + /// The service feature flag. + /// The resource types to include. + /// The resource types to exclude. + /// The manifest level fields to override. + /// The endpoint level fields to override. + /// The fields to ignore. + /// Keeps track of any properties unknown to the library. + internal ProviderFrontloadPayloadProperties(string operationType, string providerNamespace, string frontloadLocation, string copyFromLocation, AvailableCheckInManifestEnvironment environmentType, ServiceFeatureFlagAction serviceFeatureFlag, IList includeResourceTypes, IList excludeResourceTypes, ManifestLevelPropertyBag overrideManifestLevelFields, ResourceTypeEndpointBase overrideEndpointLevelFields, IList ignoreFields, IDictionary serializedAdditionalRawData) + { + OperationType = operationType; + ProviderNamespace = providerNamespace; + FrontloadLocation = frontloadLocation; + CopyFromLocation = copyFromLocation; + EnvironmentType = environmentType; + ServiceFeatureFlag = serviceFeatureFlag; + IncludeResourceTypes = includeResourceTypes; + ExcludeResourceTypes = excludeResourceTypes; + OverrideManifestLevelFields = overrideManifestLevelFields; + OverrideEndpointLevelFields = overrideEndpointLevelFields; + IgnoreFields = ignoreFields; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProviderFrontloadPayloadProperties() + { + } + + /// The operation type. + public string OperationType { get; } + /// The provider namespace. + public string ProviderNamespace { get; } + /// The frontload location. + public string FrontloadLocation { get; } + /// The copy from location. + public string CopyFromLocation { get; } + /// The environment type. + public AvailableCheckInManifestEnvironment EnvironmentType { get; } + /// The service feature flag. + public ServiceFeatureFlagAction ServiceFeatureFlag { get; } + /// The resource types to include. + public IList IncludeResourceTypes { get; } + /// The resource types to exclude. + public IList ExcludeResourceTypes { get; } + /// The manifest level fields to override. + internal ManifestLevelPropertyBag OverrideManifestLevelFields { get; } + /// The resource hydration accounts. + public IList OverrideManifestLevelFieldsResourceHydrationAccounts + { + get => OverrideManifestLevelFields?.ResourceHydrationAccounts; + } + + /// The endpoint level fields to override. + public ResourceTypeEndpointBase OverrideEndpointLevelFields { get; } + /// The fields to ignore. + public IList IgnoreFields { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.Serialization.cs index b47992858272..4c455ddaba29 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.Serialization.cs @@ -34,15 +34,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProviderHubExtendedLocationOptions)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExtendedLocationOptionsType)) + if (Optional.IsDefined(LocationType)) { writer.WritePropertyName("type"u8); - writer.WriteStringValue(ExtendedLocationOptionsType); + writer.WriteStringValue(LocationType.Value.ToString()); } - if (Optional.IsDefined(SupportedPolicy)) + if (Optional.IsDefined(SupportedLocationPolicy)) { writer.WritePropertyName("supportedPolicy"u8); - writer.WriteStringValue(SupportedPolicy); + writer.WriteStringValue(SupportedLocationPolicy.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -81,20 +81,28 @@ internal static ProviderHubExtendedLocationOptions DeserializeProviderHubExtende { return null; } - string type = default; - string supportedPolicy = default; + ProviderExtendedLocationType? type = default; + ResourceTypeExtendedLocationPolicy? supportedPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type"u8)) { - type = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ProviderExtendedLocationType(property.Value.GetString()); continue; } if (property.NameEquals("supportedPolicy"u8)) { - supportedPolicy = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + supportedPolicy = new ResourceTypeExtendedLocationPolicy(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.cs index 708c43c14d84..82e124a6a857 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubExtendedLocationOptions.cs @@ -51,19 +51,19 @@ public ProviderHubExtendedLocationOptions() } /// Initializes a new instance of . - /// - /// + /// The type. + /// /// Keeps track of any properties unknown to the library. - internal ProviderHubExtendedLocationOptions(string extendedLocationOptionsType, string supportedPolicy, IDictionary serializedAdditionalRawData) + internal ProviderHubExtendedLocationOptions(ProviderExtendedLocationType? locationType, ResourceTypeExtendedLocationPolicy? supportedLocationPolicy, IDictionary serializedAdditionalRawData) { - ExtendedLocationOptionsType = extendedLocationOptionsType; - SupportedPolicy = supportedPolicy; + LocationType = locationType; + SupportedLocationPolicy = supportedLocationPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the extended location options type. - public string ExtendedLocationOptionsType { get; set; } - /// Gets or sets the supported policy. - public string SupportedPolicy { get; set; } + /// The type. + public ProviderExtendedLocationType? LocationType { get; set; } + /// Gets or sets the supported location policy. + public ResourceTypeExtendedLocationPolicy? SupportedLocationPolicy { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.Serialization.cs index a31017621dd5..f8b575f1bcee 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.Serialization.cs @@ -54,6 +54,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("thirdPartyProviderAuthorization"u8); writer.WriteObjectValue(ThirdPartyProviderAuthorization, options); } + if (Optional.IsDefined(DirectRpRoleDefinitionId)) + { + writer.WritePropertyName("directRpRoleDefinitionId"u8); + writer.WriteStringValue(DirectRpRoleDefinitionId); + } + if (Optional.IsDefined(RegionalAsyncOperationResourceTypeName)) + { + writer.WritePropertyName("regionalAsyncOperationResourceTypeName"u8); + writer.WriteStringValue(RegionalAsyncOperationResourceTypeName); + } + if (Optional.IsDefined(GlobalAsyncOperationResourceTypeName)) + { + writer.WritePropertyName("globalAsyncOperationResourceTypeName"u8); + writer.WriteStringValue(GlobalAsyncOperationResourceTypeName); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -94,6 +109,9 @@ internal static ProviderHubMetadata DeserializeProviderHubMetadata(JsonElement e IList providerAuthorizations = default; ResourceProviderAuthentication providerAuthentication = default; ThirdPartyProviderAuthorization thirdPartyProviderAuthorization = default; + string directRpRoleDefinitionId = default; + string regionalAsyncOperationResourceTypeName = default; + string globalAsyncOperationResourceTypeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -130,13 +148,35 @@ internal static ProviderHubMetadata DeserializeProviderHubMetadata(JsonElement e thirdPartyProviderAuthorization = ThirdPartyProviderAuthorization.DeserializeThirdPartyProviderAuthorization(property.Value, options); continue; } + if (property.NameEquals("directRpRoleDefinitionId"u8)) + { + directRpRoleDefinitionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("regionalAsyncOperationResourceTypeName"u8)) + { + regionalAsyncOperationResourceTypeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("globalAsyncOperationResourceTypeName"u8)) + { + globalAsyncOperationResourceTypeName = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ProviderHubMetadata(providerAuthorizations ?? new ChangeTrackingList(), providerAuthentication, thirdPartyProviderAuthorization, serializedAdditionalRawData); + return new ProviderHubMetadata( + providerAuthorizations ?? new ChangeTrackingList(), + providerAuthentication, + thirdPartyProviderAuthorization, + directRpRoleDefinitionId, + regionalAsyncOperationResourceTypeName, + globalAsyncOperationResourceTypeName, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.cs index 97b4730dee8b..1f48ec47bda2 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderHubMetadata.cs @@ -52,30 +52,42 @@ public ProviderHubMetadata() } /// Initializes a new instance of . - /// - /// - /// + /// The provider authorizations. + /// The provider authentication. + /// The third party provider authorization. + /// The direct RP role definition id. + /// The regional async operation resource type name. + /// The global async operation resource type name. /// Keeps track of any properties unknown to the library. - internal ProviderHubMetadata(IList providerAuthorizations, ResourceProviderAuthentication providerAuthentication, ThirdPartyProviderAuthorization thirdPartyProviderAuthorization, IDictionary serializedAdditionalRawData) + internal ProviderHubMetadata(IList providerAuthorizations, ResourceProviderAuthentication providerAuthentication, ThirdPartyProviderAuthorization thirdPartyProviderAuthorization, string directRpRoleDefinitionId, string regionalAsyncOperationResourceTypeName, string globalAsyncOperationResourceTypeName, IDictionary serializedAdditionalRawData) { ProviderAuthorizations = providerAuthorizations; ProviderAuthentication = providerAuthentication; ThirdPartyProviderAuthorization = thirdPartyProviderAuthorization; + DirectRpRoleDefinitionId = directRpRoleDefinitionId; + RegionalAsyncOperationResourceTypeName = regionalAsyncOperationResourceTypeName; + GlobalAsyncOperationResourceTypeName = globalAsyncOperationResourceTypeName; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the provider authorizations. + /// The provider authorizations. public IList ProviderAuthorizations { get; } - /// Gets or sets the provider authentication. + /// The provider authentication. internal ResourceProviderAuthentication ProviderAuthentication { get; set; } - /// Gets or sets the provider authentication allowed audiences. + /// The allowed audiences. public IList ProviderAuthenticationAllowedAudiences { get => ProviderAuthentication is null ? default : ProviderAuthentication.AllowedAudiences; set => ProviderAuthentication = new ResourceProviderAuthentication(value); } - /// Gets or sets the third party provider authorization. + /// The third party provider authorization. public ThirdPartyProviderAuthorization ThirdPartyProviderAuthorization { get; set; } + /// The direct RP role definition id. + public string DirectRpRoleDefinitionId { get; set; } + /// The regional async operation resource type name. + public string RegionalAsyncOperationResourceTypeName { get; set; } + /// The global async operation resource type name. + public string GlobalAsyncOperationResourceTypeName { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLegacyOperation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLegacyOperation.cs new file mode 100644 index 000000000000..5291ef8b964b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLegacyOperation.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderLegacyOperation. + public readonly partial struct ProviderLegacyOperation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderLegacyOperation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string CreateValue = "Create"; + private const string DeleteValue = "Delete"; + private const string WaitingValue = "Waiting"; + private const string AzureAsyncOperationWaitingValue = "AzureAsyncOperationWaiting"; + private const string ResourceCacheWaitingValue = "ResourceCacheWaiting"; + private const string ActionValue = "Action"; + private const string ReadValue = "Read"; + private const string EvaluateDeploymentOutputValue = "EvaluateDeploymentOutput"; + private const string DeploymentCleanupValue = "DeploymentCleanup"; + + /// NotSpecified. + public static ProviderLegacyOperation NotSpecified { get; } = new ProviderLegacyOperation(NotSpecifiedValue); + /// Create. + public static ProviderLegacyOperation Create { get; } = new ProviderLegacyOperation(CreateValue); + /// Delete. + public static ProviderLegacyOperation Delete { get; } = new ProviderLegacyOperation(DeleteValue); + /// Waiting. + public static ProviderLegacyOperation Waiting { get; } = new ProviderLegacyOperation(WaitingValue); + /// AzureAsyncOperationWaiting. + public static ProviderLegacyOperation AzureAsyncOperationWaiting { get; } = new ProviderLegacyOperation(AzureAsyncOperationWaitingValue); + /// ResourceCacheWaiting. + public static ProviderLegacyOperation ResourceCacheWaiting { get; } = new ProviderLegacyOperation(ResourceCacheWaitingValue); + /// Action. + public static ProviderLegacyOperation Action { get; } = new ProviderLegacyOperation(ActionValue); + /// Read. + public static ProviderLegacyOperation Read { get; } = new ProviderLegacyOperation(ReadValue); + /// EvaluateDeploymentOutput. + public static ProviderLegacyOperation EvaluateDeploymentOutput { get; } = new ProviderLegacyOperation(EvaluateDeploymentOutputValue); + /// DeploymentCleanup. + public static ProviderLegacyOperation DeploymentCleanup { get; } = new ProviderLegacyOperation(DeploymentCleanupValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderLegacyOperation left, ProviderLegacyOperation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderLegacyOperation left, ProviderLegacyOperation right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderLegacyOperation(string value) => new ProviderLegacyOperation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderLegacyOperation other && Equals(other); + /// + public bool Equals(ProviderLegacyOperation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLocationQuotaRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLocationQuotaRule.Serialization.cs new file mode 100644 index 000000000000..ba9ea46b6a7c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLocationQuotaRule.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderLocationQuotaRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderLocationQuotaRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Policy)) + { + writer.WritePropertyName("policy"u8); + writer.WriteStringValue(Policy.Value.ToString()); + } + if (Optional.IsDefined(QuotaId)) + { + writer.WritePropertyName("quotaId"u8); + writer.WriteStringValue(QuotaId); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderLocationQuotaRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderLocationQuotaRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderLocationQuotaRule(document.RootElement, options); + } + + internal static ProviderLocationQuotaRule DeserializeProviderLocationQuotaRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderQuotaPolicy? policy = default; + string quotaId = default; + AzureLocation? location = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = new ProviderQuotaPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("quotaId"u8)) + { + quotaId = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderLocationQuotaRule(policy, quotaId, location, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderLocationQuotaRule)} does not support writing '{options.Format}' format."); + } + } + + ProviderLocationQuotaRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderLocationQuotaRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderLocationQuotaRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLocationQuotaRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLocationQuotaRule.cs new file mode 100644 index 000000000000..d41ec074e41d --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderLocationQuotaRule.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderLocationQuotaRule. + public partial class ProviderLocationQuotaRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderLocationQuotaRule() + { + } + + /// Initializes a new instance of . + /// The policy. + /// The quota id. + /// The location. + /// Keeps track of any properties unknown to the library. + internal ProviderLocationQuotaRule(ProviderQuotaPolicy? policy, string quotaId, AzureLocation? location, IDictionary serializedAdditionalRawData) + { + Policy = policy; + QuotaId = quotaId; + Location = location; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The policy. + public ProviderQuotaPolicy? Policy { get; set; } + /// The quota id. + public string QuotaId { get; set; } + /// The location. + public AzureLocation? Location { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingArrayResponseWithContinuation.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingArrayResponseWithContinuation.Serialization.cs new file mode 100644 index 000000000000..5c7aca1fdaf6 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingArrayResponseWithContinuation.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ProviderMonitorSettingArrayResponseWithContinuation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderMonitorSettingArrayResponseWithContinuation)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderMonitorSettingArrayResponseWithContinuation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderMonitorSettingArrayResponseWithContinuation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement, options); + } + + internal static ProviderMonitorSettingArrayResponseWithContinuation DeserializeProviderMonitorSettingArrayResponseWithContinuation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderMonitorSettingArrayResponseWithContinuation(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderMonitorSettingArrayResponseWithContinuation)} does not support writing '{options.Format}' format."); + } + } + + ProviderMonitorSettingArrayResponseWithContinuation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderMonitorSettingArrayResponseWithContinuation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingArrayResponseWithContinuation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingArrayResponseWithContinuation.cs new file mode 100644 index 000000000000..f6966c885784 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingArrayResponseWithContinuation.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderMonitorSettingArrayResponseWithContinuation. + internal partial class ProviderMonitorSettingArrayResponseWithContinuation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ProviderMonitorSettingArrayResponseWithContinuation() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The URL to get to the next set of results, if there are any. + /// Keeps track of any properties unknown to the library. + internal ProviderMonitorSettingArrayResponseWithContinuation(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + /// The URL to get to the next set of results, if there are any. + public string NextLink { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingProperties.Serialization.cs new file mode 100644 index 000000000000..ccf26fbc77ac --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ProviderMonitorSettingProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderMonitorSettingProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderMonitorSettingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderMonitorSettingProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderMonitorSettingProperties(document.RootElement, options); + } + + internal static ProviderMonitorSettingProperties DeserializeProviderMonitorSettingProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderHubProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProviderHubProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderMonitorSettingProperties(provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderMonitorSettingProperties)} does not support writing '{options.Format}' format."); + } + } + + ProviderMonitorSettingProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderMonitorSettingProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderMonitorSettingProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingProperties.cs new file mode 100644 index 000000000000..90d833e78008 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderMonitorSettingProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderMonitorSettingProperties. + internal partial class ProviderMonitorSettingProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderMonitorSettingProperties() + { + } + + /// Initializes a new instance of . + /// The provisioning state. + /// Keeps track of any properties unknown to the library. + internal ProviderMonitorSettingProperties(ProviderHubProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The provisioning state. + public ProviderHubProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotification.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotification.Serialization.cs new file mode 100644 index 000000000000..afcad83627ed --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotification.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderNotification : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderNotification)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NotificationType)) + { + writer.WritePropertyName("notificationType"u8); + writer.WriteStringValue(NotificationType.Value.ToString()); + } + if (Optional.IsDefined(SkipNotifications)) + { + writer.WritePropertyName("skipNotifications"u8); + writer.WriteStringValue(SkipNotifications.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderNotification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderNotification)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderNotification(document.RootElement, options); + } + + internal static ProviderNotification DeserializeProviderNotification(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderNotificationType? notificationType = default; + SkipNotification? skipNotifications = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notificationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notificationType = new ProviderNotificationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("skipNotifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + skipNotifications = new SkipNotification(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderNotification(notificationType, skipNotifications, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderNotification)} does not support writing '{options.Format}' format."); + } + } + + ProviderNotification IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderNotification(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderNotification)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotification.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotification.cs new file mode 100644 index 000000000000..c26e29124b25 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotification.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderNotification. + public partial class ProviderNotification + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderNotification() + { + } + + /// Initializes a new instance of . + /// The notification type. + /// Whether notifications should be skipped. + /// Keeps track of any properties unknown to the library. + internal ProviderNotification(ProviderNotificationType? notificationType, SkipNotification? skipNotifications, IDictionary serializedAdditionalRawData) + { + NotificationType = notificationType; + SkipNotifications = skipNotifications; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The notification type. + public ProviderNotificationType? NotificationType { get; set; } + /// Whether notifications should be skipped. + public SkipNotification? SkipNotifications { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationEndpointType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationEndpointType.cs new file mode 100644 index 000000000000..560620dabec3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationEndpointType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The endpoint type. + public readonly partial struct ProviderNotificationEndpointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderNotificationEndpointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WebhookValue = "Webhook"; + private const string EventhubValue = "Eventhub"; + + /// Webhook. + public static ProviderNotificationEndpointType Webhook { get; } = new ProviderNotificationEndpointType(WebhookValue); + /// Eventhub. + public static ProviderNotificationEndpointType Eventhub { get; } = new ProviderNotificationEndpointType(EventhubValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderNotificationEndpointType left, ProviderNotificationEndpointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderNotificationEndpointType left, ProviderNotificationEndpointType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderNotificationEndpointType(string value) => new ProviderNotificationEndpointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderNotificationEndpointType other && Equals(other); + /// + public bool Equals(ProviderNotificationEndpointType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationOption.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationOption.cs new file mode 100644 index 000000000000..a3be8efcf1d4 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationOption.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Notification options. + public readonly partial struct ProviderNotificationOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderNotificationOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string NoneValue = "None"; + private const string EmitSpendingLimitValue = "EmitSpendingLimit"; + + /// NotSpecified. + public static ProviderNotificationOption NotSpecified { get; } = new ProviderNotificationOption(NotSpecifiedValue); + /// None. + public static ProviderNotificationOption None { get; } = new ProviderNotificationOption(NoneValue); + /// EmitSpendingLimit. + public static ProviderNotificationOption EmitSpendingLimit { get; } = new ProviderNotificationOption(EmitSpendingLimitValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderNotificationOption left, ProviderNotificationOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderNotificationOption left, ProviderNotificationOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderNotificationOption(string value) => new ProviderNotificationOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderNotificationOption other && Equals(other); + /// + public bool Equals(ProviderNotificationOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationType.cs new file mode 100644 index 000000000000..64c8de41c107 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderNotificationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The notification type. + public readonly partial struct ProviderNotificationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderNotificationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnspecifiedValue = "Unspecified"; + private const string SubscriptionNotificationValue = "SubscriptionNotification"; + + /// Unspecified. + public static ProviderNotificationType Unspecified { get; } = new ProviderNotificationType(UnspecifiedValue); + /// SubscriptionNotification. + public static ProviderNotificationType SubscriptionNotification { get; } = new ProviderNotificationType(SubscriptionNotificationValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderNotificationType left, ProviderNotificationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderNotificationType left, ProviderNotificationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderNotificationType(string value) => new ProviderNotificationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderNotificationType other && Equals(other); + /// + public bool Equals(ProviderNotificationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaPolicy.cs new file mode 100644 index 000000000000..e14a6ed526e7 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaPolicy.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderQuotaPolicy. + public readonly partial struct ProviderQuotaPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderQuotaPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "Default"; + private const string NoneValue = "None"; + private const string RestrictedValue = "Restricted"; + + /// Default. + public static ProviderQuotaPolicy Default { get; } = new ProviderQuotaPolicy(DefaultValue); + /// None. + public static ProviderQuotaPolicy None { get; } = new ProviderQuotaPolicy(NoneValue); + /// Restricted. + public static ProviderQuotaPolicy Restricted { get; } = new ProviderQuotaPolicy(RestrictedValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderQuotaPolicy left, ProviderQuotaPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderQuotaPolicy left, ProviderQuotaPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderQuotaPolicy(string value) => new ProviderQuotaPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderQuotaPolicy other && Equals(other); + /// + public bool Equals(ProviderQuotaPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaRule.Serialization.cs new file mode 100644 index 000000000000..e76da0676da3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaRule.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderQuotaRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderQuotaRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(QuotaPolicy)) + { + writer.WritePropertyName("quotaPolicy"u8); + writer.WriteStringValue(QuotaPolicy.Value.ToString()); + } + if (Optional.IsCollectionDefined(LocationRules)) + { + writer.WritePropertyName("locationRules"u8); + writer.WriteStartArray(); + foreach (var item in LocationRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RequiredFeatures)) + { + writer.WritePropertyName("requiredFeatures"u8); + writer.WriteStartArray(); + foreach (var item in RequiredFeatures) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderQuotaRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderQuotaRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderQuotaRule(document.RootElement, options); + } + + internal static ProviderQuotaRule DeserializeProviderQuotaRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderQuotaPolicy? quotaPolicy = default; + IList locationRules = default; + IList requiredFeatures = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("quotaPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quotaPolicy = new ProviderQuotaPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("locationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderLocationQuotaRule.DeserializeProviderLocationQuotaRule(item, options)); + } + locationRules = array; + continue; + } + if (property.NameEquals("requiredFeatures"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredFeatures = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderQuotaRule(quotaPolicy, locationRules ?? new ChangeTrackingList(), requiredFeatures ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderQuotaRule)} does not support writing '{options.Format}' format."); + } + } + + ProviderQuotaRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderQuotaRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderQuotaRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaRule.cs new file mode 100644 index 000000000000..a78071be8789 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderQuotaRule.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderQuotaRule. + public partial class ProviderQuotaRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderQuotaRule() + { + LocationRules = new ChangeTrackingList(); + RequiredFeatures = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The quota policy. + /// The location rules. + /// The required features. + /// Keeps track of any properties unknown to the library. + internal ProviderQuotaRule(ProviderQuotaPolicy? quotaPolicy, IList locationRules, IList requiredFeatures, IDictionary serializedAdditionalRawData) + { + QuotaPolicy = quotaPolicy; + LocationRules = locationRules; + RequiredFeatures = requiredFeatures; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The quota policy. + public ProviderQuotaPolicy? QuotaPolicy { get; set; } + /// The location rules. + public IList LocationRules { get; } + /// The required features. + public IList RequiredFeatures { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationKind.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationKind.cs new file mode 100644 index 000000000000..4f94074cbb98 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationKind.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Provider registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. + public readonly partial struct ProviderRegistrationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderRegistrationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManagedValue = "Managed"; + private const string HybridValue = "Hybrid"; + private const string DirectValue = "Direct"; + + /// Resource Provider with all the resource types 'managed' by the ProviderHub service. + public static ProviderRegistrationKind Managed { get; } = new ProviderRegistrationKind(ManagedValue); + /// Resource Provider with a mix of 'managed' and 'direct' resource types. + public static ProviderRegistrationKind Hybrid { get; } = new ProviderRegistrationKind(HybridValue); + /// Resource Provider with all the resource types 'managed' on by itself. + public static ProviderRegistrationKind Direct { get; } = new ProviderRegistrationKind(DirectValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderRegistrationKind left, ProviderRegistrationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderRegistrationKind left, ProviderRegistrationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderRegistrationKind(string value) => new ProviderRegistrationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderRegistrationKind other && Equals(other); + /// + public bool Equals(ProviderRegistrationKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationListResult.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationListResult.cs index 5e10dc04f8a1..94ddba26e4a0 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationListResult.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationListResult.cs @@ -52,7 +52,7 @@ internal ProviderRegistrationListResult() } /// Initializes a new instance of . - /// + /// The value. /// The URL to get to the next set of results, if there are any. /// Keeps track of any properties unknown to the library. internal ProviderRegistrationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) @@ -62,7 +62,7 @@ internal ProviderRegistrationListResult(IReadOnlyList _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// The value. public IReadOnlyList Value { get; } /// The URL to get to the next set of results, if there are any. public string NextLink { get; } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.Serialization.cs index 20aabaed8de1..e5f95b68216f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.Serialization.cs @@ -40,7 +40,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("providerHubMetadata"u8); writer.WriteObjectValue(ProviderHubMetadata, options); } - if (Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); @@ -50,6 +50,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("subscriptionLifecycleNotificationSpecifications"u8); writer.WriteObjectValue(SubscriptionLifecycleNotificationSpecifications, options); } + if (Optional.IsDefined(PrivateResourceProviderConfiguration)) + { + writer.WritePropertyName("privateResourceProviderConfiguration"u8); + writer.WriteObjectValue(PrivateResourceProviderConfiguration, options); + } + if (Optional.IsDefined(TokenAuthConfiguration)) + { + writer.WritePropertyName("tokenAuthConfiguration"u8); + writer.WriteObjectValue(TokenAuthConfiguration, options); + } } ProviderRegistrationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -75,18 +85,39 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr ProviderHubMetadata providerHubMetadata = default; ProviderHubProvisioningState? provisioningState = default; SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications = default; + ProviderRegistrationPropertiesPrivateResourceProviderConfiguration privateResourceProviderConfiguration = default; + TokenAuthConfiguration tokenAuthConfiguration = default; ResourceProviderAuthentication providerAuthentication = default; IList providerAuthorizations = default; string @namespace = default; + IList services = default; + string serviceName = default; string providerVersion = default; ResourceProviderType? providerType = default; IList requiredFeatures = default; - FeaturesRule featuresRule = default; - RequestHeaderOptions requestHeaderOptions = default; + ProviderFeaturesRule featuresRule = default; + ProviderRequestHeaderOptions requestHeaderOptions = default; ResourceProviderManagement management = default; IList capabilities = default; + CrossTenantTokenValidation? crossTenantTokenValidation = default; BinaryData metadata = default; TemplateDeploymentOptions templateDeploymentOptions = default; + IList globalNotificationEndpoints = default; + bool? enableTenantLinkedNotification = default; + IList notifications = default; + IList linkedNotificationRules = default; + ResourceProviderAuthorizationRules resourceProviderAuthorizationRules = default; + ProviderDstsConfiguration dstsConfiguration = default; + ProviderNotificationOption? notificationOptions = default; + IList resourceHydrationAccounts = default; + ResourceProviderManifestNotificationSettings notificationSettings = default; + IList managementGroupGlobalNotificationEndpoints = default; + IList optionalFeatures = default; + ResourceProviderManifestResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove = default; + ResourceProviderManifestResponseOptions responseOptions = default; + string legacyNamespace = default; + IList legacyRegistrations = default; + string customManifestVersion = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -118,6 +149,24 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr subscriptionLifecycleNotificationSpecifications = SubscriptionLifecycleNotificationSpecifications.DeserializeSubscriptionLifecycleNotificationSpecifications(property.Value, options); continue; } + if (property.NameEquals("privateResourceProviderConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateResourceProviderConfiguration = ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.DeserializeProviderRegistrationPropertiesPrivateResourceProviderConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("tokenAuthConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenAuthConfiguration = TokenAuthConfiguration.DeserializeTokenAuthConfiguration(property.Value, options); + continue; + } if (property.NameEquals("providerAuthentication"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,6 +195,25 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr @namespace = property.Value.GetString(); continue; } + if (property.NameEquals("services"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderService.DeserializeResourceProviderService(item, options)); + } + services = array; + continue; + } + if (property.NameEquals("serviceName"u8)) + { + serviceName = property.Value.GetString(); + continue; + } if (property.NameEquals("providerVersion"u8)) { providerVersion = property.Value.GetString(); @@ -180,7 +248,7 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr { continue; } - featuresRule = FeaturesRule.DeserializeFeaturesRule(property.Value, options); + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); continue; } if (property.NameEquals("requestHeaderOptions"u8)) @@ -189,7 +257,7 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr { continue; } - requestHeaderOptions = RequestHeaderOptions.DeserializeRequestHeaderOptions(property.Value, options); + requestHeaderOptions = ProviderRequestHeaderOptions.DeserializeProviderRequestHeaderOptions(property.Value, options); continue; } if (property.NameEquals("management"u8)) @@ -215,6 +283,15 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr capabilities = array; continue; } + if (property.NameEquals("crossTenantTokenValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crossTenantTokenValidation = new CrossTenantTokenValidation(property.Value.GetString()); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -233,6 +310,178 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr templateDeploymentOptions = TemplateDeploymentOptions.DeserializeTemplateDeploymentOptions(property.Value, options); continue; } + if (property.NameEquals("globalNotificationEndpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderEndpoint.DeserializeResourceProviderEndpoint(item, options)); + } + globalNotificationEndpoints = array; + continue; + } + if (property.NameEquals("enableTenantLinkedNotification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + enableTenantLinkedNotification = null; + continue; + } + enableTenantLinkedNotification = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("notifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderNotification.DeserializeProviderNotification(item, options)); + } + notifications = array; + continue; + } + if (property.NameEquals("linkedNotificationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FanoutLinkedNotificationRule.DeserializeFanoutLinkedNotificationRule(item, options)); + } + linkedNotificationRules = array; + continue; + } + if (property.NameEquals("resourceProviderAuthorizationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceProviderAuthorizationRules = ResourceProviderAuthorizationRules.DeserializeResourceProviderAuthorizationRules(property.Value, options); + continue; + } + if (property.NameEquals("dstsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dstsConfiguration = ProviderDstsConfiguration.DeserializeProviderDstsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("notificationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notificationOptions = new ProviderNotificationOption(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceHydrationAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceHydrationAccount.DeserializeResourceHydrationAccount(item, options)); + } + resourceHydrationAccounts = array; + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notificationSettings = ResourceProviderManifestNotificationSettings.DeserializeResourceProviderManifestNotificationSettings(property.Value, options); + continue; + } + if (property.NameEquals("managementGroupGlobalNotificationEndpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderEndpoint.DeserializeResourceProviderEndpoint(item, options)); + } + managementGroupGlobalNotificationEndpoints = array; + continue; + } + if (property.NameEquals("optionalFeatures"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + optionalFeatures = array; + continue; + } + if (property.NameEquals("resourceGroupLockOptionDuringMove"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGroupLockOptionDuringMove = ResourceProviderManifestResourceGroupLockOptionDuringMove.DeserializeResourceProviderManifestResourceGroupLockOptionDuringMove(property.Value, options); + continue; + } + if (property.NameEquals("responseOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + responseOptions = ResourceProviderManifestResponseOptions.DeserializeResourceProviderManifestResponseOptions(property.Value, options); + continue; + } + if (property.NameEquals("legacyNamespace"u8)) + { + legacyNamespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("legacyRegistrations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + legacyRegistrations = array; + continue; + } + if (property.NameEquals("customManifestVersion"u8)) + { + customManifestVersion = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -243,6 +492,8 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr providerAuthentication, providerAuthorizations ?? new ChangeTrackingList(), @namespace, + services ?? new ChangeTrackingList(), + serviceName, providerVersion, providerType, requiredFeatures ?? new ChangeTrackingList(), @@ -250,12 +501,31 @@ internal static ProviderRegistrationProperties DeserializeProviderRegistrationPr requestHeaderOptions, management, capabilities ?? new ChangeTrackingList(), + crossTenantTokenValidation, metadata, templateDeploymentOptions, + globalNotificationEndpoints ?? new ChangeTrackingList(), + enableTenantLinkedNotification, + notifications ?? new ChangeTrackingList(), + linkedNotificationRules ?? new ChangeTrackingList(), + resourceProviderAuthorizationRules, + dstsConfiguration, + notificationOptions, + resourceHydrationAccounts ?? new ChangeTrackingList(), + notificationSettings, + managementGroupGlobalNotificationEndpoints ?? new ChangeTrackingList(), + optionalFeatures ?? new ChangeTrackingList(), + resourceGroupLockOptionDuringMove, + responseOptions, + legacyNamespace, + legacyRegistrations ?? new ChangeTrackingList(), + customManifestVersion, serializedAdditionalRawData, providerHubMetadata, provisioningState, - subscriptionLifecycleNotificationSpecifications); + subscriptionLifecycleNotificationSpecifications, + privateResourceProviderConfiguration, + tokenAuthConfiguration); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.cs index e1dddd3f190d..abb90ed4db28 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationProperties.cs @@ -19,34 +19,70 @@ public ProviderRegistrationProperties() } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Anything. - /// + /// The provider authentication. + /// The provider authorizations. + /// The namespace. + /// The services. + /// The service name. + /// The provider version. + /// The provider type. + /// The required features. + /// The features rule. + /// The request header options. + /// The resource provider management. + /// The capabilities. + /// The cross tenant token validation. + /// The metadata. + /// The template deployment options. + /// The global notification endpoints. + /// The enable tenant linked notification. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. + /// The dsts configuration. + /// Notification options. + /// resource hydration accounts. + /// Notification settings. + /// Management groups global notification endpoints. + /// Optional features. + /// Resource group lock option during move. + /// Response options. + /// Legacy namespace. + /// Legacy registrations. + /// Custom manifest version. /// Keeps track of any properties unknown to the library. - /// - /// - /// - internal ProviderRegistrationProperties(ResourceProviderAuthentication providerAuthentication, IList providerAuthorizations, string @namespace, string providerVersion, ResourceProviderType? providerType, IList requiredFeatures, FeaturesRule featuresRule, RequestHeaderOptions requestHeaderOptions, ResourceProviderManagement management, IList capabilities, BinaryData metadata, TemplateDeploymentOptions templateDeploymentOptions, IDictionary serializedAdditionalRawData, ProviderHubMetadata providerHubMetadata, ProviderHubProvisioningState? provisioningState, SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications) : base(providerAuthentication, providerAuthorizations, @namespace, providerVersion, providerType, requiredFeatures, featuresRule, requestHeaderOptions, management, capabilities, metadata, templateDeploymentOptions, serializedAdditionalRawData) + /// The provider hub metadata. + /// The provisioning state. + /// The subscription lifecycle notification specifications. + /// The private resource provider configuration. + /// The token auth configuration. + internal ProviderRegistrationProperties(ResourceProviderAuthentication providerAuthentication, IList providerAuthorizations, string @namespace, IList services, string serviceName, string providerVersion, ResourceProviderType? providerType, IList requiredFeatures, ProviderFeaturesRule featuresRule, ProviderRequestHeaderOptions requestHeaderOptions, ResourceProviderManagement management, IList capabilities, CrossTenantTokenValidation? crossTenantTokenValidation, BinaryData metadata, TemplateDeploymentOptions templateDeploymentOptions, IList globalNotificationEndpoints, bool? enableTenantLinkedNotification, IList notifications, IList linkedNotificationRules, ResourceProviderAuthorizationRules resourceProviderAuthorizationRules, ProviderDstsConfiguration dstsConfiguration, ProviderNotificationOption? notificationOptions, IList resourceHydrationAccounts, ResourceProviderManifestNotificationSettings notificationSettings, IList managementGroupGlobalNotificationEndpoints, IList optionalFeatures, ResourceProviderManifestResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove, ResourceProviderManifestResponseOptions responseOptions, string legacyNamespace, IList legacyRegistrations, string customManifestVersion, IDictionary serializedAdditionalRawData, ProviderHubMetadata providerHubMetadata, ProviderHubProvisioningState? provisioningState, SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications, ProviderRegistrationPropertiesPrivateResourceProviderConfiguration privateResourceProviderConfiguration, TokenAuthConfiguration tokenAuthConfiguration) : base(providerAuthentication, providerAuthorizations, @namespace, services, serviceName, providerVersion, providerType, requiredFeatures, featuresRule, requestHeaderOptions, management, capabilities, crossTenantTokenValidation, metadata, templateDeploymentOptions, globalNotificationEndpoints, enableTenantLinkedNotification, notifications, linkedNotificationRules, resourceProviderAuthorizationRules, dstsConfiguration, notificationOptions, resourceHydrationAccounts, notificationSettings, managementGroupGlobalNotificationEndpoints, optionalFeatures, resourceGroupLockOptionDuringMove, responseOptions, legacyNamespace, legacyRegistrations, customManifestVersion, serializedAdditionalRawData) { ProviderHubMetadata = providerHubMetadata; ProvisioningState = provisioningState; SubscriptionLifecycleNotificationSpecifications = subscriptionLifecycleNotificationSpecifications; + PrivateResourceProviderConfiguration = privateResourceProviderConfiguration; + TokenAuthConfiguration = tokenAuthConfiguration; } - /// Gets or sets the provider hub metadata. + /// The provider hub metadata. public ProviderHubMetadata ProviderHubMetadata { get; set; } - /// Gets or sets the provisioning state. - public ProviderHubProvisioningState? ProvisioningState { get; set; } - /// Gets or sets the subscription lifecycle notification specifications. + /// The subscription lifecycle notification specifications. public SubscriptionLifecycleNotificationSpecifications SubscriptionLifecycleNotificationSpecifications { get; set; } + /// The private resource provider configuration. + internal ProviderRegistrationPropertiesPrivateResourceProviderConfiguration PrivateResourceProviderConfiguration { get; set; } + /// The allowed subscriptions. + public IList PrivateResourceProviderAllowedSubscriptions + { + get + { + if (PrivateResourceProviderConfiguration is null) + PrivateResourceProviderConfiguration = new ProviderRegistrationPropertiesPrivateResourceProviderConfiguration(); + return PrivateResourceProviderConfiguration.AllowedSubscriptions; + } + } + + /// The token auth configuration. + public TokenAuthConfiguration TokenAuthConfiguration { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.Serialization.cs new file mode 100644 index 000000000000..830ed581b632 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ProviderRegistrationPropertiesPrivateResourceProviderConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderRegistrationPropertiesPrivateResourceProviderConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ProviderRegistrationPropertiesPrivateResourceProviderConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderRegistrationPropertiesPrivateResourceProviderConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderRegistrationPropertiesPrivateResourceProviderConfiguration(document.RootElement, options); + } + + internal static ProviderRegistrationPropertiesPrivateResourceProviderConfiguration DeserializeProviderRegistrationPropertiesPrivateResourceProviderConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedSubscriptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedSubscriptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedSubscriptions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderRegistrationPropertiesPrivateResourceProviderConfiguration(allowedSubscriptions ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderRegistrationPropertiesPrivateResourceProviderConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ProviderRegistrationPropertiesPrivateResourceProviderConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderRegistrationPropertiesPrivateResourceProviderConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderRegistrationPropertiesPrivateResourceProviderConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.cs new file mode 100644 index 000000000000..8284cb205478 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The private resource provider configuration. + internal partial class ProviderRegistrationPropertiesPrivateResourceProviderConfiguration : PrivateResourceProviderConfiguration + { + /// Initializes a new instance of . + public ProviderRegistrationPropertiesPrivateResourceProviderConfiguration() + { + } + + /// Initializes a new instance of . + /// The allowed subscriptions. + /// Keeps track of any properties unknown to the library. + internal ProviderRegistrationPropertiesPrivateResourceProviderConfiguration(IList allowedSubscriptions, IDictionary serializedAdditionalRawData) : base(allowedSubscriptions, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRequestHeaderOptions.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRequestHeaderOptions.Serialization.cs new file mode 100644 index 000000000000..41fe6d5b43a7 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRequestHeaderOptions.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ProviderRequestHeaderOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderRequestHeaderOptions)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(OptInHeaders)) + { + writer.WritePropertyName("optInHeaders"u8); + writer.WriteStringValue(OptInHeaders.Value.ToString()); + } + if (Optional.IsDefined(OptOutHeaders)) + { + writer.WritePropertyName("optOutHeaders"u8); + writer.WriteStringValue(OptOutHeaders.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderRequestHeaderOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderRequestHeaderOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderRequestHeaderOptions(document.RootElement, options); + } + + internal static ProviderRequestHeaderOptions DeserializeProviderRequestHeaderOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OptInHeaderType? optInHeaders = default; + OptOutHeaderType? optOutHeaders = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("optInHeaders"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + optInHeaders = new OptInHeaderType(property.Value.GetString()); + continue; + } + if (property.NameEquals("optOutHeaders"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + optOutHeaders = new OptOutHeaderType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderRequestHeaderOptions(optInHeaders, optOutHeaders, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderRequestHeaderOptions)} does not support writing '{options.Format}' format."); + } + } + + ProviderRequestHeaderOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderRequestHeaderOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderRequestHeaderOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRequestHeaderOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRequestHeaderOptions.cs new file mode 100644 index 000000000000..10814a6ff5dd --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderRequestHeaderOptions.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ProviderRequestHeaderOptions. + public partial class ProviderRequestHeaderOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderRequestHeaderOptions() + { + } + + /// Initializes a new instance of . + /// The opt in headers. + /// The opt out headers. + /// Keeps track of any properties unknown to the library. + internal ProviderRequestHeaderOptions(OptInHeaderType? optInHeaders, OptOutHeaderType? optOutHeaders, IDictionary serializedAdditionalRawData) + { + OptInHeaders = optInHeaders; + OptOutHeaders = optOutHeaders; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The opt in headers. + public OptInHeaderType? OptInHeaders { get; set; } + /// The opt out headers. + public OptOutHeaderType? OptOutHeaders { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryFilterOption.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryFilterOption.cs new file mode 100644 index 000000000000..04dec2389bbe --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryFilterOption.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Filter option. + public readonly partial struct ProviderResourceQueryFilterOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderResourceQueryFilterOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string EnableSubscriptionFilterOnTenantValue = "EnableSubscriptionFilterOnTenant"; + + /// NotSpecified. + public static ProviderResourceQueryFilterOption NotSpecified { get; } = new ProviderResourceQueryFilterOption(NotSpecifiedValue); + /// EnableSubscriptionFilterOnTenant. + public static ProviderResourceQueryFilterOption EnableSubscriptionFilterOnTenant { get; } = new ProviderResourceQueryFilterOption(EnableSubscriptionFilterOnTenantValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderResourceQueryFilterOption left, ProviderResourceQueryFilterOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderResourceQueryFilterOption left, ProviderResourceQueryFilterOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderResourceQueryFilterOption(string value) => new ProviderResourceQueryFilterOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderResourceQueryFilterOption other && Equals(other); + /// + public bool Equals(ProviderResourceQueryFilterOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryManagement.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryManagement.Serialization.cs new file mode 100644 index 000000000000..d0c44b85dc2c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryManagement.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ProviderResourceQueryManagement : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderResourceQueryManagement)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(FilterOption)) + { + writer.WritePropertyName("filterOption"u8); + writer.WriteStringValue(FilterOption.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProviderResourceQueryManagement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderResourceQueryManagement)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderResourceQueryManagement(document.RootElement, options); + } + + internal static ProviderResourceQueryManagement DeserializeProviderResourceQueryManagement(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderResourceQueryFilterOption? filterOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filterOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filterOption = new ProviderResourceQueryFilterOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderResourceQueryManagement(filterOption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderResourceQueryManagement)} does not support writing '{options.Format}' format."); + } + } + + ProviderResourceQueryManagement IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderResourceQueryManagement(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderResourceQueryManagement)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryManagement.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryManagement.cs new file mode 100644 index 000000000000..00994b6b834c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceQueryManagement.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource query management options. + internal partial class ProviderResourceQueryManagement + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderResourceQueryManagement() + { + } + + /// Initializes a new instance of . + /// Filter option. + /// Keeps track of any properties unknown to the library. + internal ProviderResourceQueryManagement(ProviderResourceQueryFilterOption? filterOption, IDictionary serializedAdditionalRawData) + { + FilterOption = filterOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Filter option. + public ProviderResourceQueryFilterOption? FilterOption { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceSubType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceSubType.cs new file mode 100644 index 000000000000..2917e8e0d1f9 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceSubType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The resource sub type. + public readonly partial struct ProviderResourceSubType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProviderResourceSubType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string AsyncOperationValue = "AsyncOperation"; + + /// NotSpecified. + public static ProviderResourceSubType NotSpecified { get; } = new ProviderResourceSubType(NotSpecifiedValue); + /// AsyncOperation. + public static ProviderResourceSubType AsyncOperation { get; } = new ProviderResourceSubType(AsyncOperationValue); + /// Determines if two values are the same. + public static bool operator ==(ProviderResourceSubType left, ProviderResourceSubType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProviderResourceSubType left, ProviderResourceSubType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProviderResourceSubType(string value) => new ProviderResourceSubType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProviderResourceSubType other && Equals(other); + /// + public bool Equals(ProviderResourceSubType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.Serialization.cs index 1b6739dd0836..2a297a281e69 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.Serialization.cs @@ -44,6 +44,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("routingType"u8); writer.WriteStringValue(RoutingType.Value.ToString()); } + if (Optional.IsDefined(AdditionalOptions)) + { + writer.WritePropertyName("additionalOptions"u8); + writer.WriteStringValue(AdditionalOptions.Value.ToString()); + } + if (Optional.IsDefined(CrossTenantTokenValidation)) + { + writer.WritePropertyName("crossTenantTokenValidation"u8); + writer.WriteStringValue(CrossTenantTokenValidation.Value.ToString()); + } if (Optional.IsDefined(ResourceValidation)) { writer.WritePropertyName("resourceValidation"u8); @@ -59,6 +69,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(AllowedUnauthorizedActionsExtensions)) + { + writer.WritePropertyName("allowedUnauthorizedActionsExtensions"u8); + writer.WriteStartArray(); + foreach (var item in AllowedUnauthorizedActionsExtensions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsCollectionDefined(AuthorizationActionMappings)) { writer.WritePropertyName("authorizationActionMappings"u8); @@ -221,6 +241,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("resourceDeletionPolicy"u8); writer.WriteStringValue(ResourceDeletionPolicy.Value.ToString()); } + if (Optional.IsDefined(QuotaRule)) + { + writer.WritePropertyName("quotaRule"u8); + writer.WriteObjectValue(QuotaRule, options); + } + if (Optional.IsCollectionDefined(Notifications)) + { + writer.WritePropertyName("notifications"u8); + writer.WriteStartArray(); + foreach (var item in Notifications) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(LinkedNotificationRules)) + { + writer.WritePropertyName("linkedNotificationRules"u8); + writer.WriteStartArray(); + foreach (var item in LinkedNotificationRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResourceProviderAuthorizationRules)) + { + writer.WritePropertyName("resourceProviderAuthorizationRules"u8); + writer.WriteObjectValue(ResourceProviderAuthorizationRules, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -260,8 +310,11 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement } string name = default; ResourceRoutingType? routingType = default; + AdditionalOptionResourceType? additionalOptions = default; + CrossTenantTokenValidation? crossTenantTokenValidation = default; ResourceValidation? resourceValidation = default; IReadOnlyList allowedUnauthorizedActions = default; + IReadOnlyList allowedUnauthorizedActionsExtensions = default; IReadOnlyList authorizationActionMappings = default; IReadOnlyList linkedAccessChecks = default; string defaultApiVersion = default; @@ -272,16 +325,20 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement IdentityManagement identityManagement = default; BinaryData metadata = default; IReadOnlyList requiredFeatures = default; - FeaturesRule featuresRule = default; + ProviderFeaturesRule featuresRule = default; IReadOnlyList subscriptionStateRules = default; IReadOnlyList serviceTreeInfos = default; - RequestHeaderOptions requestHeaderOptions = default; + ProviderRequestHeaderOptions requestHeaderOptions = default; string skuLink = default; IReadOnlyList disallowedActionVerbs = default; TemplateDeploymentPolicy templateDeploymentPolicy = default; IReadOnlyList extendedLocations = default; IReadOnlyList linkedOperationRules = default; ManifestResourceDeletionPolicy? resourceDeletionPolicy = default; + ProviderQuotaRule quotaRule = default; + IReadOnlyList notifications = default; + IReadOnlyList linkedNotificationRules = default; + ResourceProviderAuthorizationRules resourceProviderAuthorizationRules = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -300,6 +357,24 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement routingType = new ResourceRoutingType(property.Value.GetString()); continue; } + if (property.NameEquals("additionalOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalOptions = new AdditionalOptionResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("crossTenantTokenValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crossTenantTokenValidation = new CrossTenantTokenValidation(property.Value.GetString()); + continue; + } if (property.NameEquals("resourceValidation"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -323,6 +398,20 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement allowedUnauthorizedActions = array; continue; } + if (property.NameEquals("allowedUnauthorizedActionsExtensions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AllowedUnauthorizedActionsExtension.DeserializeAllowedUnauthorizedActionsExtension(item, options)); + } + allowedUnauthorizedActionsExtensions = array; + continue; + } if (property.NameEquals("authorizationActionMappings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -445,7 +534,7 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement { continue; } - featuresRule = FeaturesRule.DeserializeFeaturesRule(property.Value, options); + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); continue; } if (property.NameEquals("subscriptionStateRules"u8)) @@ -482,7 +571,7 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement { continue; } - requestHeaderOptions = RequestHeaderOptions.DeserializeRequestHeaderOptions(property.Value, options); + requestHeaderOptions = ProviderRequestHeaderOptions.DeserializeProviderRequestHeaderOptions(property.Value, options); continue; } if (property.NameEquals("skuLink"u8)) @@ -550,6 +639,52 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement resourceDeletionPolicy = new ManifestResourceDeletionPolicy(property.Value.GetString()); continue; } + if (property.NameEquals("quotaRule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quotaRule = ProviderQuotaRule.DeserializeProviderQuotaRule(property.Value, options); + continue; + } + if (property.NameEquals("notifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderNotification.DeserializeProviderNotification(item, options)); + } + notifications = array; + continue; + } + if (property.NameEquals("linkedNotificationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LinkedNotificationRule.DeserializeLinkedNotificationRule(item, options)); + } + linkedNotificationRules = array; + continue; + } + if (property.NameEquals("resourceProviderAuthorizationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceProviderAuthorizationRules = ResourceProviderAuthorizationRules.DeserializeResourceProviderAuthorizationRules(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -559,8 +694,11 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement return new ProviderResourceType( name, routingType, + additionalOptions, + crossTenantTokenValidation, resourceValidation, allowedUnauthorizedActions ?? new ChangeTrackingList(), + allowedUnauthorizedActionsExtensions ?? new ChangeTrackingList(), authorizationActionMappings ?? new ChangeTrackingList(), linkedAccessChecks ?? new ChangeTrackingList(), defaultApiVersion, @@ -581,6 +719,10 @@ internal static ProviderResourceType DeserializeProviderResourceType(JsonElement extendedLocations ?? new ChangeTrackingList(), linkedOperationRules ?? new ChangeTrackingList(), resourceDeletionPolicy, + quotaRule, + notifications ?? new ChangeTrackingList(), + linkedNotificationRules ?? new ChangeTrackingList(), + resourceProviderAuthorizationRules, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.cs index 3c65a5be4785..d0aebb1a4845 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderResourceType.cs @@ -49,6 +49,7 @@ public partial class ProviderResourceType internal ProviderResourceType() { AllowedUnauthorizedActions = new ChangeTrackingList(); + AllowedUnauthorizedActionsExtensions = new ChangeTrackingList(); AuthorizationActionMappings = new ChangeTrackingList(); LinkedAccessChecks = new ChangeTrackingList(); LoggingRules = new ChangeTrackingList(); @@ -60,40 +61,52 @@ internal ProviderResourceType() DisallowedActionVerbs = new ChangeTrackingList(); ExtendedLocations = new ChangeTrackingList(); LinkedOperationRules = new ChangeTrackingList(); + Notifications = new ChangeTrackingList(); + LinkedNotificationRules = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Anything. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// + /// The resource type name. + /// The resource routing type. + /// The additional options. + /// The cross tenant token validation. + /// The resource validation. + /// The allowed unauthorized actions. + /// The allowed unauthorized actions extensions. + /// The authorization action mappings. + /// The linked access checks. + /// The default api version. + /// The logging rules. + /// The throttling rules. + /// The endpoints. + /// The marketplace type. + /// The identity management. + /// The metadata. + /// The required features. + /// The features rule. + /// The subscription state rules. + /// The service tree infos. + /// The request header options. + /// The sku link. + /// The disallowed action verbs. + /// The template deployment policy. + /// The extended locations. + /// The linked operation rules. + /// The resource deletion policy. + /// The quota rule. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. /// Keeps track of any properties unknown to the library. - internal ProviderResourceType(string name, ResourceRoutingType? routingType, ResourceValidation? resourceValidation, IReadOnlyList allowedUnauthorizedActions, IReadOnlyList authorizationActionMappings, IReadOnlyList linkedAccessChecks, string defaultApiVersion, IReadOnlyList loggingRules, IReadOnlyList throttlingRules, IReadOnlyList endpoints, MarketplaceType? marketplaceType, IdentityManagement identityManagement, BinaryData metadata, IReadOnlyList requiredFeatures, FeaturesRule featuresRule, IReadOnlyList subscriptionStateRules, IReadOnlyList serviceTreeInfos, RequestHeaderOptions requestHeaderOptions, string skuLink, IReadOnlyList disallowedActionVerbs, TemplateDeploymentPolicy templateDeploymentPolicy, IReadOnlyList extendedLocations, IReadOnlyList linkedOperationRules, ManifestResourceDeletionPolicy? resourceDeletionPolicy, IDictionary serializedAdditionalRawData) + internal ProviderResourceType(string name, ResourceRoutingType? routingType, AdditionalOptionResourceType? additionalOptions, CrossTenantTokenValidation? crossTenantTokenValidation, ResourceValidation? resourceValidation, IReadOnlyList allowedUnauthorizedActions, IReadOnlyList allowedUnauthorizedActionsExtensions, IReadOnlyList authorizationActionMappings, IReadOnlyList linkedAccessChecks, string defaultApiVersion, IReadOnlyList loggingRules, IReadOnlyList throttlingRules, IReadOnlyList endpoints, MarketplaceType? marketplaceType, IdentityManagement identityManagement, BinaryData metadata, IReadOnlyList requiredFeatures, ProviderFeaturesRule featuresRule, IReadOnlyList subscriptionStateRules, IReadOnlyList serviceTreeInfos, ProviderRequestHeaderOptions requestHeaderOptions, string skuLink, IReadOnlyList disallowedActionVerbs, TemplateDeploymentPolicy templateDeploymentPolicy, IReadOnlyList extendedLocations, IReadOnlyList linkedOperationRules, ManifestResourceDeletionPolicy? resourceDeletionPolicy, ProviderQuotaRule quotaRule, IReadOnlyList notifications, IReadOnlyList linkedNotificationRules, ResourceProviderAuthorizationRules resourceProviderAuthorizationRules, IDictionary serializedAdditionalRawData) { Name = name; RoutingType = routingType; + AdditionalOptions = additionalOptions; + CrossTenantTokenValidation = crossTenantTokenValidation; ResourceValidation = resourceValidation; AllowedUnauthorizedActions = allowedUnauthorizedActions; + AllowedUnauthorizedActionsExtensions = allowedUnauthorizedActionsExtensions; AuthorizationActionMappings = authorizationActionMappings; LinkedAccessChecks = linkedAccessChecks; DefaultApiVersion = defaultApiVersion; @@ -114,41 +127,51 @@ internal ProviderResourceType(string name, ResourceRoutingType? routingType, Res ExtendedLocations = extendedLocations; LinkedOperationRules = linkedOperationRules; ResourceDeletionPolicy = resourceDeletionPolicy; + QuotaRule = quotaRule; + Notifications = notifications; + LinkedNotificationRules = linkedNotificationRules; + ResourceProviderAuthorizationRules = resourceProviderAuthorizationRules; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the name. + /// The resource type name. public string Name { get; } - /// Gets the routing type. + /// The resource routing type. public ResourceRoutingType? RoutingType { get; } - /// Gets the resource validation. + /// The additional options. + public AdditionalOptionResourceType? AdditionalOptions { get; } + /// The cross tenant token validation. + public CrossTenantTokenValidation? CrossTenantTokenValidation { get; } + /// The resource validation. public ResourceValidation? ResourceValidation { get; } - /// Gets the allowed unauthorized actions. + /// The allowed unauthorized actions. public IReadOnlyList AllowedUnauthorizedActions { get; } - /// Gets the authorization action mappings. + /// The allowed unauthorized actions extensions. + public IReadOnlyList AllowedUnauthorizedActionsExtensions { get; } + /// The authorization action mappings. public IReadOnlyList AuthorizationActionMappings { get; } - /// Gets the linked access checks. + /// The linked access checks. public IReadOnlyList LinkedAccessChecks { get; } - /// Gets the default api version. + /// The default api version. public string DefaultApiVersion { get; } - /// Gets the logging rules. + /// The logging rules. public IReadOnlyList LoggingRules { get; } - /// Gets the throttling rules. + /// The throttling rules. public IReadOnlyList ThrottlingRules { get; } - /// Gets the endpoints. + /// The endpoints. public IReadOnlyList Endpoints { get; } - /// Gets the marketplace type. + /// The marketplace type. public MarketplaceType? MarketplaceType { get; } - /// Gets the identity management. + /// The identity management. internal IdentityManagement IdentityManagement { get; } - /// Gets the management type. + /// The type. public IdentityManagementType? ManagementType { get => IdentityManagement?.ManagementType; } /// - /// Anything + /// The metadata. /// /// To assign an object to this property use . /// @@ -178,39 +201,46 @@ public IdentityManagementType? ManagementType /// /// public BinaryData Metadata { get; } - /// Gets the required features. + /// The required features. public IReadOnlyList RequiredFeatures { get; } - /// Gets the features rule. - internal FeaturesRule FeaturesRule { get; } - /// Gets the required features policy. + /// The features rule. + internal ProviderFeaturesRule FeaturesRule { get; } + /// The required feature policy. public FeaturesPolicy? RequiredFeaturesPolicy { get => FeaturesRule?.RequiredFeaturesPolicy; } - /// Gets the subscription state rules. + /// The subscription state rules. public IReadOnlyList SubscriptionStateRules { get; } - /// Gets the service tree infos. + /// The service tree infos. public IReadOnlyList ServiceTreeInfos { get; } - /// Gets the request header options. - internal RequestHeaderOptions RequestHeaderOptions { get; } - /// Gets the opt in headers. - public OptInHeaderType? OptInHeaders - { - get => RequestHeaderOptions?.OptInHeaders; - } - - /// Gets the sku link. + /// The request header options. + public ProviderRequestHeaderOptions RequestHeaderOptions { get; } + /// The sku link. public string SkuLink { get; } - /// Gets the disallowed action verbs. + /// The disallowed action verbs. public IReadOnlyList DisallowedActionVerbs { get; } - /// Gets the template deployment policy. + /// The template deployment policy. public TemplateDeploymentPolicy TemplateDeploymentPolicy { get; } - /// Gets the extended locations. + /// The extended locations. public IReadOnlyList ExtendedLocations { get; } - /// Gets the linked operation rules. + /// The linked operation rules. public IReadOnlyList LinkedOperationRules { get; } - /// Gets the resource deletion policy. + /// The resource deletion policy. public ManifestResourceDeletionPolicy? ResourceDeletionPolicy { get; } + /// The quota rule. + public ProviderQuotaRule QuotaRule { get; } + /// The notifications. + public IReadOnlyList Notifications { get; } + /// The linked notification rules. + public IReadOnlyList LinkedNotificationRules { get; } + /// The resource provider authorization rules. + internal ResourceProviderAuthorizationRules ResourceProviderAuthorizationRules { get; } + /// The async operation polling rules. + public AsyncOperationPollingRules AsyncOperationPollingRules + { + get => ResourceProviderAuthorizationRules?.AsyncOperationPollingRules; + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionState.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionState.cs index 4cbefafa5fca..2d1823417f1f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionState.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ProviderSubscriptionState. + /// The subscription state. public readonly partial struct ProviderSubscriptionState : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionStateRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionStateRule.cs index 5724e2a03626..1b93ef13897f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionStateRule.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ProviderSubscriptionStateRule.cs @@ -52,8 +52,8 @@ public ProviderSubscriptionStateRule() } /// Initializes a new instance of . - /// - /// + /// The subscription state. + /// The allowed actions. /// Keeps track of any properties unknown to the library. internal ProviderSubscriptionStateRule(ProviderSubscriptionState? state, IList allowedActions, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal ProviderSubscriptionStateRule(ProviderSubscriptionState? state, IList Gets or sets the state. + /// The subscription state. public ProviderSubscriptionState? State { get; set; } - /// Gets the allowed actions. + /// The allowed actions. public IList AllowedActions { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ReRegisterSubscriptionMetadata.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ReRegisterSubscriptionMetadata.cs index c5bbfbe5be14..17c4d0021abf 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ReRegisterSubscriptionMetadata.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ReRegisterSubscriptionMetadata.cs @@ -46,15 +46,15 @@ public partial class ReRegisterSubscriptionMetadata private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// Whether it's enabled or not. internal ReRegisterSubscriptionMetadata(bool isEnabled) { IsEnabled = isEnabled; } /// Initializes a new instance of . - /// - /// + /// Whether it's enabled or not. + /// The concurrency limit. /// Keeps track of any properties unknown to the library. internal ReRegisterSubscriptionMetadata(bool isEnabled, int? concurrencyLimit, IDictionary serializedAdditionalRawData) { @@ -68,9 +68,9 @@ internal ReRegisterSubscriptionMetadata() { } - /// Gets the is enabled. + /// Whether it's enabled or not. public bool IsEnabled { get; } - /// Gets the concurrency limit. + /// The concurrency limit. public int? ConcurrencyLimit { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessPolicy.cs index 860659124841..89377f786713 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessPolicy.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessPolicy.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceAccessPolicy. + /// The resource access policy. public enum ResourceAccessPolicy { /// NotSpecified. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessRole.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessRole.Serialization.cs new file mode 100644 index 000000000000..aa67619f7d4f --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessRole.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceAccessRole : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceAccessRole)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AllowedGroupClaims)) + { + writer.WritePropertyName("allowedGroupClaims"u8); + writer.WriteStartArray(); + foreach (var item in AllowedGroupClaims) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Actions)) + { + writer.WritePropertyName("actions"u8); + writer.WriteStartArray(); + foreach (var item in Actions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceAccessRole IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceAccessRole)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceAccessRole(document.RootElement, options); + } + + internal static ResourceAccessRole DeserializeResourceAccessRole(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedGroupClaims = default; + IList actions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedGroupClaims"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedGroupClaims = array; + continue; + } + if (property.NameEquals("actions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + actions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceAccessRole(allowedGroupClaims ?? new ChangeTrackingList(), actions ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceAccessRole)} does not support writing '{options.Format}' format."); + } + } + + ResourceAccessRole IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceAccessRole(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceAccessRole)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessRole.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessRole.cs new file mode 100644 index 000000000000..b99e25a35b85 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceAccessRole.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceAccessRole. + public partial class ResourceAccessRole + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceAccessRole() + { + AllowedGroupClaims = new ChangeTrackingList(); + Actions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The allowed group claims. + /// The actions. + /// Keeps track of any properties unknown to the library. + internal ResourceAccessRole(IList allowedGroupClaims, IList actions, IDictionary serializedAdditionalRawData) + { + AllowedGroupClaims = allowedGroupClaims; + Actions = actions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The allowed group claims. + public IList AllowedGroupClaims { get; } + /// The actions. + public IList Actions { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyControlOption.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyControlOption.Serialization.cs new file mode 100644 index 000000000000..855710f4584e --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyControlOption.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceConcurrencyControlOption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceConcurrencyControlOption)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Policy)) + { + writer.WritePropertyName("policy"u8); + writer.WriteStringValue(Policy.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceConcurrencyControlOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceConcurrencyControlOption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceConcurrencyControlOption(document.RootElement, options); + } + + internal static ResourceConcurrencyControlOption DeserializeResourceConcurrencyControlOption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceConcurrencyPolicy? policy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = new ResourceConcurrencyPolicy(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceConcurrencyControlOption(policy, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceConcurrencyControlOption)} does not support writing '{options.Format}' format."); + } + } + + ResourceConcurrencyControlOption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceConcurrencyControlOption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceConcurrencyControlOption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RequestHeaderOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyControlOption.cs similarity index 76% rename from sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RequestHeaderOptions.cs rename to sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyControlOption.cs index d0f8bbcbb360..b526eb548226 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RequestHeaderOptions.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyControlOption.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The RequestHeaderOptions. - internal partial class RequestHeaderOptions + /// The ResourceConcurrencyControlOption. + public partial class ResourceConcurrencyControlOption { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,21 @@ internal partial class RequestHeaderOptions /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public RequestHeaderOptions() + /// Initializes a new instance of . + public ResourceConcurrencyControlOption() { } - /// Initializes a new instance of . - /// + /// Initializes a new instance of . + /// The policy. /// Keeps track of any properties unknown to the library. - internal RequestHeaderOptions(OptInHeaderType? optInHeaders, IDictionary serializedAdditionalRawData) + internal ResourceConcurrencyControlOption(ResourceConcurrencyPolicy? policy, IDictionary serializedAdditionalRawData) { - OptInHeaders = optInHeaders; + Policy = policy; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the opt in headers. - public OptInHeaderType? OptInHeaders { get; set; } + /// The policy. + public ResourceConcurrencyPolicy? Policy { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyPolicy.cs new file mode 100644 index 000000000000..4e5a2a22ac67 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceConcurrencyPolicy.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The policy. + public readonly partial struct ResourceConcurrencyPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceConcurrencyPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string SynchronizeBeginExtensionValue = "SynchronizeBeginExtension"; + + /// NotSpecified. + public static ResourceConcurrencyPolicy NotSpecified { get; } = new ResourceConcurrencyPolicy(NotSpecifiedValue); + /// SynchronizeBeginExtension. + public static ResourceConcurrencyPolicy SynchronizeBeginExtension { get; } = new ResourceConcurrencyPolicy(SynchronizeBeginExtensionValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceConcurrencyPolicy left, ResourceConcurrencyPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceConcurrencyPolicy left, ResourceConcurrencyPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceConcurrencyPolicy(string value) => new ResourceConcurrencyPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceConcurrencyPolicy other && Equals(other); + /// + public bool Equals(ResourceConcurrencyPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceDeletionPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceDeletionPolicy.cs index 33b8598fd850..6dc6285846ed 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceDeletionPolicy.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceDeletionPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceDeletionPolicy. + /// The resource deletion policy. public readonly partial struct ResourceDeletionPolicy : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceGraphConfiguration.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceGraphConfiguration.Serialization.cs new file mode 100644 index 000000000000..4b5dba257a29 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceGraphConfiguration.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceGraphConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceGraphConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceGraphConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceGraphConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceGraphConfiguration(document.RootElement, options); + } + + internal static ResourceGraphConfiguration DeserializeResourceGraphConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + string apiVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceGraphConfiguration(enabled, apiVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceGraphConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ResourceGraphConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceGraphConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceGraphConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceGraphConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceGraphConfiguration.cs new file mode 100644 index 000000000000..7d5d9d0660d8 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceGraphConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceGraphConfiguration. + public partial class ResourceGraphConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceGraphConfiguration() + { + } + + /// Initializes a new instance of . + /// Whether it's enabled. + /// The api version. + /// Keeps track of any properties unknown to the library. + internal ResourceGraphConfiguration(bool? isEnabled, string apiVersion, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + ApiVersion = apiVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether it's enabled. + public bool? IsEnabled { get; set; } + /// The api version. + public string ApiVersion { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceHydrationAccount.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceHydrationAccount.Serialization.cs new file mode 100644 index 000000000000..6014f6c9d401 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceHydrationAccount.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceHydrationAccount : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceHydrationAccount)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MaxChildResourceConsistencyJobLimit)) + { + writer.WritePropertyName("maxChildResourceConsistencyJobLimit"u8); + writer.WriteNumberValue(MaxChildResourceConsistencyJobLimit.Value); + } + if (Optional.IsDefined(EncryptedKey)) + { + writer.WritePropertyName("encryptedKey"u8); + writer.WriteStringValue(EncryptedKey); + } + if (Optional.IsDefined(AccountName)) + { + writer.WritePropertyName("accountName"u8); + writer.WriteStringValue(AccountName); + } + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceHydrationAccount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceHydrationAccount)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceHydrationAccount(document.RootElement, options); + } + + internal static ResourceHydrationAccount DeserializeResourceHydrationAccount(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? maxChildResourceConsistencyJobLimit = default; + string encryptedKey = default; + string accountName = default; + string subscriptionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxChildResourceConsistencyJobLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxChildResourceConsistencyJobLimit = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("encryptedKey"u8)) + { + encryptedKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("accountName"u8)) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceHydrationAccount(maxChildResourceConsistencyJobLimit, encryptedKey, accountName, subscriptionId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceHydrationAccount)} does not support writing '{options.Format}' format."); + } + } + + ResourceHydrationAccount IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceHydrationAccount(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceHydrationAccount)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceHydrationAccount.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceHydrationAccount.cs new file mode 100644 index 000000000000..78d03a2a903c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceHydrationAccount.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceHydrationAccount. + public partial class ResourceHydrationAccount + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceHydrationAccount() + { + } + + /// Initializes a new instance of . + /// The max child resource consistency job limit. + /// The encrypted key. + /// The account name. + /// The subscription id. + /// Keeps track of any properties unknown to the library. + internal ResourceHydrationAccount(long? maxChildResourceConsistencyJobLimit, string encryptedKey, string accountName, string subscriptionId, IDictionary serializedAdditionalRawData) + { + MaxChildResourceConsistencyJobLimit = maxChildResourceConsistencyJobLimit; + EncryptedKey = encryptedKey; + AccountName = accountName; + SubscriptionId = subscriptionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The max child resource consistency job limit. + public long? MaxChildResourceConsistencyJobLimit { get; set; } + /// The encrypted key. + public string EncryptedKey { get; set; } + /// The account name. + public string AccountName { get; set; } + /// The subscription id. + public string SubscriptionId { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementAction.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementAction.Serialization.cs new file mode 100644 index 000000000000..8835398e181e --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementAction.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceManagementAction : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceManagementAction)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceManagementAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceManagementAction)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceManagementAction(document.RootElement, options); + } + + internal static ResourceManagementAction DeserializeResourceManagementAction(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceManagementEntity.DeserializeResourceManagementEntity(item, options)); + } + resources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceManagementAction(resources ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceManagementAction)} does not support writing '{options.Format}' format."); + } + } + + ResourceManagementAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceManagementAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceManagementAction)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementAction.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementAction.cs new file mode 100644 index 000000000000..62d64aee917c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementAction.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceManagementAction. + public partial class ResourceManagementAction + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceManagementAction() + { + Resources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// resource management action content. + /// Keeps track of any properties unknown to the library. + internal ResourceManagementAction(IList resources, IDictionary serializedAdditionalRawData) + { + Resources = resources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// resource management action content. + public IList Resources { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementEntity.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementEntity.Serialization.cs new file mode 100644 index 000000000000..74dcaa0f8ad0 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementEntity.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceManagementEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceManagementEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + if (Optional.IsDefined(HomeTenantId)) + { + writer.WritePropertyName("homeTenantId"u8); + writer.WriteStringValue(HomeTenantId); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceManagementEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceManagementEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceManagementEntity(document.RootElement, options); + } + + internal static ResourceManagementEntity DeserializeResourceManagementEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + string homeTenantId = default; + AzureLocation? location = default; + string status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("homeTenantId"u8)) + { + homeTenantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceManagementEntity(resourceId, homeTenantId, location, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceManagementEntity)} does not support writing '{options.Format}' format."); + } + } + + ResourceManagementEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceManagementEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceManagementEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementEntity.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementEntity.cs new file mode 100644 index 000000000000..42e7068fb78b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementEntity.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceManagementEntity. + public partial class ResourceManagementEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource id. + /// is null. + public ResourceManagementEntity(ResourceIdentifier resourceId) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + } + + /// Initializes a new instance of . + /// The resource id. + /// The home tenant id. + /// The location. + /// The operation status. + /// Keeps track of any properties unknown to the library. + internal ResourceManagementEntity(ResourceIdentifier resourceId, string homeTenantId, AzureLocation? location, string status, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + HomeTenantId = homeTenantId; + Location = location; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceManagementEntity() + { + } + + /// The resource id. + public ResourceIdentifier ResourceId { get; } + /// The home tenant id. + public string HomeTenantId { get; set; } + /// The location. + public AzureLocation? Location { get; set; } + /// The operation status. + public string Status { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementSupportedOperation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementSupportedOperation.cs new file mode 100644 index 000000000000..9cdd863f77b1 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceManagementSupportedOperation.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Supported operations. + public readonly partial struct ResourceManagementSupportedOperation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceManagementSupportedOperation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string GetValue = "Get"; + private const string DeleteValue = "Delete"; + + /// NotSpecified. + public static ResourceManagementSupportedOperation NotSpecified { get; } = new ResourceManagementSupportedOperation(NotSpecifiedValue); + /// Get. + public static ResourceManagementSupportedOperation Get { get; } = new ResourceManagementSupportedOperation(GetValue); + /// Delete. + public static ResourceManagementSupportedOperation Delete { get; } = new ResourceManagementSupportedOperation(DeleteValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceManagementSupportedOperation left, ResourceManagementSupportedOperation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceManagementSupportedOperation left, ResourceManagementSupportedOperation right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceManagementSupportedOperation(string value) => new ResourceManagementSupportedOperation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceManagementSupportedOperation other && Equals(other); + /// + public bool Equals(ResourceManagementSupportedOperation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceMovePolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceMovePolicy.cs index 66c12176128a..da789a89a5d8 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceMovePolicy.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceMovePolicy.cs @@ -51,9 +51,9 @@ public ResourceMovePolicy() } /// Initializes a new instance of . - /// - /// - /// + /// Whether validation is required. + /// Whether cross resource group move is enabled. + /// Whether cross subscription move is enabled. /// Keeps track of any properties unknown to the library. internal ResourceMovePolicy(bool? isValidationRequired, bool? isCrossResourceGroupMoveEnabled, bool? isCrossSubscriptionMoveEnabled, IDictionary serializedAdditionalRawData) { @@ -63,11 +63,11 @@ internal ResourceMovePolicy(bool? isValidationRequired, bool? isCrossResourceGro _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the is validation required. + /// Whether validation is required. public bool? IsValidationRequired { get; set; } - /// Gets or sets the is cross resource group move enabled. + /// Whether cross resource group move is enabled. public bool? IsCrossResourceGroupMoveEnabled { get; set; } - /// Gets or sets the is cross subscription move enabled. + /// Whether cross subscription move is enabled. public bool? IsCrossSubscriptionMoveEnabled { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthentication.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthentication.cs index 39488ecb4844..3194cd5df647 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthentication.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthentication.cs @@ -47,7 +47,7 @@ internal partial class ResourceProviderAuthentication private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The allowed audiences. /// is null. public ResourceProviderAuthentication(IEnumerable allowedAudiences) { @@ -57,7 +57,7 @@ public ResourceProviderAuthentication(IEnumerable allowedAudiences) } /// Initializes a new instance of . - /// + /// The allowed audiences. /// Keeps track of any properties unknown to the library. internal ResourceProviderAuthentication(IList allowedAudiences, IDictionary serializedAdditionalRawData) { @@ -70,7 +70,7 @@ internal ResourceProviderAuthentication() { } - /// Gets the allowed audiences. + /// The allowed audiences. public IList AllowedAudiences { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.Serialization.cs index d517d887b001..b6c463f3996f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.Serialization.cs @@ -49,6 +49,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("managedByRoleDefinitionId"u8); writer.WriteStringValue(ManagedByRoleDefinitionId); } + if (Optional.IsDefined(ManagedByAuthorization)) + { + writer.WritePropertyName("managedByAuthorization"u8); + writer.WriteObjectValue(ManagedByAuthorization, options); + } + if (Optional.IsCollectionDefined(AllowedThirdPartyExtensions)) + { + writer.WritePropertyName("allowedThirdPartyExtensions"u8); + writer.WriteStartArray(); + foreach (var item in AllowedThirdPartyExtensions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(GroupingTag)) + { + writer.WritePropertyName("groupingTag"u8); + writer.WriteStringValue(GroupingTag); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -89,6 +109,9 @@ internal static ResourceProviderAuthorization DeserializeResourceProviderAuthori string applicationId = default; string roleDefinitionId = default; string managedByRoleDefinitionId = default; + ResourceProviderManagedByAuthorization managedByAuthorization = default; + IList allowedThirdPartyExtensions = default; + string groupingTag = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,13 +131,48 @@ internal static ResourceProviderAuthorization DeserializeResourceProviderAuthori managedByRoleDefinitionId = property.Value.GetString(); continue; } + if (property.NameEquals("managedByAuthorization"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedByAuthorization = ResourceProviderManagedByAuthorization.DeserializeResourceProviderManagedByAuthorization(property.Value, options); + continue; + } + if (property.NameEquals("allowedThirdPartyExtensions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ThirdPartyExtension.DeserializeThirdPartyExtension(item, options)); + } + allowedThirdPartyExtensions = array; + continue; + } + if (property.NameEquals("groupingTag"u8)) + { + groupingTag = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ResourceProviderAuthorization(applicationId, roleDefinitionId, managedByRoleDefinitionId, serializedAdditionalRawData); + return new ResourceProviderAuthorization( + applicationId, + roleDefinitionId, + managedByRoleDefinitionId, + managedByAuthorization, + allowedThirdPartyExtensions ?? new ChangeTrackingList(), + groupingTag, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.cs index f9461c8db9af..7cc014532c0e 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorization.cs @@ -48,26 +48,39 @@ public partial class ResourceProviderAuthorization /// Initializes a new instance of . public ResourceProviderAuthorization() { + AllowedThirdPartyExtensions = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// + /// The application id. + /// The role definition id. + /// The managed by role definition id. + /// Managed by authorization. + /// The allowed third party extensions. + /// The grouping tag. /// Keeps track of any properties unknown to the library. - internal ResourceProviderAuthorization(string applicationId, string roleDefinitionId, string managedByRoleDefinitionId, IDictionary serializedAdditionalRawData) + internal ResourceProviderAuthorization(string applicationId, string roleDefinitionId, string managedByRoleDefinitionId, ResourceProviderManagedByAuthorization managedByAuthorization, IList allowedThirdPartyExtensions, string groupingTag, IDictionary serializedAdditionalRawData) { ApplicationId = applicationId; RoleDefinitionId = roleDefinitionId; ManagedByRoleDefinitionId = managedByRoleDefinitionId; + ManagedByAuthorization = managedByAuthorization; + AllowedThirdPartyExtensions = allowedThirdPartyExtensions; + GroupingTag = groupingTag; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the application id. + /// The application id. public string ApplicationId { get; set; } - /// Gets or sets the role definition id. + /// The role definition id. public string RoleDefinitionId { get; set; } - /// Gets or sets the managed by role definition id. + /// The managed by role definition id. public string ManagedByRoleDefinitionId { get; set; } + /// Managed by authorization. + public ResourceProviderManagedByAuthorization ManagedByAuthorization { get; set; } + /// The allowed third party extensions. + public IList AllowedThirdPartyExtensions { get; } + /// The grouping tag. + public string GroupingTag { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorizationRules.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorizationRules.Serialization.cs new file mode 100644 index 000000000000..70b10b3d9334 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorizationRules.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceProviderAuthorizationRules : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderAuthorizationRules)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AsyncOperationPollingRules)) + { + writer.WritePropertyName("asyncOperationPollingRules"u8); + writer.WriteObjectValue(AsyncOperationPollingRules, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceProviderAuthorizationRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderAuthorizationRules)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProviderAuthorizationRules(document.RootElement, options); + } + + internal static ResourceProviderAuthorizationRules DeserializeResourceProviderAuthorizationRules(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AsyncOperationPollingRules asyncOperationPollingRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("asyncOperationPollingRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + asyncOperationPollingRules = AsyncOperationPollingRules.DeserializeAsyncOperationPollingRules(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProviderAuthorizationRules(asyncOperationPollingRules, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProviderAuthorizationRules)} does not support writing '{options.Format}' format."); + } + } + + ResourceProviderAuthorizationRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceProviderAuthorizationRules(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProviderAuthorizationRules)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorizationRules.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorizationRules.cs new file mode 100644 index 000000000000..545f0d0f4784 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderAuthorizationRules.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceProviderAuthorizationRules. + internal partial class ResourceProviderAuthorizationRules + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceProviderAuthorizationRules() + { + } + + /// Initializes a new instance of . + /// The async operation polling rules. + /// Keeps track of any properties unknown to the library. + internal ResourceProviderAuthorizationRules(AsyncOperationPollingRules asyncOperationPollingRules, IDictionary serializedAdditionalRawData) + { + AsyncOperationPollingRules = asyncOperationPollingRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The async operation polling rules. + public AsyncOperationPollingRules AsyncOperationPollingRules { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilities.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilities.cs index 63a51662cca1..4696e2355e2f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilities.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilities.cs @@ -46,8 +46,8 @@ public partial class ResourceProviderCapabilities private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// + /// The quota id. + /// The effect. /// is null. public ResourceProviderCapabilities(string quotaId, ResourceProviderCapabilitiesEffect effect) { @@ -59,9 +59,9 @@ public ResourceProviderCapabilities(string quotaId, ResourceProviderCapabilities } /// Initializes a new instance of . - /// - /// - /// + /// The quota id. + /// The effect. + /// The required features. /// Keeps track of any properties unknown to the library. internal ResourceProviderCapabilities(string quotaId, ResourceProviderCapabilitiesEffect effect, IList requiredFeatures, IDictionary serializedAdditionalRawData) { @@ -76,11 +76,11 @@ internal ResourceProviderCapabilities() { } - /// Gets or sets the quota id. + /// The quota id. public string QuotaId { get; set; } - /// Gets or sets the effect. + /// The effect. public ResourceProviderCapabilitiesEffect Effect { get; set; } - /// Gets the required features. + /// The required features. public IList RequiredFeatures { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilitiesEffect.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilitiesEffect.cs index 8146444f06cb..1ecea7e1fd20 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilitiesEffect.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderCapabilitiesEffect.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceProviderCapabilitiesEffect. + /// The effect. public readonly partial struct ResourceProviderCapabilitiesEffect : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.Serialization.cs index e6a1f2b6e54f..95e3ba2970af 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.Serialization.cs @@ -84,6 +84,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("timeout"u8); writer.WriteStringValue(Timeout.Value, "P"); } + if (Optional.IsDefined(EndpointType)) + { + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.Value.ToString()); + } + if (Optional.IsDefined(SkuLink)) + { + writer.WritePropertyName("skuLink"u8); + writer.WriteStringValue(SkuLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -126,8 +136,10 @@ internal static ResourceProviderEndpoint DeserializeResourceProviderEndpoint(Jso Uri endpointUri = default; IReadOnlyList locations = default; IReadOnlyList requiredFeatures = default; - FeaturesRule featuresRule = default; + ProviderFeaturesRule featuresRule = default; TimeSpan? timeout = default; + ProviderEndpointType? endpointType = default; + string skuLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -198,7 +210,7 @@ internal static ResourceProviderEndpoint DeserializeResourceProviderEndpoint(Jso { continue; } - featuresRule = FeaturesRule.DeserializeFeaturesRule(property.Value, options); + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); continue; } if (property.NameEquals("timeout"u8)) @@ -210,6 +222,20 @@ internal static ResourceProviderEndpoint DeserializeResourceProviderEndpoint(Jso timeout = property.Value.GetTimeSpan("P"); continue; } + if (property.NameEquals("endpointType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointType = new ProviderEndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("skuLink"u8)) + { + skuLink = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -224,6 +250,8 @@ internal static ResourceProviderEndpoint DeserializeResourceProviderEndpoint(Jso requiredFeatures ?? new ChangeTrackingList(), featuresRule, timeout, + endpointType, + skuLink, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.cs index daa4fc9e5a65..0c3f86bba164 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderEndpoint.cs @@ -47,7 +47,7 @@ public partial class ResourceProviderEndpoint private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ResourceProviderEndpoint() + public ResourceProviderEndpoint() { ApiVersions = new ChangeTrackingList(); Locations = new ChangeTrackingList(); @@ -55,15 +55,17 @@ internal ResourceProviderEndpoint() } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// + /// Whether the endpoint is enabled. + /// The api versions. + /// The endpoint uri. + /// The locations. + /// The required features. + /// The feature rules. + /// The timeout. + /// The endpoint type. + /// The sku link. /// Keeps track of any properties unknown to the library. - internal ResourceProviderEndpoint(bool? isEnabled, IReadOnlyList apiVersions, Uri endpointUri, IReadOnlyList locations, IReadOnlyList requiredFeatures, FeaturesRule featuresRule, TimeSpan? timeout, IDictionary serializedAdditionalRawData) + internal ResourceProviderEndpoint(bool? isEnabled, IReadOnlyList apiVersions, Uri endpointUri, IReadOnlyList locations, IReadOnlyList requiredFeatures, ProviderFeaturesRule featuresRule, TimeSpan? timeout, ProviderEndpointType? endpointType, string skuLink, IDictionary serializedAdditionalRawData) { IsEnabled = isEnabled; ApiVersions = apiVersions; @@ -72,28 +74,32 @@ internal ResourceProviderEndpoint(bool? isEnabled, IReadOnlyList apiVers RequiredFeatures = requiredFeatures; FeaturesRule = featuresRule; Timeout = timeout; + EndpointType = endpointType; + SkuLink = skuLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the is enabled. - public bool? IsEnabled { get; } - /// Gets the api versions. - public IReadOnlyList ApiVersions { get; } - /// Gets the endpoint uri. - public Uri EndpointUri { get; } - /// Gets the locations. - public IReadOnlyList Locations { get; } - /// Gets the required features. - public IReadOnlyList RequiredFeatures { get; } - /// Gets the features rule. - internal FeaturesRule FeaturesRule { get; } - /// Gets the required features policy. + /// Whether the endpoint is enabled. + public bool? IsEnabled { get; set; } + /// The endpoint uri. + public Uri EndpointUri { get; set; } + /// The feature rules. + internal ProviderFeaturesRule FeaturesRule { get; set; } + /// The required feature policy. public FeaturesPolicy? RequiredFeaturesPolicy { - get => FeaturesRule?.RequiredFeaturesPolicy; + get => FeaturesRule is null ? default(FeaturesPolicy?) : FeaturesRule.RequiredFeaturesPolicy; + set + { + FeaturesRule = value.HasValue ? new ProviderFeaturesRule(value.Value) : null; + } } - /// Gets the timeout. - public TimeSpan? Timeout { get; } + /// The timeout. + public TimeSpan? Timeout { get; set; } + /// The endpoint type. + public ProviderEndpointType? EndpointType { get; set; } + /// The sku link. + public string SkuLink { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderErrorResponseMessageOptions.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderErrorResponseMessageOptions.Serialization.cs new file mode 100644 index 000000000000..b1cacc2c4076 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderErrorResponseMessageOptions.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceProviderErrorResponseMessageOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderErrorResponseMessageOptions)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ServerFailureResponseMessageType)) + { + writer.WritePropertyName("serverFailureResponseMessageType"u8); + writer.WriteStringValue(ServerFailureResponseMessageType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceProviderErrorResponseMessageOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderErrorResponseMessageOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProviderErrorResponseMessageOptions(document.RootElement, options); + } + + internal static ResourceProviderErrorResponseMessageOptions DeserializeResourceProviderErrorResponseMessageOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ServerFailureResponseMessageType? serverFailureResponseMessageType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serverFailureResponseMessageType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverFailureResponseMessageType = new ServerFailureResponseMessageType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProviderErrorResponseMessageOptions(serverFailureResponseMessageType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProviderErrorResponseMessageOptions)} does not support writing '{options.Format}' format."); + } + } + + ResourceProviderErrorResponseMessageOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceProviderErrorResponseMessageOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProviderErrorResponseMessageOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderErrorResponseMessageOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderErrorResponseMessageOptions.cs new file mode 100644 index 000000000000..5f9ff507c926 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderErrorResponseMessageOptions.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Options for error response messages. + internal partial class ResourceProviderErrorResponseMessageOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceProviderErrorResponseMessageOptions() + { + } + + /// Initializes a new instance of . + /// Type of server failure response message. + /// Keeps track of any properties unknown to the library. + internal ResourceProviderErrorResponseMessageOptions(ServerFailureResponseMessageType? serverFailureResponseMessageType, IDictionary serializedAdditionalRawData) + { + ServerFailureResponseMessageType = serverFailureResponseMessageType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of server failure response message. + public ServerFailureResponseMessageType? ServerFailureResponseMessageType { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagedByAuthorization.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagedByAuthorization.Serialization.cs new file mode 100644 index 000000000000..49d10ec94be3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagedByAuthorization.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceProviderManagedByAuthorization : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManagedByAuthorization)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AdditionalAuthorizations)) + { + writer.WritePropertyName("additionalAuthorizations"u8); + writer.WriteStartArray(); + foreach (var item in AdditionalAuthorizations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ManagedByResourceRoleDefinitionId)) + { + writer.WritePropertyName("managedByResourceRoleDefinitionId"u8); + writer.WriteStringValue(ManagedByResourceRoleDefinitionId); + } + if (Optional.IsDefined(DoesAllowManagedByInheritance)) + { + writer.WritePropertyName("allowManagedByInheritance"u8); + writer.WriteBooleanValue(DoesAllowManagedByInheritance.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceProviderManagedByAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManagedByAuthorization)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProviderManagedByAuthorization(document.RootElement, options); + } + + internal static ResourceProviderManagedByAuthorization DeserializeResourceProviderManagedByAuthorization(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList additionalAuthorizations = default; + string managedByResourceRoleDefinitionId = default; + bool? allowManagedByInheritance = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("additionalAuthorizations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderAdditionalAuthorization.DeserializeProviderAdditionalAuthorization(item, options)); + } + additionalAuthorizations = array; + continue; + } + if (property.NameEquals("managedByResourceRoleDefinitionId"u8)) + { + managedByResourceRoleDefinitionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowManagedByInheritance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowManagedByInheritance = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProviderManagedByAuthorization(additionalAuthorizations ?? new ChangeTrackingList(), managedByResourceRoleDefinitionId, allowManagedByInheritance, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProviderManagedByAuthorization)} does not support writing '{options.Format}' format."); + } + } + + ResourceProviderManagedByAuthorization IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceProviderManagedByAuthorization(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProviderManagedByAuthorization)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagedByAuthorization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagedByAuthorization.cs new file mode 100644 index 000000000000..abd989e06f23 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagedByAuthorization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Managed by authorization. + public partial class ResourceProviderManagedByAuthorization + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceProviderManagedByAuthorization() + { + AdditionalAuthorizations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The managed by resource role definition ID for the application. + /// Indicates whether the managed by resource role definition ID should be inherited. + /// Keeps track of any properties unknown to the library. + internal ResourceProviderManagedByAuthorization(IList additionalAuthorizations, string managedByResourceRoleDefinitionId, bool? doesAllowManagedByInheritance, IDictionary serializedAdditionalRawData) + { + AdditionalAuthorizations = additionalAuthorizations; + ManagedByResourceRoleDefinitionId = managedByResourceRoleDefinitionId; + DoesAllowManagedByInheritance = doesAllowManagedByInheritance; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the additional authorizations. + public IList AdditionalAuthorizations { get; } + /// The managed by resource role definition ID for the application. + public string ManagedByResourceRoleDefinitionId { get; set; } + /// Indicates whether the managed by resource role definition ID should be inherited. + public bool? DoesAllowManagedByInheritance { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.Serialization.cs index 77fb123d2df1..1790d58ea71a 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.Serialization.cs @@ -54,6 +54,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(AuthorizationOwners)) + { + writer.WritePropertyName("authorizationOwners"u8); + writer.WriteStartArray(); + foreach (var item in AuthorizationOwners) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(IncidentRoutingService)) { writer.WritePropertyName("incidentRoutingService"u8); @@ -84,28 +94,56 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("resourceAccessPolicy"u8); writer.WriteStringValue(ResourceAccessPolicy.Value.ToSerialString()); } - if (Optional.IsCollectionDefined(ResourceAccessRoles)) + if (Optional.IsCollectionDefined(ResourceAccessRoleList)) { writer.WritePropertyName("resourceAccessRoles"u8); writer.WriteStartArray(); - foreach (var item in ResourceAccessRoles) + foreach (var item in ResourceAccessRoleList) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ExpeditedRolloutSubmitters)) + { + writer.WritePropertyName("expeditedRolloutSubmitters"u8); + writer.WriteStartArray(); + foreach (var item in ExpeditedRolloutSubmitters) + { + writer.WriteStringValue(item); } writer.WriteEndArray(); } + if (Optional.IsDefined(ErrorResponseMessageOptions)) + { + writer.WritePropertyName("errorResponseMessageOptions"u8); + writer.WriteObjectValue(ErrorResponseMessageOptions, options); + } + if (Optional.IsDefined(ExpeditedRolloutMetadata)) + { + writer.WritePropertyName("expeditedRolloutMetadata"u8); + writer.WriteObjectValue(ExpeditedRolloutMetadata, options); + } + if (Optional.IsCollectionDefined(CanaryManifestOwners)) + { + writer.WritePropertyName("canaryManifestOwners"u8); + writer.WriteStartArray(); + foreach (var item in CanaryManifestOwners) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ProfitCenterCode)) + { + writer.WritePropertyName("pcCode"u8); + writer.WriteStringValue(ProfitCenterCode); + } + if (Optional.IsDefined(ProfitCenterProgramId)) + { + writer.WritePropertyName("profitCenterProgramId"u8); + writer.WriteStringValue(ProfitCenterProgramId); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -145,12 +183,19 @@ internal static ResourceProviderManagement DeserializeResourceProviderManagement } IList schemaOwners = default; IList manifestOwners = default; + IList authorizationOwners = default; string incidentRoutingService = default; string incidentRoutingTeam = default; string incidentContactEmail = default; IList serviceTreeInfos = default; ResourceAccessPolicy? resourceAccessPolicy = default; - IList resourceAccessRoles = default; + IList resourceAccessRoles = default; + IList expeditedRolloutSubmitters = default; + ResourceProviderErrorResponseMessageOptions errorResponseMessageOptions = default; + ExpeditedRolloutMetadata expeditedRolloutMetadata = default; + IList canaryManifestOwners = default; + string pcCode = default; + string profitCenterProgramId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -183,6 +228,20 @@ internal static ResourceProviderManagement DeserializeResourceProviderManagement manifestOwners = array; continue; } + if (property.NameEquals("authorizationOwners"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + authorizationOwners = array; + continue; + } if (property.NameEquals("incidentRoutingService"u8)) { incidentRoutingService = property.Value.GetString(); @@ -227,21 +286,70 @@ internal static ResourceProviderManagement DeserializeResourceProviderManagement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } + array.Add(ResourceAccessRole.DeserializeResourceAccessRole(item, options)); } resourceAccessRoles = array; continue; } + if (property.NameEquals("expeditedRolloutSubmitters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + expeditedRolloutSubmitters = array; + continue; + } + if (property.NameEquals("errorResponseMessageOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorResponseMessageOptions = ResourceProviderErrorResponseMessageOptions.DeserializeResourceProviderErrorResponseMessageOptions(property.Value, options); + continue; + } + if (property.NameEquals("expeditedRolloutMetadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expeditedRolloutMetadata = ExpeditedRolloutMetadata.DeserializeExpeditedRolloutMetadata(property.Value, options); + continue; + } + if (property.NameEquals("canaryManifestOwners"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + canaryManifestOwners = array; + continue; + } + if (property.NameEquals("pcCode"u8)) + { + pcCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("profitCenterProgramId"u8)) + { + profitCenterProgramId = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -251,12 +359,19 @@ internal static ResourceProviderManagement DeserializeResourceProviderManagement return new ResourceProviderManagement( schemaOwners ?? new ChangeTrackingList(), manifestOwners ?? new ChangeTrackingList(), + authorizationOwners ?? new ChangeTrackingList(), incidentRoutingService, incidentRoutingTeam, incidentContactEmail, serviceTreeInfos ?? new ChangeTrackingList(), resourceAccessPolicy, - resourceAccessRoles ?? new ChangeTrackingList(), + resourceAccessRoles ?? new ChangeTrackingList(), + expeditedRolloutSubmitters ?? new ChangeTrackingList(), + errorResponseMessageOptions, + expeditedRolloutMetadata, + canaryManifestOwners ?? new ChangeTrackingList(), + pcCode, + profitCenterProgramId, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.cs index 38b544964e27..71c1fec5e317 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManagement.cs @@ -50,77 +50,91 @@ public ResourceProviderManagement() { SchemaOwners = new ChangeTrackingList(); ManifestOwners = new ChangeTrackingList(); + AuthorizationOwners = new ChangeTrackingList(); ServiceTreeInfos = new ChangeTrackingList(); - ResourceAccessRoles = new ChangeTrackingList(); + ResourceAccessRoleList = new ChangeTrackingList(); + ExpeditedRolloutSubmitters = new ChangeTrackingList(); + CanaryManifestOwners = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// + /// The schema owners. + /// The manifest owners. + /// The authorization owners. + /// The incident routing service. + /// The incident routing team. + /// The incident contact email. + /// The service tree infos. + /// The resource access policy. + /// The resource access roles. + /// List of expedited rollout submitters. + /// Options for error response messages. + /// Metadata for expedited rollout. + /// List of manifest owners for canary. + /// The profit center code for the subscription. + /// The profit center program id for the subscription. /// Keeps track of any properties unknown to the library. - internal ResourceProviderManagement(IList schemaOwners, IList manifestOwners, string incidentRoutingService, string incidentRoutingTeam, string incidentContactEmail, IList serviceTreeInfos, ResourceAccessPolicy? resourceAccessPolicy, IList resourceAccessRoles, IDictionary serializedAdditionalRawData) + internal ResourceProviderManagement(IList schemaOwners, IList manifestOwners, IList authorizationOwners, string incidentRoutingService, string incidentRoutingTeam, string incidentContactEmail, IList serviceTreeInfos, ResourceAccessPolicy? resourceAccessPolicy, IList resourceAccessRoleList, IList expeditedRolloutSubmitters, ResourceProviderErrorResponseMessageOptions errorResponseMessageOptions, ExpeditedRolloutMetadata expeditedRolloutMetadata, IList canaryManifestOwners, string profitCenterCode, string profitCenterProgramId, IDictionary serializedAdditionalRawData) { SchemaOwners = schemaOwners; ManifestOwners = manifestOwners; + AuthorizationOwners = authorizationOwners; IncidentRoutingService = incidentRoutingService; IncidentRoutingTeam = incidentRoutingTeam; IncidentContactEmail = incidentContactEmail; ServiceTreeInfos = serviceTreeInfos; ResourceAccessPolicy = resourceAccessPolicy; - ResourceAccessRoles = resourceAccessRoles; + ResourceAccessRoleList = resourceAccessRoleList; + ExpeditedRolloutSubmitters = expeditedRolloutSubmitters; + ErrorResponseMessageOptions = errorResponseMessageOptions; + ExpeditedRolloutMetadata = expeditedRolloutMetadata; + CanaryManifestOwners = canaryManifestOwners; + ProfitCenterCode = profitCenterCode; + ProfitCenterProgramId = profitCenterProgramId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the schema owners. + /// The schema owners. public IList SchemaOwners { get; } - /// Gets the manifest owners. + /// The manifest owners. public IList ManifestOwners { get; } - /// Gets or sets the incident routing service. + /// The authorization owners. + public IList AuthorizationOwners { get; } + /// The incident routing service. public string IncidentRoutingService { get; set; } - /// Gets or sets the incident routing team. + /// The incident routing team. public string IncidentRoutingTeam { get; set; } - /// Gets or sets the incident contact email. + /// The incident contact email. public string IncidentContactEmail { get; set; } - /// Gets the service tree infos. + /// The service tree infos. public IList ServiceTreeInfos { get; } - /// Gets or sets the resource access policy. + /// The resource access policy. public ResourceAccessPolicy? ResourceAccessPolicy { get; set; } - /// - /// Gets the resource access roles - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IList ResourceAccessRoles { get; } + /// The resource access roles. + public IList ResourceAccessRoleList { get; } + /// List of expedited rollout submitters. + public IList ExpeditedRolloutSubmitters { get; } + /// Options for error response messages. + internal ResourceProviderErrorResponseMessageOptions ErrorResponseMessageOptions { get; set; } + /// Type of server failure response message. + public ServerFailureResponseMessageType? ServerFailureResponseMessageType + { + get => ErrorResponseMessageOptions is null ? default : ErrorResponseMessageOptions.ServerFailureResponseMessageType; + set + { + if (ErrorResponseMessageOptions is null) + ErrorResponseMessageOptions = new ResourceProviderErrorResponseMessageOptions(); + ErrorResponseMessageOptions.ServerFailureResponseMessageType = value; + } + } + + /// Metadata for expedited rollout. + public ExpeditedRolloutMetadata ExpeditedRolloutMetadata { get; set; } + /// List of manifest owners for canary. + public IList CanaryManifestOwners { get; } + /// The profit center code for the subscription. + public string ProfitCenterCode { get; set; } + /// The profit center program id for the subscription. + public string ProfitCenterProgramId { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.Serialization.cs index de9c1aa2fca1..1c0a6fb607b2 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.Serialization.cs @@ -54,6 +54,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("namespace"u8); writer.WriteStringValue(Namespace); } + if (Optional.IsCollectionDefined(Services)) + { + writer.WritePropertyName("services"u8); + writer.WriteStartArray(); + foreach (var item in Services) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ServiceName)) + { + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + } if (Optional.IsDefined(ProviderVersion)) { writer.WritePropertyName("providerVersion"u8); @@ -109,6 +124,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(CrossTenantTokenValidation)) + { + writer.WritePropertyName("crossTenantTokenValidation"u8); + writer.WriteStringValue(CrossTenantTokenValidation.Value.ToString()); + } if (Optional.IsDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -136,6 +156,43 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("reRegisterSubscriptionMetadata"u8); writer.WriteObjectValue(ReRegisterSubscriptionMetadata, options); } + if (Optional.IsDefined(IsTenantLinkedNotificationEnabled)) + { + if (IsTenantLinkedNotificationEnabled != null) + { + writer.WritePropertyName("enableTenantLinkedNotification"u8); + writer.WriteBooleanValue(IsTenantLinkedNotificationEnabled.Value); + } + else + { + writer.WriteNull("enableTenantLinkedNotification"); + } + } + if (Optional.IsCollectionDefined(Notifications)) + { + writer.WritePropertyName("notifications"u8); + writer.WriteStartArray(); + foreach (var item in Notifications) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(LinkedNotificationRules)) + { + writer.WritePropertyName("linkedNotificationRules"u8); + writer.WriteStartArray(); + foreach (var item in LinkedNotificationRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResourceProviderAuthorizationRules)) + { + writer.WritePropertyName("resourceProviderAuthorizationRules"u8); + writer.WriteObjectValue(ResourceProviderAuthorizationRules, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -176,17 +233,24 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso ResourceProviderAuthentication providerAuthentication = default; IReadOnlyList providerAuthorizations = default; string @namespace = default; + IReadOnlyList services = default; + string serviceName = default; string providerVersion = default; ResourceProviderType? providerType = default; IReadOnlyList requiredFeatures = default; - FeaturesRule featuresRule = default; - RequestHeaderOptions requestHeaderOptions = default; + ProviderFeaturesRule featuresRule = default; + ProviderRequestHeaderOptions requestHeaderOptions = default; IReadOnlyList resourceTypes = default; ResourceProviderManagement management = default; IReadOnlyList capabilities = default; + CrossTenantTokenValidation? crossTenantTokenValidation = default; BinaryData metadata = default; IReadOnlyList globalNotificationEndpoints = default; ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = default; + bool? enableTenantLinkedNotification = default; + IReadOnlyList notifications = default; + IReadOnlyList linkedNotificationRules = default; + ResourceProviderAuthorizationRules resourceProviderAuthorizationRules = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -219,6 +283,25 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso @namespace = property.Value.GetString(); continue; } + if (property.NameEquals("services"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderService.DeserializeResourceProviderService(item, options)); + } + services = array; + continue; + } + if (property.NameEquals("serviceName"u8)) + { + serviceName = property.Value.GetString(); + continue; + } if (property.NameEquals("providerVersion"u8)) { providerVersion = property.Value.GetString(); @@ -253,7 +336,7 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso { continue; } - featuresRule = FeaturesRule.DeserializeFeaturesRule(property.Value, options); + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); continue; } if (property.NameEquals("requestHeaderOptions"u8)) @@ -262,7 +345,7 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso { continue; } - requestHeaderOptions = RequestHeaderOptions.DeserializeRequestHeaderOptions(property.Value, options); + requestHeaderOptions = ProviderRequestHeaderOptions.DeserializeProviderRequestHeaderOptions(property.Value, options); continue; } if (property.NameEquals("resourceTypes"u8)) @@ -302,6 +385,15 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso capabilities = array; continue; } + if (property.NameEquals("crossTenantTokenValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crossTenantTokenValidation = new CrossTenantTokenValidation(property.Value.GetString()); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -334,6 +426,53 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso reRegisterSubscriptionMetadata = ReRegisterSubscriptionMetadata.DeserializeReRegisterSubscriptionMetadata(property.Value, options); continue; } + if (property.NameEquals("enableTenantLinkedNotification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + enableTenantLinkedNotification = null; + continue; + } + enableTenantLinkedNotification = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("notifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderNotification.DeserializeProviderNotification(item, options)); + } + notifications = array; + continue; + } + if (property.NameEquals("linkedNotificationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FanoutLinkedNotificationRule.DeserializeFanoutLinkedNotificationRule(item, options)); + } + linkedNotificationRules = array; + continue; + } + if (property.NameEquals("resourceProviderAuthorizationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceProviderAuthorizationRules = ResourceProviderAuthorizationRules.DeserializeResourceProviderAuthorizationRules(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -344,6 +483,8 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso providerAuthentication, providerAuthorizations ?? new ChangeTrackingList(), @namespace, + services ?? new ChangeTrackingList(), + serviceName, providerVersion, providerType, requiredFeatures ?? new ChangeTrackingList(), @@ -352,9 +493,14 @@ internal static ResourceProviderManifest DeserializeResourceProviderManifest(Jso resourceTypes ?? new ChangeTrackingList(), management, capabilities ?? new ChangeTrackingList(), + crossTenantTokenValidation, metadata, globalNotificationEndpoints ?? new ChangeTrackingList(), reRegisterSubscriptionMetadata, + enableTenantLinkedNotification, + notifications ?? new ChangeTrackingList(), + linkedNotificationRules ?? new ChangeTrackingList(), + resourceProviderAuthorizationRules, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.cs index 28e7906c9565..da271093fa80 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifest.cs @@ -49,33 +49,45 @@ public partial class ResourceProviderManifest internal ResourceProviderManifest() { ProviderAuthorizations = new ChangeTrackingList(); + Services = new ChangeTrackingList(); RequiredFeatures = new ChangeTrackingList(); ResourceTypes = new ChangeTrackingList(); Capabilities = new ChangeTrackingList(); GlobalNotificationEndpoints = new ChangeTrackingList(); + Notifications = new ChangeTrackingList(); + LinkedNotificationRules = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Anything. - /// - /// + /// The provider authentication. + /// The provider authorizations. + /// The namespace. + /// The services. + /// The service name. + /// The provider version. + /// The provider type. + /// The required features. + /// The features rule. + /// The request header options. + /// The resource types. + /// The resource provider management. + /// The capabilities. + /// The cross tenant token validation. + /// The metadata. + /// The global notification endpoints. + /// The re-register subscription metadata. + /// Whether tenant linked notification is enabled. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. /// Keeps track of any properties unknown to the library. - internal ResourceProviderManifest(ResourceProviderAuthentication providerAuthentication, IReadOnlyList providerAuthorizations, string @namespace, string providerVersion, ResourceProviderType? providerType, IReadOnlyList requiredFeatures, FeaturesRule featuresRule, RequestHeaderOptions requestHeaderOptions, IReadOnlyList resourceTypes, ResourceProviderManagement management, IReadOnlyList capabilities, BinaryData metadata, IReadOnlyList globalNotificationEndpoints, ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata, IDictionary serializedAdditionalRawData) + internal ResourceProviderManifest(ResourceProviderAuthentication providerAuthentication, IReadOnlyList providerAuthorizations, string @namespace, IReadOnlyList services, string serviceName, string providerVersion, ResourceProviderType? providerType, IReadOnlyList requiredFeatures, ProviderFeaturesRule featuresRule, ProviderRequestHeaderOptions requestHeaderOptions, IReadOnlyList resourceTypes, ResourceProviderManagement management, IReadOnlyList capabilities, CrossTenantTokenValidation? crossTenantTokenValidation, BinaryData metadata, IReadOnlyList globalNotificationEndpoints, ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata, bool? isTenantLinkedNotificationEnabled, IReadOnlyList notifications, IReadOnlyList linkedNotificationRules, ResourceProviderAuthorizationRules resourceProviderAuthorizationRules, IDictionary serializedAdditionalRawData) { ProviderAuthentication = providerAuthentication; ProviderAuthorizations = providerAuthorizations; Namespace = @namespace; + Services = services; + ServiceName = serviceName; ProviderVersion = providerVersion; ProviderType = providerType; RequiredFeatures = requiredFeatures; @@ -84,54 +96,59 @@ internal ResourceProviderManifest(ResourceProviderAuthentication providerAuthent ResourceTypes = resourceTypes; Management = management; Capabilities = capabilities; + CrossTenantTokenValidation = crossTenantTokenValidation; Metadata = metadata; GlobalNotificationEndpoints = globalNotificationEndpoints; ReRegisterSubscriptionMetadata = reRegisterSubscriptionMetadata; + IsTenantLinkedNotificationEnabled = isTenantLinkedNotificationEnabled; + Notifications = notifications; + LinkedNotificationRules = linkedNotificationRules; + ResourceProviderAuthorizationRules = resourceProviderAuthorizationRules; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the provider authentication. + /// The provider authentication. internal ResourceProviderAuthentication ProviderAuthentication { get; } - /// Gets the provider authentication allowed audiences. + /// The allowed audiences. public IList ProviderAuthenticationAllowedAudiences { get => ProviderAuthentication?.AllowedAudiences; } - /// Gets the provider authorizations. + /// The provider authorizations. public IReadOnlyList ProviderAuthorizations { get; } - /// Gets the namespace. + /// The namespace. public string Namespace { get; } - /// Gets the provider version. + /// The services. + public IReadOnlyList Services { get; } + /// The service name. + public string ServiceName { get; } + /// The provider version. public string ProviderVersion { get; } - /// Gets the provider type. + /// The provider type. public ResourceProviderType? ProviderType { get; } - /// Gets the required features. + /// The required features. public IReadOnlyList RequiredFeatures { get; } - /// Gets the features rule. - internal FeaturesRule FeaturesRule { get; } - /// Gets the required features policy. + /// The features rule. + internal ProviderFeaturesRule FeaturesRule { get; } + /// The required feature policy. public FeaturesPolicy? RequiredFeaturesPolicy { get => FeaturesRule?.RequiredFeaturesPolicy; } - /// Gets the request header options. - internal RequestHeaderOptions RequestHeaderOptions { get; } - /// Gets the opt in headers. - public OptInHeaderType? OptInHeaders - { - get => RequestHeaderOptions?.OptInHeaders; - } - - /// Gets the resource types. + /// The request header options. + public ProviderRequestHeaderOptions RequestHeaderOptions { get; } + /// The resource types. public IReadOnlyList ResourceTypes { get; } - /// Gets the management. + /// The resource provider management. public ResourceProviderManagement Management { get; } - /// Gets the capabilities. + /// The capabilities. public IReadOnlyList Capabilities { get; } + /// The cross tenant token validation. + public CrossTenantTokenValidation? CrossTenantTokenValidation { get; } /// - /// Anything + /// The metadata. /// /// To assign an object to this property use . /// @@ -161,9 +178,22 @@ public OptInHeaderType? OptInHeaders /// /// public BinaryData Metadata { get; } - /// Gets the global notification endpoints. + /// The global notification endpoints. public IReadOnlyList GlobalNotificationEndpoints { get; } - /// Gets the re register subscription metadata. + /// The re-register subscription metadata. public ReRegisterSubscriptionMetadata ReRegisterSubscriptionMetadata { get; } + /// Whether tenant linked notification is enabled. + public bool? IsTenantLinkedNotificationEnabled { get; } + /// The notifications. + public IReadOnlyList Notifications { get; } + /// The linked notification rules. + public IReadOnlyList LinkedNotificationRules { get; } + /// The resource provider authorization rules. + internal ResourceProviderAuthorizationRules ResourceProviderAuthorizationRules { get; } + /// The async operation polling rules. + public AsyncOperationPollingRules AsyncOperationPollingRules + { + get => ResourceProviderAuthorizationRules?.AsyncOperationPollingRules; + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestNotificationSettings.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestNotificationSettings.Serialization.cs new file mode 100644 index 000000000000..a108b3a5d514 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestNotificationSettings.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceProviderManifestNotificationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManifestNotificationSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SubscriberSettings)) + { + writer.WritePropertyName("subscriberSettings"u8); + writer.WriteStartArray(); + foreach (var item in SubscriberSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceProviderManifestNotificationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManifestNotificationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProviderManifestNotificationSettings(document.RootElement, options); + } + + internal static ResourceProviderManifestNotificationSettings DeserializeResourceProviderManifestNotificationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList subscriberSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriberSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SubscriberSetting.DeserializeSubscriberSetting(item, options)); + } + subscriberSettings = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProviderManifestNotificationSettings(subscriberSettings ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProviderManifestNotificationSettings)} does not support writing '{options.Format}' format."); + } + } + + ResourceProviderManifestNotificationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceProviderManifestNotificationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProviderManifestNotificationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestNotificationSettings.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestNotificationSettings.cs new file mode 100644 index 000000000000..d9cee6df5c0c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestNotificationSettings.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Notification settings. + internal partial class ResourceProviderManifestNotificationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceProviderManifestNotificationSettings() + { + SubscriberSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ResourceProviderManifestNotificationSettings(IList subscriberSettings, IDictionary serializedAdditionalRawData) + { + SubscriberSettings = subscriberSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the subscriber settings. + public IList SubscriberSettings { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.Serialization.cs index 460bad3d946a..1e6b18c6ee47 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.Serialization.cs @@ -54,6 +54,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("namespace"u8); writer.WriteStringValue(Namespace); } + if (Optional.IsCollectionDefined(Services)) + { + writer.WritePropertyName("services"u8); + writer.WriteStartArray(); + foreach (var item in Services) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ServiceName)) + { + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + } if (Optional.IsDefined(ProviderVersion)) { writer.WritePropertyName("providerVersion"u8); @@ -99,6 +114,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(CrossTenantTokenValidation)) + { + writer.WritePropertyName("crossTenantTokenValidation"u8); + writer.WriteStringValue(CrossTenantTokenValidation.Value.ToString()); + } if (Optional.IsDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -116,6 +136,128 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("templateDeploymentOptions"u8); writer.WriteObjectValue(TemplateDeploymentOptions, options); } + if (Optional.IsCollectionDefined(GlobalNotificationEndpoints)) + { + writer.WritePropertyName("globalNotificationEndpoints"u8); + writer.WriteStartArray(); + foreach (var item in GlobalNotificationEndpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EnableTenantLinkedNotification)) + { + if (EnableTenantLinkedNotification != null) + { + writer.WritePropertyName("enableTenantLinkedNotification"u8); + writer.WriteBooleanValue(EnableTenantLinkedNotification.Value); + } + else + { + writer.WriteNull("enableTenantLinkedNotification"); + } + } + if (Optional.IsCollectionDefined(Notifications)) + { + writer.WritePropertyName("notifications"u8); + writer.WriteStartArray(); + foreach (var item in Notifications) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(LinkedNotificationRules)) + { + writer.WritePropertyName("linkedNotificationRules"u8); + writer.WriteStartArray(); + foreach (var item in LinkedNotificationRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResourceProviderAuthorizationRules)) + { + writer.WritePropertyName("resourceProviderAuthorizationRules"u8); + writer.WriteObjectValue(ResourceProviderAuthorizationRules, options); + } + if (Optional.IsDefined(DstsConfiguration)) + { + writer.WritePropertyName("dstsConfiguration"u8); + writer.WriteObjectValue(DstsConfiguration, options); + } + if (Optional.IsDefined(NotificationOptions)) + { + writer.WritePropertyName("notificationOptions"u8); + writer.WriteStringValue(NotificationOptions.Value.ToString()); + } + if (Optional.IsCollectionDefined(ResourceHydrationAccounts)) + { + writer.WritePropertyName("resourceHydrationAccounts"u8); + writer.WriteStartArray(); + foreach (var item in ResourceHydrationAccounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NotificationSettings)) + { + writer.WritePropertyName("notificationSettings"u8); + writer.WriteObjectValue(NotificationSettings, options); + } + if (Optional.IsCollectionDefined(ManagementGroupGlobalNotificationEndpoints)) + { + writer.WritePropertyName("managementGroupGlobalNotificationEndpoints"u8); + writer.WriteStartArray(); + foreach (var item in ManagementGroupGlobalNotificationEndpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(OptionalFeatures)) + { + writer.WritePropertyName("optionalFeatures"u8); + writer.WriteStartArray(); + foreach (var item in OptionalFeatures) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResourceGroupLockOptionDuringMove)) + { + writer.WritePropertyName("resourceGroupLockOptionDuringMove"u8); + writer.WriteObjectValue(ResourceGroupLockOptionDuringMove, options); + } + if (Optional.IsDefined(ResponseOptions)) + { + writer.WritePropertyName("responseOptions"u8); + writer.WriteObjectValue(ResponseOptions, options); + } + if (Optional.IsDefined(LegacyNamespace)) + { + writer.WritePropertyName("legacyNamespace"u8); + writer.WriteStringValue(LegacyNamespace); + } + if (Optional.IsCollectionDefined(LegacyRegistrations)) + { + writer.WritePropertyName("legacyRegistrations"u8); + writer.WriteStartArray(); + foreach (var item in LegacyRegistrations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(CustomManifestVersion)) + { + writer.WritePropertyName("customManifestVersion"u8); + writer.WriteStringValue(CustomManifestVersion); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -156,15 +298,34 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa ResourceProviderAuthentication providerAuthentication = default; IList providerAuthorizations = default; string @namespace = default; + IList services = default; + string serviceName = default; string providerVersion = default; ResourceProviderType? providerType = default; IList requiredFeatures = default; - FeaturesRule featuresRule = default; - RequestHeaderOptions requestHeaderOptions = default; + ProviderFeaturesRule featuresRule = default; + ProviderRequestHeaderOptions requestHeaderOptions = default; ResourceProviderManagement management = default; IList capabilities = default; + CrossTenantTokenValidation? crossTenantTokenValidation = default; BinaryData metadata = default; TemplateDeploymentOptions templateDeploymentOptions = default; + IList globalNotificationEndpoints = default; + bool? enableTenantLinkedNotification = default; + IList notifications = default; + IList linkedNotificationRules = default; + ResourceProviderAuthorizationRules resourceProviderAuthorizationRules = default; + ProviderDstsConfiguration dstsConfiguration = default; + ProviderNotificationOption? notificationOptions = default; + IList resourceHydrationAccounts = default; + ResourceProviderManifestNotificationSettings notificationSettings = default; + IList managementGroupGlobalNotificationEndpoints = default; + IList optionalFeatures = default; + ResourceProviderManifestResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove = default; + ResourceProviderManifestResponseOptions responseOptions = default; + string legacyNamespace = default; + IList legacyRegistrations = default; + string customManifestVersion = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -197,6 +358,25 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa @namespace = property.Value.GetString(); continue; } + if (property.NameEquals("services"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderService.DeserializeResourceProviderService(item, options)); + } + services = array; + continue; + } + if (property.NameEquals("serviceName"u8)) + { + serviceName = property.Value.GetString(); + continue; + } if (property.NameEquals("providerVersion"u8)) { providerVersion = property.Value.GetString(); @@ -231,7 +411,7 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa { continue; } - featuresRule = FeaturesRule.DeserializeFeaturesRule(property.Value, options); + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); continue; } if (property.NameEquals("requestHeaderOptions"u8)) @@ -240,7 +420,7 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa { continue; } - requestHeaderOptions = RequestHeaderOptions.DeserializeRequestHeaderOptions(property.Value, options); + requestHeaderOptions = ProviderRequestHeaderOptions.DeserializeProviderRequestHeaderOptions(property.Value, options); continue; } if (property.NameEquals("management"u8)) @@ -266,6 +446,15 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa capabilities = array; continue; } + if (property.NameEquals("crossTenantTokenValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crossTenantTokenValidation = new CrossTenantTokenValidation(property.Value.GetString()); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -284,6 +473,178 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa templateDeploymentOptions = TemplateDeploymentOptions.DeserializeTemplateDeploymentOptions(property.Value, options); continue; } + if (property.NameEquals("globalNotificationEndpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderEndpoint.DeserializeResourceProviderEndpoint(item, options)); + } + globalNotificationEndpoints = array; + continue; + } + if (property.NameEquals("enableTenantLinkedNotification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + enableTenantLinkedNotification = null; + continue; + } + enableTenantLinkedNotification = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("notifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderNotification.DeserializeProviderNotification(item, options)); + } + notifications = array; + continue; + } + if (property.NameEquals("linkedNotificationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FanoutLinkedNotificationRule.DeserializeFanoutLinkedNotificationRule(item, options)); + } + linkedNotificationRules = array; + continue; + } + if (property.NameEquals("resourceProviderAuthorizationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceProviderAuthorizationRules = ResourceProviderAuthorizationRules.DeserializeResourceProviderAuthorizationRules(property.Value, options); + continue; + } + if (property.NameEquals("dstsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dstsConfiguration = ProviderDstsConfiguration.DeserializeProviderDstsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("notificationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notificationOptions = new ProviderNotificationOption(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceHydrationAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceHydrationAccount.DeserializeResourceHydrationAccount(item, options)); + } + resourceHydrationAccounts = array; + continue; + } + if (property.NameEquals("notificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notificationSettings = ResourceProviderManifestNotificationSettings.DeserializeResourceProviderManifestNotificationSettings(property.Value, options); + continue; + } + if (property.NameEquals("managementGroupGlobalNotificationEndpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceProviderEndpoint.DeserializeResourceProviderEndpoint(item, options)); + } + managementGroupGlobalNotificationEndpoints = array; + continue; + } + if (property.NameEquals("optionalFeatures"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + optionalFeatures = array; + continue; + } + if (property.NameEquals("resourceGroupLockOptionDuringMove"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGroupLockOptionDuringMove = ResourceProviderManifestResourceGroupLockOptionDuringMove.DeserializeResourceProviderManifestResourceGroupLockOptionDuringMove(property.Value, options); + continue; + } + if (property.NameEquals("responseOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + responseOptions = ResourceProviderManifestResponseOptions.DeserializeResourceProviderManifestResponseOptions(property.Value, options); + continue; + } + if (property.NameEquals("legacyNamespace"u8)) + { + legacyNamespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("legacyRegistrations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + legacyRegistrations = array; + continue; + } + if (property.NameEquals("customManifestVersion"u8)) + { + customManifestVersion = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -294,6 +655,8 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa providerAuthentication, providerAuthorizations ?? new ChangeTrackingList(), @namespace, + services ?? new ChangeTrackingList(), + serviceName, providerVersion, providerType, requiredFeatures ?? new ChangeTrackingList(), @@ -301,8 +664,25 @@ internal static ResourceProviderManifestProperties DeserializeResourceProviderMa requestHeaderOptions, management, capabilities ?? new ChangeTrackingList(), + crossTenantTokenValidation, metadata, templateDeploymentOptions, + globalNotificationEndpoints ?? new ChangeTrackingList(), + enableTenantLinkedNotification, + notifications ?? new ChangeTrackingList(), + linkedNotificationRules ?? new ChangeTrackingList(), + resourceProviderAuthorizationRules, + dstsConfiguration, + notificationOptions, + resourceHydrationAccounts ?? new ChangeTrackingList(), + notificationSettings, + managementGroupGlobalNotificationEndpoints ?? new ChangeTrackingList(), + optionalFeatures ?? new ChangeTrackingList(), + resourceGroupLockOptionDuringMove, + responseOptions, + legacyNamespace, + legacyRegistrations ?? new ChangeTrackingList(), + customManifestVersion, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.cs index 3c3197631336..fe81c0bb89cc 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestProperties.cs @@ -49,29 +49,58 @@ public partial class ResourceProviderManifestProperties public ResourceProviderManifestProperties() { ProviderAuthorizations = new ChangeTrackingList(); + Services = new ChangeTrackingList(); RequiredFeatures = new ChangeTrackingList(); Capabilities = new ChangeTrackingList(); + GlobalNotificationEndpoints = new ChangeTrackingList(); + Notifications = new ChangeTrackingList(); + LinkedNotificationRules = new ChangeTrackingList(); + ResourceHydrationAccounts = new ChangeTrackingList(); + ManagementGroupGlobalNotificationEndpoints = new ChangeTrackingList(); + OptionalFeatures = new ChangeTrackingList(); + LegacyRegistrations = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Anything. - /// + /// The provider authentication. + /// The provider authorizations. + /// The namespace. + /// The services. + /// The service name. + /// The provider version. + /// The provider type. + /// The required features. + /// The features rule. + /// The request header options. + /// The resource provider management. + /// The capabilities. + /// The cross tenant token validation. + /// The metadata. + /// The template deployment options. + /// The global notification endpoints. + /// The enable tenant linked notification. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. + /// The dsts configuration. + /// Notification options. + /// resource hydration accounts. + /// Notification settings. + /// Management groups global notification endpoints. + /// Optional features. + /// Resource group lock option during move. + /// Response options. + /// Legacy namespace. + /// Legacy registrations. + /// Custom manifest version. /// Keeps track of any properties unknown to the library. - internal ResourceProviderManifestProperties(ResourceProviderAuthentication providerAuthentication, IList providerAuthorizations, string @namespace, string providerVersion, ResourceProviderType? providerType, IList requiredFeatures, FeaturesRule featuresRule, RequestHeaderOptions requestHeaderOptions, ResourceProviderManagement management, IList capabilities, BinaryData metadata, TemplateDeploymentOptions templateDeploymentOptions, IDictionary serializedAdditionalRawData) + internal ResourceProviderManifestProperties(ResourceProviderAuthentication providerAuthentication, IList providerAuthorizations, string @namespace, IList services, string serviceName, string providerVersion, ResourceProviderType? providerType, IList requiredFeatures, ProviderFeaturesRule featuresRule, ProviderRequestHeaderOptions requestHeaderOptions, ResourceProviderManagement management, IList capabilities, CrossTenantTokenValidation? crossTenantTokenValidation, BinaryData metadata, TemplateDeploymentOptions templateDeploymentOptions, IList globalNotificationEndpoints, bool? enableTenantLinkedNotification, IList notifications, IList linkedNotificationRules, ResourceProviderAuthorizationRules resourceProviderAuthorizationRules, ProviderDstsConfiguration dstsConfiguration, ProviderNotificationOption? notificationOptions, IList resourceHydrationAccounts, ResourceProviderManifestNotificationSettings notificationSettings, IList managementGroupGlobalNotificationEndpoints, IList optionalFeatures, ResourceProviderManifestResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove, ResourceProviderManifestResponseOptions responseOptions, string legacyNamespace, IList legacyRegistrations, string customManifestVersion, IDictionary serializedAdditionalRawData) { ProviderAuthentication = providerAuthentication; ProviderAuthorizations = providerAuthorizations; Namespace = @namespace; + Services = services; + ServiceName = serviceName; ProviderVersion = providerVersion; ProviderType = providerType; RequiredFeatures = requiredFeatures; @@ -79,62 +108,73 @@ internal ResourceProviderManifestProperties(ResourceProviderAuthentication provi RequestHeaderOptions = requestHeaderOptions; Management = management; Capabilities = capabilities; + CrossTenantTokenValidation = crossTenantTokenValidation; Metadata = metadata; TemplateDeploymentOptions = templateDeploymentOptions; + GlobalNotificationEndpoints = globalNotificationEndpoints; + EnableTenantLinkedNotification = enableTenantLinkedNotification; + Notifications = notifications; + LinkedNotificationRules = linkedNotificationRules; + ResourceProviderAuthorizationRules = resourceProviderAuthorizationRules; + DstsConfiguration = dstsConfiguration; + NotificationOptions = notificationOptions; + ResourceHydrationAccounts = resourceHydrationAccounts; + NotificationSettings = notificationSettings; + ManagementGroupGlobalNotificationEndpoints = managementGroupGlobalNotificationEndpoints; + OptionalFeatures = optionalFeatures; + ResourceGroupLockOptionDuringMove = resourceGroupLockOptionDuringMove; + ResponseOptions = responseOptions; + LegacyNamespace = legacyNamespace; + LegacyRegistrations = legacyRegistrations; + CustomManifestVersion = customManifestVersion; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the provider authentication. + /// The provider authentication. internal ResourceProviderAuthentication ProviderAuthentication { get; set; } - /// Gets or sets the provider authentication allowed audiences. + /// The allowed audiences. public IList ProviderAuthenticationAllowedAudiences { get => ProviderAuthentication is null ? default : ProviderAuthentication.AllowedAudiences; set => ProviderAuthentication = new ResourceProviderAuthentication(value); } - /// Gets the provider authorizations. + /// The provider authorizations. public IList ProviderAuthorizations { get; } - /// Gets or sets the namespace. + /// The namespace. public string Namespace { get; set; } - /// Gets or sets the provider version. + /// The services. + public IList Services { get; } + /// The service name. + public string ServiceName { get; set; } + /// The provider version. public string ProviderVersion { get; set; } - /// Gets or sets the provider type. + /// The provider type. public ResourceProviderType? ProviderType { get; set; } - /// Gets the required features. + /// The required features. public IList RequiredFeatures { get; } - /// Gets or sets the features rule. - internal FeaturesRule FeaturesRule { get; set; } - /// Gets or sets the required features policy. + /// The features rule. + internal ProviderFeaturesRule FeaturesRule { get; set; } + /// The required feature policy. public FeaturesPolicy? RequiredFeaturesPolicy { get => FeaturesRule is null ? default(FeaturesPolicy?) : FeaturesRule.RequiredFeaturesPolicy; set { - FeaturesRule = value.HasValue ? new FeaturesRule(value.Value) : null; + FeaturesRule = value.HasValue ? new ProviderFeaturesRule(value.Value) : null; } } - /// Gets or sets the request header options. - internal RequestHeaderOptions RequestHeaderOptions { get; set; } - /// Gets or sets the opt in headers. - public OptInHeaderType? OptInHeaders - { - get => RequestHeaderOptions is null ? default : RequestHeaderOptions.OptInHeaders; - set - { - if (RequestHeaderOptions is null) - RequestHeaderOptions = new RequestHeaderOptions(); - RequestHeaderOptions.OptInHeaders = value; - } - } - - /// Gets or sets the management. + /// The request header options. + public ProviderRequestHeaderOptions RequestHeaderOptions { get; set; } + /// The resource provider management. public ResourceProviderManagement Management { get; set; } - /// Gets the capabilities. + /// The capabilities. public IList Capabilities { get; } + /// The cross tenant token validation. + public CrossTenantTokenValidation? CrossTenantTokenValidation { get; set; } /// - /// Anything + /// The metadata. /// /// To assign an object to this property use . /// @@ -164,7 +204,86 @@ public OptInHeaderType? OptInHeaders /// /// public BinaryData Metadata { get; set; } - /// Gets or sets the template deployment options. + /// The template deployment options. public TemplateDeploymentOptions TemplateDeploymentOptions { get; set; } + /// The global notification endpoints. + public IList GlobalNotificationEndpoints { get; } + /// The enable tenant linked notification. + public bool? EnableTenantLinkedNotification { get; set; } + /// The notifications. + public IList Notifications { get; } + /// The linked notification rules. + public IList LinkedNotificationRules { get; } + /// The resource provider authorization rules. + internal ResourceProviderAuthorizationRules ResourceProviderAuthorizationRules { get; set; } + /// The async operation polling rules. + public AsyncOperationPollingRules AsyncOperationPollingRules + { + get => ResourceProviderAuthorizationRules is null ? default : ResourceProviderAuthorizationRules.AsyncOperationPollingRules; + set + { + if (ResourceProviderAuthorizationRules is null) + ResourceProviderAuthorizationRules = new ResourceProviderAuthorizationRules(); + ResourceProviderAuthorizationRules.AsyncOperationPollingRules = value; + } + } + + /// The dsts configuration. + public ProviderDstsConfiguration DstsConfiguration { get; set; } + /// Notification options. + public ProviderNotificationOption? NotificationOptions { get; set; } + /// resource hydration accounts. + public IList ResourceHydrationAccounts { get; } + /// Notification settings. + internal ResourceProviderManifestNotificationSettings NotificationSettings { get; set; } + /// Gets the notification subscriber settings. + public IList NotificationSubscriberSettings + { + get + { + if (NotificationSettings is null) + NotificationSettings = new ResourceProviderManifestNotificationSettings(); + return NotificationSettings.SubscriberSettings; + } + } + + /// Management groups global notification endpoints. + public IList ManagementGroupGlobalNotificationEndpoints { get; } + /// Optional features. + public IList OptionalFeatures { get; } + /// Resource group lock option during move. + internal ResourceProviderManifestResourceGroupLockOptionDuringMove ResourceGroupLockOptionDuringMove { get; set; } + /// The action verb that will be blocked when the resource group is locked during move. + public BlockActionVerb? ResourceGroupLockOptionDuringMoveBlockActionVerb + { + get => ResourceGroupLockOptionDuringMove is null ? default : ResourceGroupLockOptionDuringMove.BlockActionVerb; + set + { + if (ResourceGroupLockOptionDuringMove is null) + ResourceGroupLockOptionDuringMove = new ResourceProviderManifestResourceGroupLockOptionDuringMove(); + ResourceGroupLockOptionDuringMove.BlockActionVerb = value; + } + } + + /// Response options. + internal ResourceProviderManifestResponseOptions ResponseOptions { get; set; } + /// Gets or sets the service client options type. + public ServiceClientOptionsType? ServiceClientOptionsType + { + get => ResponseOptions is null ? default : ResponseOptions.ServiceClientOptionsType; + set + { + if (ResponseOptions is null) + ResponseOptions = new ResourceProviderManifestResponseOptions(); + ResponseOptions.ServiceClientOptionsType = value; + } + } + + /// Legacy namespace. + public string LegacyNamespace { get; set; } + /// Legacy registrations. + public IList LegacyRegistrations { get; } + /// Custom manifest version. + public string CustomManifestVersion { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResourceGroupLockOptionDuringMove.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResourceGroupLockOptionDuringMove.Serialization.cs new file mode 100644 index 000000000000..e4b20d841b27 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResourceGroupLockOptionDuringMove.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceProviderManifestResourceGroupLockOptionDuringMove : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManifestResourceGroupLockOptionDuringMove)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(BlockActionVerb)) + { + writer.WritePropertyName("blockActionVerb"u8); + writer.WriteStringValue(BlockActionVerb.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceProviderManifestResourceGroupLockOptionDuringMove IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManifestResourceGroupLockOptionDuringMove)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProviderManifestResourceGroupLockOptionDuringMove(document.RootElement, options); + } + + internal static ResourceProviderManifestResourceGroupLockOptionDuringMove DeserializeResourceProviderManifestResourceGroupLockOptionDuringMove(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BlockActionVerb? blockActionVerb = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blockActionVerb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + blockActionVerb = new BlockActionVerb(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProviderManifestResourceGroupLockOptionDuringMove(blockActionVerb, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProviderManifestResourceGroupLockOptionDuringMove)} does not support writing '{options.Format}' format."); + } + } + + ResourceProviderManifestResourceGroupLockOptionDuringMove IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceProviderManifestResourceGroupLockOptionDuringMove(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProviderManifestResourceGroupLockOptionDuringMove)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResourceGroupLockOptionDuringMove.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResourceGroupLockOptionDuringMove.cs new file mode 100644 index 000000000000..d9f3242f737b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResourceGroupLockOptionDuringMove.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource group lock option during move. + internal partial class ResourceProviderManifestResourceGroupLockOptionDuringMove + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceProviderManifestResourceGroupLockOptionDuringMove() + { + } + + /// Initializes a new instance of . + /// The action verb that will be blocked when the resource group is locked during move. + /// Keeps track of any properties unknown to the library. + internal ResourceProviderManifestResourceGroupLockOptionDuringMove(BlockActionVerb? blockActionVerb, IDictionary serializedAdditionalRawData) + { + BlockActionVerb = blockActionVerb; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The action verb that will be blocked when the resource group is locked during move. + public BlockActionVerb? BlockActionVerb { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResponseOptions.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResponseOptions.Serialization.cs new file mode 100644 index 000000000000..14136e2a7249 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResponseOptions.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceProviderManifestResponseOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManifestResponseOptions)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ServiceClientOptionsType)) + { + writer.WritePropertyName("serviceClientOptionsType"u8); + writer.WriteStringValue(ServiceClientOptionsType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceProviderManifestResponseOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderManifestResponseOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProviderManifestResponseOptions(document.RootElement, options); + } + + internal static ResourceProviderManifestResponseOptions DeserializeResourceProviderManifestResponseOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ServiceClientOptionsType? serviceClientOptionsType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceClientOptionsType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceClientOptionsType = new ServiceClientOptionsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProviderManifestResponseOptions(serviceClientOptionsType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProviderManifestResponseOptions)} does not support writing '{options.Format}' format."); + } + } + + ResourceProviderManifestResponseOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceProviderManifestResponseOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProviderManifestResponseOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResponseOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResponseOptions.cs new file mode 100644 index 000000000000..20f688405b89 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderManifestResponseOptions.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Response options. + internal partial class ResourceProviderManifestResponseOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceProviderManifestResponseOptions() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ResourceProviderManifestResponseOptions(ServiceClientOptionsType? serviceClientOptionsType, IDictionary serializedAdditionalRawData) + { + ServiceClientOptionsType = serviceClientOptionsType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the service client options type. + public ServiceClientOptionsType? ServiceClientOptionsType { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderService.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderService.Serialization.cs new file mode 100644 index 000000000000..51fd9d056166 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderService.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceProviderService : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderService)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ServiceName)) + { + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceProviderService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceProviderService)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceProviderService(document.RootElement, options); + } + + internal static ResourceProviderService DeserializeResourceProviderService(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string serviceName = default; + ResourceProviderServiceStatus? status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceName"u8)) + { + serviceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ResourceProviderServiceStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceProviderService(serviceName, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceProviderService)} does not support writing '{options.Format}' format."); + } + } + + ResourceProviderService IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceProviderService(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceProviderService)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderService.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderService.cs new file mode 100644 index 000000000000..b83aea51aa16 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderService.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource provider service. + public partial class ResourceProviderService + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceProviderService() + { + } + + /// Initializes a new instance of . + /// The service name. + /// The status. + /// Keeps track of any properties unknown to the library. + internal ResourceProviderService(string serviceName, ResourceProviderServiceStatus? status, IDictionary serializedAdditionalRawData) + { + ServiceName = serviceName; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The service name. + public string ServiceName { get; set; } + /// The status. + public ResourceProviderServiceStatus? Status { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderServiceStatus.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderServiceStatus.cs new file mode 100644 index 000000000000..16295a54c107 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderServiceStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The status. + public readonly partial struct ResourceProviderServiceStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceProviderServiceStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string InactiveValue = "Inactive"; + + /// Active. + public static ResourceProviderServiceStatus Active { get; } = new ResourceProviderServiceStatus(ActiveValue); + /// Inactive. + public static ResourceProviderServiceStatus Inactive { get; } = new ResourceProviderServiceStatus(InactiveValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceProviderServiceStatus left, ResourceProviderServiceStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceProviderServiceStatus left, ResourceProviderServiceStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceProviderServiceStatus(string value) => new ResourceProviderServiceStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceProviderServiceStatus other && Equals(other); + /// + public bool Equals(ResourceProviderServiceStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderType.cs index a1c98711e613..e65de20a20a0 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceProviderType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceProviderType. + /// The provider type. public readonly partial struct ResourceProviderType : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceRoutingType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceRoutingType.cs index 5ac10edeb165..fff305cd2009 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceRoutingType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceRoutingType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceRoutingType. + /// The routing type. public readonly partial struct ResourceRoutingType : IEquatable { private readonly string _value; @@ -31,25 +31,40 @@ public ResourceRoutingType(string value) private const string LocationBasedValue = "LocationBased"; private const string FailoverValue = "Failover"; private const string CascadeExtensionValue = "CascadeExtension"; + private const string ChildFanoutValue = "ChildFanout"; + private const string CascadeAuthorizedExtensionValue = "CascadeAuthorizedExtension"; + private const string BypassEndpointSelectionOptimizationValue = "BypassEndpointSelectionOptimization"; + private const string LocationMappingValue = "LocationMapping"; + private const string ServiceFanoutValue = "ServiceFanout"; - /// Default. + /// The resource routing type is default. public static ResourceRoutingType Default { get; } = new ResourceRoutingType(DefaultValue); - /// ProxyOnly. + /// The resource routing type is proxy only. public static ResourceRoutingType ProxyOnly { get; } = new ResourceRoutingType(ProxyOnlyValue); - /// HostBased. + /// The resource routing type is host based. public static ResourceRoutingType HostBased { get; } = new ResourceRoutingType(HostBasedValue); - /// Extension. + /// The resource routing type is extension. public static ResourceRoutingType Extension { get; } = new ResourceRoutingType(ExtensionValue); - /// Tenant. + /// The resource routing type is tenant. public static ResourceRoutingType Tenant { get; } = new ResourceRoutingType(TenantValue); - /// Fanout. + /// The resource routing type is fanout. public static ResourceRoutingType Fanout { get; } = new ResourceRoutingType(FanoutValue); - /// LocationBased. + /// The resource routing type is location based. public static ResourceRoutingType LocationBased { get; } = new ResourceRoutingType(LocationBasedValue); - /// Failover. + /// The resource routing type is failover. public static ResourceRoutingType Failover { get; } = new ResourceRoutingType(FailoverValue); - /// CascadeExtension. + /// The resource routing type is cascade extension. public static ResourceRoutingType CascadeExtension { get; } = new ResourceRoutingType(CascadeExtensionValue); + /// The resource routing type is child fanout. + public static ResourceRoutingType ChildFanout { get; } = new ResourceRoutingType(ChildFanoutValue); + /// The resource routing type is cascade authorized extension. + public static ResourceRoutingType CascadeAuthorizedExtension { get; } = new ResourceRoutingType(CascadeAuthorizedExtensionValue); + /// The resource routing type is bypass endpoint selection optimization. + public static ResourceRoutingType BypassEndpointSelectionOptimization { get; } = new ResourceRoutingType(BypassEndpointSelectionOptimizationValue); + /// The resource routing type is location mapping. + public static ResourceRoutingType LocationMapping { get; } = new ResourceRoutingType(LocationMappingValue); + /// The resource routing type is service fanout. + public static ResourceRoutingType ServiceFanout { get; } = new ResourceRoutingType(ServiceFanoutValue); /// Determines if two values are the same. public static bool operator ==(ResourceRoutingType left, ResourceRoutingType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceSkuCapability.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceSkuCapability.cs index 58ebe5d03a94..fc316989ee31 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceSkuCapability.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceSkuCapability.cs @@ -46,8 +46,8 @@ public partial class ResourceSkuCapability private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// + /// The name. + /// The value. /// or is null. public ResourceSkuCapability(string name, string value) { @@ -59,8 +59,8 @@ public ResourceSkuCapability(string name, string value) } /// Initializes a new instance of . - /// - /// + /// The name. + /// The value. /// Keeps track of any properties unknown to the library. internal ResourceSkuCapability(string name, string value, IDictionary serializedAdditionalRawData) { @@ -74,9 +74,9 @@ internal ResourceSkuCapability() { } - /// Gets or sets the name. + /// The name. public string Name { get; set; } - /// Gets or sets the value. + /// The value. public string Value { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCategory.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCategory.cs new file mode 100644 index 000000000000..34d27d448d16 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCategory.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The category. + public readonly partial struct ResourceTypeCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceTypeCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string FreeFormValue = "FreeForm"; + private const string InternalValue = "Internal"; + private const string PureProxyValue = "PureProxy"; + + /// None. + public static ResourceTypeCategory None { get; } = new ResourceTypeCategory(NoneValue); + /// FreeForm. + public static ResourceTypeCategory FreeForm { get; } = new ResourceTypeCategory(FreeFormValue); + /// Internal. + public static ResourceTypeCategory Internal { get; } = new ResourceTypeCategory(InternalValue); + /// PureProxy. + public static ResourceTypeCategory PureProxy { get; } = new ResourceTypeCategory(PureProxyValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceTypeCategory left, ResourceTypeCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceTypeCategory left, ResourceTypeCategory right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceTypeCategory(string value) => new ResourceTypeCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceTypeCategory other && Equals(other); + /// + public bool Equals(ResourceTypeCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCommonAttributeManagement.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCommonAttributeManagement.Serialization.cs new file mode 100644 index 000000000000..3af7930e2f63 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCommonAttributeManagement.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceTypeCommonAttributeManagement : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeCommonAttributeManagement)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CommonApiVersionsMergeMode)) + { + writer.WritePropertyName("commonApiVersionsMergeMode"u8); + writer.WriteStringValue(CommonApiVersionsMergeMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeCommonAttributeManagement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeCommonAttributeManagement)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeCommonAttributeManagement(document.RootElement, options); + } + + internal static ResourceTypeCommonAttributeManagement DeserializeResourceTypeCommonAttributeManagement(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommonApiVersionsMergeMode? commonApiVersionsMergeMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("commonApiVersionsMergeMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + commonApiVersionsMergeMode = new CommonApiVersionsMergeMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeCommonAttributeManagement(commonApiVersionsMergeMode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeCommonAttributeManagement)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeCommonAttributeManagement IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeCommonAttributeManagement(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeCommonAttributeManagement)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCommonAttributeManagement.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCommonAttributeManagement.cs new file mode 100644 index 000000000000..5ecea32292fd --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeCommonAttributeManagement.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource type common attribute management. + internal partial class ResourceTypeCommonAttributeManagement + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeCommonAttributeManagement() + { + } + + /// Initializes a new instance of . + /// Common api versions merge mode. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeCommonAttributeManagement(CommonApiVersionsMergeMode? commonApiVersionsMergeMode, IDictionary serializedAdditionalRawData) + { + CommonApiVersionsMergeMode = commonApiVersionsMergeMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Common api versions merge mode. + public CommonApiVersionsMergeMode? CommonApiVersionsMergeMode { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeDataBoundary.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeDataBoundary.cs new file mode 100644 index 000000000000..9016a29b0293 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeDataBoundary.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The data boundary. + public readonly partial struct ResourceTypeDataBoundary : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceTypeDataBoundary(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotDefinedValue = "NotDefined"; + private const string GlobalValue = "Global"; + private const string EUValue = "EU"; + private const string USValue = "US"; + + /// NotDefined. + public static ResourceTypeDataBoundary NotDefined { get; } = new ResourceTypeDataBoundary(NotDefinedValue); + /// Global. + public static ResourceTypeDataBoundary Global { get; } = new ResourceTypeDataBoundary(GlobalValue); + /// EU. + public static ResourceTypeDataBoundary EU { get; } = new ResourceTypeDataBoundary(EUValue); + /// US. + public static ResourceTypeDataBoundary US { get; } = new ResourceTypeDataBoundary(USValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceTypeDataBoundary left, ResourceTypeDataBoundary right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceTypeDataBoundary left, ResourceTypeDataBoundary right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceTypeDataBoundary(string value) => new ResourceTypeDataBoundary(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceTypeDataBoundary other && Equals(other); + /// + public bool Equals(ResourceTypeDataBoundary other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.Serialization.cs index 9af97e5e1053..5cc966ca8aa7 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.Serialization.cs @@ -34,6 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResourceTypeEndpoint)} does not support writing '{format}' format."); } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -89,6 +94,51 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("timeout"u8); writer.WriteStringValue(Timeout.Value, "P"); } + if (Optional.IsDefined(EndpointType)) + { + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.Value.ToString()); + } + if (Optional.IsDefined(TokenAuthConfiguration)) + { + writer.WritePropertyName("tokenAuthConfiguration"u8); + writer.WriteObjectValue(TokenAuthConfiguration, options); + } + if (Optional.IsDefined(SkuLink)) + { + writer.WritePropertyName("skuLink"u8); + writer.WriteStringValue(SkuLink); + } + if (Optional.IsDefined(EndpointUri)) + { + writer.WritePropertyName("endpointUri"u8); + writer.WriteStringValue(EndpointUri.AbsoluteUri); + } + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DstsConfiguration)) + { + writer.WritePropertyName("dstsConfiguration"u8); + writer.WriteObjectValue(DstsConfiguration, options); + } + if (Optional.IsDefined(DataBoundary)) + { + writer.WritePropertyName("dataBoundary"u8); + writer.WriteStringValue(DataBoundary.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -126,17 +176,35 @@ internal static ResourceTypeEndpoint DeserializeResourceTypeEndpoint(JsonElement { return null; } + ResourceTypeEndpointKind? kind = default; bool? enabled = default; IList apiVersions = default; IList locations = default; IList requiredFeatures = default; - FeaturesRule featuresRule = default; + ProviderFeaturesRule featuresRule = default; IList extensions = default; TimeSpan? timeout = default; + ProviderEndpointTypeResourceType? endpointType = default; + TokenAuthConfiguration tokenAuthConfiguration = default; + string skuLink = default; + Uri endpointUri = default; + string apiVersion = default; + IList zones = default; + ProviderDstsConfiguration dstsConfiguration = default; + ResourceTypeDataBoundary? dataBoundary = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new ResourceTypeEndpointKind(property.Value.GetString()); + continue; + } if (property.NameEquals("enabled"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -194,7 +262,7 @@ internal static ResourceTypeEndpoint DeserializeResourceTypeEndpoint(JsonElement { continue; } - featuresRule = FeaturesRule.DeserializeFeaturesRule(property.Value, options); + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); continue; } if (property.NameEquals("extensions"u8)) @@ -220,6 +288,75 @@ internal static ResourceTypeEndpoint DeserializeResourceTypeEndpoint(JsonElement timeout = property.Value.GetTimeSpan("P"); continue; } + if (property.NameEquals("endpointType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointType = new ProviderEndpointTypeResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("tokenAuthConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenAuthConfiguration = TokenAuthConfiguration.DeserializeTokenAuthConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("skuLink"u8)) + { + skuLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("dstsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dstsConfiguration = ProviderDstsConfiguration.DeserializeProviderDstsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("dataBoundary"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataBoundary = new ResourceTypeDataBoundary(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -227,6 +364,7 @@ internal static ResourceTypeEndpoint DeserializeResourceTypeEndpoint(JsonElement } serializedAdditionalRawData = rawDataDictionary; return new ResourceTypeEndpoint( + kind, enabled, apiVersions ?? new ChangeTrackingList(), locations ?? new ChangeTrackingList(), @@ -234,6 +372,14 @@ internal static ResourceTypeEndpoint DeserializeResourceTypeEndpoint(JsonElement featuresRule, extensions ?? new ChangeTrackingList(), timeout, + endpointType, + tokenAuthConfiguration, + skuLink, + endpointUri, + apiVersion, + zones ?? new ChangeTrackingList(), + dstsConfiguration, + dataBoundary, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.cs index ab520fb0d5dc..4f0175c32227 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpoint.cs @@ -53,19 +53,30 @@ public ResourceTypeEndpoint() Locations = new ChangeTrackingList(); RequiredFeatures = new ChangeTrackingList(); Extensions = new ChangeTrackingList(); + Zones = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// + /// Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Whether the endpoint is enabled. + /// The api versions. + /// The locations. + /// The required features. + /// The features rule. + /// The extensions. + /// The timeout. + /// The endpoint type. + /// The token auth configuration. + /// The sku link. + /// The endpoint uri. + /// Api version. + /// List of zones. + /// The dsts configuration. + /// The data boundary. /// Keeps track of any properties unknown to the library. - internal ResourceTypeEndpoint(bool? isEnabled, IList apiVersions, IList locations, IList requiredFeatures, FeaturesRule featuresRule, IList extensions, TimeSpan? timeout, IDictionary serializedAdditionalRawData) + internal ResourceTypeEndpoint(ResourceTypeEndpointKind? kind, bool? isEnabled, IList apiVersions, IList locations, IList requiredFeatures, ProviderFeaturesRule featuresRule, IList extensions, TimeSpan? timeout, ProviderEndpointTypeResourceType? endpointType, TokenAuthConfiguration tokenAuthConfiguration, string skuLink, Uri endpointUri, string apiVersion, IList zones, ProviderDstsConfiguration dstsConfiguration, ResourceTypeDataBoundary? dataBoundary, IDictionary serializedAdditionalRawData) { + Kind = kind; IsEnabled = isEnabled; ApiVersions = apiVersions; Locations = locations; @@ -73,32 +84,58 @@ internal ResourceTypeEndpoint(bool? isEnabled, IList apiVersions, IList< FeaturesRule = featuresRule; Extensions = extensions; Timeout = timeout; + EndpointType = endpointType; + TokenAuthConfiguration = tokenAuthConfiguration; + SkuLink = skuLink; + EndpointUri = endpointUri; + ApiVersion = apiVersion; + Zones = zones; + DstsConfiguration = dstsConfiguration; + DataBoundary = dataBoundary; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the is enabled. + /// Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. + public ResourceTypeEndpointKind? Kind { get; set; } + /// Whether the endpoint is enabled. public bool? IsEnabled { get; set; } - /// Gets the api versions. + /// The api versions. public IList ApiVersions { get; } - /// Gets the locations. + /// The locations. public IList Locations { get; } - /// Gets the required features. + /// The required features. public IList RequiredFeatures { get; } - /// Gets or sets the features rule. - internal FeaturesRule FeaturesRule { get; set; } - /// Gets or sets the required features policy. + /// The features rule. + internal ProviderFeaturesRule FeaturesRule { get; set; } + /// The required feature policy. public FeaturesPolicy? RequiredFeaturesPolicy { get => FeaturesRule is null ? default(FeaturesPolicy?) : FeaturesRule.RequiredFeaturesPolicy; set { - FeaturesRule = value.HasValue ? new FeaturesRule(value.Value) : null; + FeaturesRule = value.HasValue ? new ProviderFeaturesRule(value.Value) : null; } } - /// Gets the extensions. + /// The extensions. public IList Extensions { get; } - /// Gets or sets the timeout. + /// The timeout. public TimeSpan? Timeout { get; set; } + /// The endpoint type. + public ProviderEndpointTypeResourceType? EndpointType { get; set; } + /// The token auth configuration. + public TokenAuthConfiguration TokenAuthConfiguration { get; set; } + /// The sku link. + public string SkuLink { get; set; } + /// The endpoint uri. + public Uri EndpointUri { get; set; } + /// Api version. + public string ApiVersion { get; set; } + /// List of zones. + public IList Zones { get; } + /// The dsts configuration. + public ProviderDstsConfiguration DstsConfiguration { get; set; } + /// The data boundary. + public ResourceTypeDataBoundary? DataBoundary { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointBase.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointBase.Serialization.cs new file mode 100644 index 000000000000..43d5f7810b30 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointBase.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeEndpointBase : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeEndpointBase)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + writer.WritePropertyName("apiVersions"u8); + writer.WriteStartArray(); + foreach (var item in ApiVersions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("endpointUri"u8); + writer.WriteStringValue(EndpointUri.AbsoluteUri); + writer.WritePropertyName("locations"u8); + writer.WriteStartArray(); + foreach (var item in Locations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("requiredFeatures"u8); + writer.WriteStartArray(); + foreach (var item in RequiredFeatures) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("featuresRule"u8); + writer.WriteObjectValue(FeaturesRule, options); + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout, "P"); + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.ToString()); + writer.WritePropertyName("dstsConfiguration"u8); + writer.WriteObjectValue(DstsConfiguration, options); + writer.WritePropertyName("skuLink"u8); + writer.WriteStringValue(SkuLink); + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeEndpointBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeEndpointBase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeEndpointBase(document.RootElement, options); + } + + internal static ResourceTypeEndpointBase DeserializeResourceTypeEndpointBase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool enabled = default; + IList apiVersions = default; + Uri endpointUri = default; + IList locations = default; + IList requiredFeatures = default; + ProviderFeaturesRule featuresRule = default; + TimeSpan timeout = default; + ProviderEndpointType endpointType = default; + ProviderDstsConfiguration dstsConfiguration = default; + string skuLink = default; + string apiVersion = default; + IList zones = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("apiVersions"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + apiVersions = array; + continue; + } + if (property.NameEquals("endpointUri"u8)) + { + endpointUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("locations"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + locations = array; + continue; + } + if (property.NameEquals("requiredFeatures"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredFeatures = array; + continue; + } + if (property.NameEquals("featuresRule"u8)) + { + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); + continue; + } + if (property.NameEquals("timeout"u8)) + { + timeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + endpointType = new ProviderEndpointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dstsConfiguration"u8)) + { + dstsConfiguration = ProviderDstsConfiguration.DeserializeProviderDstsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("skuLink"u8)) + { + skuLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("zones"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeEndpointBase( + enabled, + apiVersions, + endpointUri, + locations, + requiredFeatures, + featuresRule, + timeout, + endpointType, + dstsConfiguration, + skuLink, + apiVersion, + zones, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeEndpointBase)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeEndpointBase IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeEndpointBase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeEndpointBase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointBase.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointBase.cs new file mode 100644 index 000000000000..8bccf7aff84a --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointBase.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeEndpointBase. + public partial class ResourceTypeEndpointBase + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Whether it's enabled. + /// The api versions. + /// The endpoint uri. + /// The locations. + /// The required features. + /// The features rule. + /// This is a TimeSpan property. + /// The endpoint type. + /// The dsts configuration. + /// The sku link. + /// The api version. + /// The zones. + /// , , , , , , , or is null. + public ResourceTypeEndpointBase(bool enabled, IEnumerable apiVersions, Uri endpointUri, IEnumerable locations, IEnumerable requiredFeatures, ProviderFeaturesRule featuresRule, TimeSpan timeout, ProviderEndpointType endpointType, ProviderDstsConfiguration dstsConfiguration, string skuLink, string apiVersion, IEnumerable zones) + { + Argument.AssertNotNull(apiVersions, nameof(apiVersions)); + Argument.AssertNotNull(endpointUri, nameof(endpointUri)); + Argument.AssertNotNull(locations, nameof(locations)); + Argument.AssertNotNull(requiredFeatures, nameof(requiredFeatures)); + Argument.AssertNotNull(featuresRule, nameof(featuresRule)); + Argument.AssertNotNull(dstsConfiguration, nameof(dstsConfiguration)); + Argument.AssertNotNull(skuLink, nameof(skuLink)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(zones, nameof(zones)); + + Enabled = enabled; + ApiVersions = apiVersions.ToList(); + EndpointUri = endpointUri; + Locations = locations.ToList(); + RequiredFeatures = requiredFeatures.ToList(); + FeaturesRule = featuresRule; + Timeout = timeout; + EndpointType = endpointType; + DstsConfiguration = dstsConfiguration; + SkuLink = skuLink; + ApiVersion = apiVersion; + Zones = zones.ToList(); + } + + /// Initializes a new instance of . + /// Whether it's enabled. + /// The api versions. + /// The endpoint uri. + /// The locations. + /// The required features. + /// The features rule. + /// This is a TimeSpan property. + /// The endpoint type. + /// The dsts configuration. + /// The sku link. + /// The api version. + /// The zones. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeEndpointBase(bool enabled, IList apiVersions, Uri endpointUri, IList locations, IList requiredFeatures, ProviderFeaturesRule featuresRule, TimeSpan timeout, ProviderEndpointType endpointType, ProviderDstsConfiguration dstsConfiguration, string skuLink, string apiVersion, IList zones, IDictionary serializedAdditionalRawData) + { + Enabled = enabled; + ApiVersions = apiVersions; + EndpointUri = endpointUri; + Locations = locations; + RequiredFeatures = requiredFeatures; + FeaturesRule = featuresRule; + Timeout = timeout; + EndpointType = endpointType; + DstsConfiguration = dstsConfiguration; + SkuLink = skuLink; + ApiVersion = apiVersion; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceTypeEndpointBase() + { + } + + /// Whether it's enabled. + public bool Enabled { get; } + /// The api versions. + public IList ApiVersions { get; } + /// The endpoint uri. + public Uri EndpointUri { get; } + /// The locations. + public IList Locations { get; } + /// The required features. + public IList RequiredFeatures { get; } + /// The features rule. + internal ProviderFeaturesRule FeaturesRule { get; } + /// The required feature policy. + public FeaturesPolicy? RequiredFeaturesPolicy + { + get => FeaturesRule?.RequiredFeaturesPolicy; + } + + /// This is a TimeSpan property. + public TimeSpan Timeout { get; } + /// The endpoint type. + public ProviderEndpointType EndpointType { get; } + /// The dsts configuration. + public ProviderDstsConfiguration DstsConfiguration { get; } + /// The sku link. + public string SkuLink { get; } + /// The api version. + public string ApiVersion { get; } + /// The zones. + public IList Zones { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointKind.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointKind.cs new file mode 100644 index 000000000000..6e9dbe961c48 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeEndpointKind.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. + public readonly partial struct ResourceTypeEndpointKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceTypeEndpointKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManagedValue = "Managed"; + private const string DirectValue = "Direct"; + + /// Endpoint served by ProviderHub service. + public static ResourceTypeEndpointKind Managed { get; } = new ResourceTypeEndpointKind(ManagedValue); + /// Endpoint served by the onboarded Resource Provider Service. + public static ResourceTypeEndpointKind Direct { get; } = new ResourceTypeEndpointKind(DirectValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceTypeEndpointKind left, ResourceTypeEndpointKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceTypeEndpointKind left, ResourceTypeEndpointKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceTypeEndpointKind(string value) => new ResourceTypeEndpointKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceTypeEndpointKind other && Equals(other); + /// + public bool Equals(ResourceTypeEndpointKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtendedLocationPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtendedLocationPolicy.cs new file mode 100644 index 000000000000..63c64ed604a9 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtendedLocationPolicy.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeExtendedLocationPolicy. + public readonly partial struct ResourceTypeExtendedLocationPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceTypeExtendedLocationPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string AllValue = "All"; + + /// NotSpecified. + public static ResourceTypeExtendedLocationPolicy NotSpecified { get; } = new ResourceTypeExtendedLocationPolicy(NotSpecifiedValue); + /// All. + public static ResourceTypeExtendedLocationPolicy All { get; } = new ResourceTypeExtendedLocationPolicy(AllValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceTypeExtendedLocationPolicy left, ResourceTypeExtendedLocationPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceTypeExtendedLocationPolicy left, ResourceTypeExtendedLocationPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceTypeExtendedLocationPolicy(string value) => new ResourceTypeExtendedLocationPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceTypeExtendedLocationPolicy other && Equals(other); + /// + public bool Equals(ResourceTypeExtendedLocationPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtension.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtension.cs index 8217889b4e23..04b0d6787724 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtension.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtension.cs @@ -52,9 +52,9 @@ public ResourceTypeExtension() } /// Initializes a new instance of . - /// - /// - /// + /// The endpoint uri. + /// The extension categories. + /// The timeout. /// Keeps track of any properties unknown to the library. internal ResourceTypeExtension(Uri endpointUri, IList extensionCategories, TimeSpan? timeout, IDictionary serializedAdditionalRawData) { @@ -64,11 +64,11 @@ internal ResourceTypeExtension(Uri endpointUri, IList Gets or sets the endpoint uri. + /// The endpoint uri. public Uri EndpointUri { get; set; } - /// Gets the extension categories. + /// The extension categories. public IList ExtensionCategories { get; } - /// Gets or sets the timeout. + /// The timeout. public TimeSpan? Timeout { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionCategory.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionCategory.cs index 6812da1f129c..e5751a38d818 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionCategory.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionCategory.cs @@ -38,6 +38,8 @@ public ResourceTypeExtensionCategory(string value) private const string ResourcePatchBeginValue = "ResourcePatchBegin"; private const string ResourceMoveBeginValue = "ResourceMoveBegin"; private const string ResourceMoveCompletedValue = "ResourceMoveCompleted"; + private const string BestMatchOperationBeginValue = "BestMatchOperationBegin"; + private const string SubscriptionLifecycleNotificationDeletionValue = "SubscriptionLifecycleNotificationDeletion"; /// NotSpecified. public static ResourceTypeExtensionCategory NotSpecified { get; } = new ResourceTypeExtensionCategory(NotSpecifiedValue); @@ -71,6 +73,10 @@ public ResourceTypeExtensionCategory(string value) public static ResourceTypeExtensionCategory ResourceMoveBegin { get; } = new ResourceTypeExtensionCategory(ResourceMoveBeginValue); /// ResourceMoveCompleted. public static ResourceTypeExtensionCategory ResourceMoveCompleted { get; } = new ResourceTypeExtensionCategory(ResourceMoveCompletedValue); + /// BestMatchOperationBegin. + public static ResourceTypeExtensionCategory BestMatchOperationBegin { get; } = new ResourceTypeExtensionCategory(BestMatchOperationBeginValue); + /// SubscriptionLifecycleNotificationDeletion. + public static ResourceTypeExtensionCategory SubscriptionLifecycleNotificationDeletion { get; } = new ResourceTypeExtensionCategory(SubscriptionLifecycleNotificationDeletionValue); /// Determines if two values are the same. public static bool operator ==(ResourceTypeExtensionCategory left, ResourceTypeExtensionCategory right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionOptions.cs index 6c4cfb3d62cb..5f63f4b5c2d3 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionOptions.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeExtensionOptions.cs @@ -51,7 +51,7 @@ public ResourceTypeExtensionOptions() } /// Initializes a new instance of . - /// + /// Resource creation begin. /// Keeps track of any properties unknown to the library. internal ResourceTypeExtensionOptions(ExtensionOptions resourceCreationBegin, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal ResourceTypeExtensionOptions(ExtensionOptions resourceCreationBegin, ID _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the resource creation begin. + /// Resource creation begin. public ExtensionOptions ResourceCreationBegin { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeOnBehalfOfToken.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeOnBehalfOfToken.Serialization.cs new file mode 100644 index 000000000000..8b915715274c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeOnBehalfOfToken.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeOnBehalfOfToken : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeOnBehalfOfToken)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ActionName)) + { + writer.WritePropertyName("actionName"u8); + writer.WriteStringValue(ActionName); + } + if (Optional.IsDefined(LifeTime)) + { + writer.WritePropertyName("lifeTime"u8); + writer.WriteStringValue(LifeTime); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeOnBehalfOfToken IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeOnBehalfOfToken)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeOnBehalfOfToken(document.RootElement, options); + } + + internal static ResourceTypeOnBehalfOfToken DeserializeResourceTypeOnBehalfOfToken(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string actionName = default; + string lifeTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionName"u8)) + { + actionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifeTime"u8)) + { + lifeTime = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeOnBehalfOfToken(actionName, lifeTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeOnBehalfOfToken)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeOnBehalfOfToken IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeOnBehalfOfToken(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeOnBehalfOfToken)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeOnBehalfOfToken.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeOnBehalfOfToken.cs new file mode 100644 index 000000000000..13f1be196f28 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeOnBehalfOfToken.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeOnBehalfOfToken. + public partial class ResourceTypeOnBehalfOfToken + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeOnBehalfOfToken() + { + } + + /// Initializes a new instance of . + /// The action name. + /// This is a TimeSpan property. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeOnBehalfOfToken(string actionName, string lifeTime, IDictionary serializedAdditionalRawData) + { + ActionName = actionName; + LifeTime = lifeTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The action name. + public string ActionName { get; set; } + /// This is a TimeSpan property. + public string LifeTime { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationApiProfile.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationApiProfile.Serialization.cs new file mode 100644 index 000000000000..5118b25e5fd0 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationApiProfile.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeRegistrationApiProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationApiProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProfileVersion)) + { + writer.WritePropertyName("profileVersion"u8); + writer.WriteStringValue(ProfileVersion); + } + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationApiProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationApiProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationApiProfile(document.RootElement, options); + } + + internal static ResourceTypeRegistrationApiProfile DeserializeResourceTypeRegistrationApiProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string profileVersion = default; + string apiVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("profileVersion"u8)) + { + profileVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationApiProfile(profileVersion, apiVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationApiProfile)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationApiProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationApiProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationApiProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationApiProfile.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationApiProfile.cs new file mode 100644 index 000000000000..b2cab414a7df --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationApiProfile.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeRegistrationApiProfile. + public partial class ResourceTypeRegistrationApiProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationApiProfile() + { + } + + /// Initializes a new instance of . + /// Profile version. + /// Api version. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationApiProfile(string profileVersion, string apiVersion, IDictionary serializedAdditionalRawData) + { + ProfileVersion = profileVersion; + ApiVersion = apiVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Profile version. + public string ProfileVersion { get; set; } + /// Api version. + public string ApiVersion { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationAvailabilityZoneRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationAvailabilityZoneRule.Serialization.cs new file mode 100644 index 000000000000..c9e233763b62 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationAvailabilityZoneRule.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceTypeRegistrationAvailabilityZoneRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationAvailabilityZoneRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AvailabilityZonePolicy)) + { + writer.WritePropertyName("availabilityZonePolicy"u8); + writer.WriteStringValue(AvailabilityZonePolicy.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationAvailabilityZoneRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationAvailabilityZoneRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationAvailabilityZoneRule(document.RootElement, options); + } + + internal static ResourceTypeRegistrationAvailabilityZoneRule DeserializeResourceTypeRegistrationAvailabilityZoneRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AvailabilityZonePolicy? availabilityZonePolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availabilityZonePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityZonePolicy = new AvailabilityZonePolicy(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationAvailabilityZoneRule(availabilityZonePolicy, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationAvailabilityZoneRule)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationAvailabilityZoneRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationAvailabilityZoneRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationAvailabilityZoneRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationAvailabilityZoneRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationAvailabilityZoneRule.cs new file mode 100644 index 000000000000..a984fb404221 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationAvailabilityZoneRule.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The availability zone rule. + internal partial class ResourceTypeRegistrationAvailabilityZoneRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationAvailabilityZoneRule() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationAvailabilityZoneRule(AvailabilityZonePolicy? availabilityZonePolicy, IDictionary serializedAdditionalRawData) + { + AvailabilityZonePolicy = availabilityZonePolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the availability zone policy. + public AvailabilityZonePolicy? AvailabilityZonePolicy { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityPolicy.cs new file mode 100644 index 000000000000..a425b57e3078 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityPolicy.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Capacity policy. + public readonly partial struct ResourceTypeRegistrationCapacityPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceTypeRegistrationCapacityPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "Default"; + private const string RestrictedValue = "Restricted"; + + /// Default. + public static ResourceTypeRegistrationCapacityPolicy Default { get; } = new ResourceTypeRegistrationCapacityPolicy(DefaultValue); + /// Restricted. + public static ResourceTypeRegistrationCapacityPolicy Restricted { get; } = new ResourceTypeRegistrationCapacityPolicy(RestrictedValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceTypeRegistrationCapacityPolicy left, ResourceTypeRegistrationCapacityPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceTypeRegistrationCapacityPolicy left, ResourceTypeRegistrationCapacityPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceTypeRegistrationCapacityPolicy(string value) => new ResourceTypeRegistrationCapacityPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceTypeRegistrationCapacityPolicy other && Equals(other); + /// + public bool Equals(ResourceTypeRegistrationCapacityPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityRule.Serialization.cs new file mode 100644 index 000000000000..f9390eb13694 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityRule.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeRegistrationCapacityRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationCapacityRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CapacityPolicy)) + { + writer.WritePropertyName("capacityPolicy"u8); + writer.WriteStringValue(CapacityPolicy.Value.ToString()); + } + if (Optional.IsDefined(SkuAlias)) + { + writer.WritePropertyName("skuAlias"u8); + writer.WriteStringValue(SkuAlias); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationCapacityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationCapacityRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationCapacityRule(document.RootElement, options); + } + + internal static ResourceTypeRegistrationCapacityRule DeserializeResourceTypeRegistrationCapacityRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceTypeRegistrationCapacityPolicy? capacityPolicy = default; + string skuAlias = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("capacityPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityPolicy = new ResourceTypeRegistrationCapacityPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("skuAlias"u8)) + { + skuAlias = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationCapacityRule(capacityPolicy, skuAlias, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationCapacityRule)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationCapacityRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationCapacityRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationCapacityRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityRule.cs new file mode 100644 index 000000000000..5141d1fc40d5 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationCapacityRule.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Capacity rule. + public partial class ResourceTypeRegistrationCapacityRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationCapacityRule() + { + } + + /// Initializes a new instance of . + /// Capacity policy. + /// Sku alias. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationCapacityRule(ResourceTypeRegistrationCapacityPolicy? capacityPolicy, string skuAlias, IDictionary serializedAdditionalRawData) + { + CapacityPolicy = capacityPolicy; + SkuAlias = skuAlias; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Capacity policy. + public ResourceTypeRegistrationCapacityPolicy? CapacityPolicy { get; set; } + /// Sku alias. + public string SkuAlias { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationDeleteDependency.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationDeleteDependency.Serialization.cs new file mode 100644 index 000000000000..979e4da08d8b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationDeleteDependency.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeRegistrationDeleteDependency : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationDeleteDependency)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(RequiredFeatures)) + { + writer.WritePropertyName("requiredFeatures"u8); + writer.WriteStartArray(); + foreach (var item in RequiredFeatures) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LinkedProperty)) + { + writer.WritePropertyName("linkedProperty"u8); + writer.WriteStringValue(LinkedProperty); + } + if (Optional.IsDefined(LinkedType)) + { + writer.WritePropertyName("linkedType"u8); + writer.WriteStringValue(LinkedType); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationDeleteDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationDeleteDependency)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationDeleteDependency(document.RootElement, options); + } + + internal static ResourceTypeRegistrationDeleteDependency DeserializeResourceTypeRegistrationDeleteDependency(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList requiredFeatures = default; + string linkedProperty = default; + string linkedType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("requiredFeatures"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredFeatures = array; + continue; + } + if (property.NameEquals("linkedProperty"u8)) + { + linkedProperty = property.Value.GetString(); + continue; + } + if (property.NameEquals("linkedType"u8)) + { + linkedType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationDeleteDependency(requiredFeatures ?? new ChangeTrackingList(), linkedProperty, linkedType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationDeleteDependency)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationDeleteDependency IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationDeleteDependency(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationDeleteDependency)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationDeleteDependency.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationDeleteDependency.cs new file mode 100644 index 000000000000..c92fd0620ab7 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationDeleteDependency.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ResourceTypeRegistrationDeleteDependency. + public partial class ResourceTypeRegistrationDeleteDependency + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationDeleteDependency() + { + RequiredFeatures = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Required features. + /// Linked property. + /// Linked type. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationDeleteDependency(IList requiredFeatures, string linkedProperty, string linkedType, IDictionary serializedAdditionalRawData) + { + RequiredFeatures = requiredFeatures; + LinkedProperty = linkedProperty; + LinkedType = linkedType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Required features. + public IList RequiredFeatures { get; } + /// Linked property. + public string LinkedProperty { get; set; } + /// Linked type. + public string LinkedType { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationKind.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationKind.cs new file mode 100644 index 000000000000..ef2de7f9a129 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationKind.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource type registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. + public readonly partial struct ResourceTypeRegistrationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceTypeRegistrationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManagedValue = "Managed"; + private const string HybridValue = "Hybrid"; + private const string DirectValue = "Direct"; + + /// Resource type served by the ProviderHub service. + public static ResourceTypeRegistrationKind Managed { get; } = new ResourceTypeRegistrationKind(ManagedValue); + /// Resource type served by both the ProviderHub & the onboarded Resource Provider Services (i.e. The type has a mix of managed and direct endpoints). + public static ResourceTypeRegistrationKind Hybrid { get; } = new ResourceTypeRegistrationKind(HybridValue); + /// Resource type served by the onboarded Resource Provider Service. + public static ResourceTypeRegistrationKind Direct { get; } = new ResourceTypeRegistrationKind(DirectValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceTypeRegistrationKind left, ResourceTypeRegistrationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceTypeRegistrationKind left, ResourceTypeRegistrationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceTypeRegistrationKind(string value) => new ResourceTypeRegistrationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceTypeRegistrationKind other && Equals(other); + /// + public bool Equals(ResourceTypeRegistrationKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationLegacyPolicy.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationLegacyPolicy.Serialization.cs new file mode 100644 index 000000000000..9a878dd73826 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationLegacyPolicy.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeRegistrationLegacyPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationLegacyPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(DisallowedLegacyOperations)) + { + writer.WritePropertyName("disallowedLegacyOperations"u8); + writer.WriteStartArray(); + foreach (var item in DisallowedLegacyOperations) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DisallowedConditions)) + { + writer.WritePropertyName("disallowedConditions"u8); + writer.WriteStartArray(); + foreach (var item in DisallowedConditions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationLegacyPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationLegacyPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationLegacyPolicy(document.RootElement, options); + } + + internal static ResourceTypeRegistrationLegacyPolicy DeserializeResourceTypeRegistrationLegacyPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList disallowedLegacyOperations = default; + IList disallowedConditions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disallowedLegacyOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ProviderLegacyOperation(item.GetString())); + } + disallowedLegacyOperations = array; + continue; + } + if (property.NameEquals("disallowedConditions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LegacyDisallowedCondition.DeserializeLegacyDisallowedCondition(item, options)); + } + disallowedConditions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationLegacyPolicy(disallowedLegacyOperations ?? new ChangeTrackingList(), disallowedConditions ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationLegacyPolicy)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationLegacyPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationLegacyPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationLegacyPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationLegacyPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationLegacyPolicy.cs new file mode 100644 index 000000000000..8d44c70dc082 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationLegacyPolicy.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The legacy policy. + public partial class ResourceTypeRegistrationLegacyPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationLegacyPolicy() + { + DisallowedLegacyOperations = new ChangeTrackingList(); + DisallowedConditions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationLegacyPolicy(IList disallowedLegacyOperations, IList disallowedConditions, IDictionary serializedAdditionalRawData) + { + DisallowedLegacyOperations = disallowedLegacyOperations; + DisallowedConditions = disallowedConditions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the disallowed legacy operations. + public IList DisallowedLegacyOperations { get; } + /// Gets the disallowed conditions. + public IList DisallowedConditions { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationListResult.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationListResult.cs index e791071e9fed..892b49d19952 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationListResult.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationListResult.cs @@ -52,7 +52,7 @@ internal ResourceTypeRegistrationListResult() } /// Initializes a new instance of . - /// + /// The value. /// The URL to get to the next set of results, if there are any. /// Keeps track of any properties unknown to the library. internal ResourceTypeRegistrationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) @@ -62,7 +62,7 @@ internal ResourceTypeRegistrationListResult(IReadOnlyList Gets the value. + /// The value. public IReadOnlyList Value { get; } /// The URL to get to the next set of results, if there are any. public string NextLink { get; } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationMarketplaceOptions.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationMarketplaceOptions.Serialization.cs new file mode 100644 index 000000000000..9feeae702bac --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationMarketplaceOptions.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceTypeRegistrationMarketplaceOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationMarketplaceOptions)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsAddOnPlanConversionAllowed)) + { + writer.WritePropertyName("addOnPlanConversionAllowed"u8); + writer.WriteBooleanValue(IsAddOnPlanConversionAllowed.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationMarketplaceOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationMarketplaceOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationMarketplaceOptions(document.RootElement, options); + } + + internal static ResourceTypeRegistrationMarketplaceOptions DeserializeResourceTypeRegistrationMarketplaceOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? addOnPlanConversionAllowed = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("addOnPlanConversionAllowed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addOnPlanConversionAllowed = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationMarketplaceOptions(addOnPlanConversionAllowed, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationMarketplaceOptions)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationMarketplaceOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationMarketplaceOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationMarketplaceOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationMarketplaceOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationMarketplaceOptions.cs new file mode 100644 index 000000000000..ed0017e3fcd5 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationMarketplaceOptions.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Marketplace options. + internal partial class ResourceTypeRegistrationMarketplaceOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationMarketplaceOptions() + { + } + + /// Initializes a new instance of . + /// Add-on plan conversion allowed. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationMarketplaceOptions(bool? isAddOnPlanConversionAllowed, IDictionary serializedAdditionalRawData) + { + IsAddOnPlanConversionAllowed = isAddOnPlanConversionAllowed; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Add-on plan conversion allowed. + public bool? IsAddOnPlanConversionAllowed { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.Serialization.cs index dd73401ca34c..f87ef79f1b7b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.Serialization.cs @@ -39,6 +39,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("routingType"u8); writer.WriteStringValue(RoutingType.Value.ToString()); } + if (Optional.IsDefined(AdditionalOptions)) + { + writer.WritePropertyName("additionalOptions"u8); + writer.WriteStringValue(AdditionalOptions.Value.ToString()); + } + if (Optional.IsDefined(CrossTenantTokenValidation)) + { + writer.WritePropertyName("crossTenantTokenValidation"u8); + writer.WriteStringValue(CrossTenantTokenValidation.Value.ToString()); + } if (Optional.IsDefined(Regionality)) { writer.WritePropertyName("regionality"u8); @@ -84,6 +94,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(AllowedUnauthorizedActionsExtensions)) + { + writer.WritePropertyName("allowedUnauthorizedActionsExtensions"u8); + writer.WriteStartArray(); + foreach (var item in AllowedUnauthorizedActionsExtensions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsCollectionDefined(AuthorizationActionMappings)) { writer.WritePropertyName("authorizationActionMappings"u8); @@ -149,7 +169,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("enableAsyncOperation"u8); writer.WriteBooleanValue(IsAsyncOperationEnabled.Value); } - if (Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); @@ -239,6 +259,295 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("resourceDeletionPolicy"u8); writer.WriteStringValue(ResourceDeletionPolicy.Value.ToString()); } + if (Optional.IsCollectionDefined(ResourceConcurrencyControlOptions)) + { + writer.WritePropertyName("resourceConcurrencyControlOptions"u8); + writer.WriteStartObject(); + foreach (var item in ResourceConcurrencyControlOptions) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ResourceGraphConfiguration)) + { + writer.WritePropertyName("resourceGraphConfiguration"u8); + writer.WriteObjectValue(ResourceGraphConfiguration, options); + } + if (Optional.IsDefined(Management)) + { + writer.WritePropertyName("management"u8); + writer.WriteObjectValue(Management, options); + } + if (Optional.IsDefined(OpenApiConfiguration)) + { + writer.WritePropertyName("openApiConfiguration"u8); + writer.WriteObjectValue(OpenApiConfiguration, options); + } + if (Optional.IsDefined(OnBehalfOfTokens)) + { + writer.WritePropertyName("onBehalfOfTokens"u8); + writer.WriteObjectValue(OnBehalfOfTokens, options); + } + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(ResourceValidation)) + { + writer.WritePropertyName("resourceValidation"u8); + writer.WriteStringValue(ResourceValidation.Value.ToString()); + } + if (Optional.IsCollectionDefined(DisallowedEndUserOperations)) + { + writer.WritePropertyName("disallowedEndUserOperations"u8); + writer.WriteStartArray(); + foreach (var item in DisallowedEndUserOperations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(SkuLink)) + { + writer.WritePropertyName("skuLink"u8); + writer.WriteStringValue(SkuLink); + } + if (Optional.IsDefined(QuotaRule)) + { + writer.WritePropertyName("quotaRule"u8); + writer.WriteObjectValue(QuotaRule, options); + } + if (Optional.IsCollectionDefined(Notifications)) + { + writer.WritePropertyName("notifications"u8); + writer.WriteStartArray(); + foreach (var item in Notifications) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(LinkedNotificationRules)) + { + writer.WritePropertyName("linkedNotificationRules"u8); + writer.WriteStartArray(); + foreach (var item in LinkedNotificationRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResourceProviderAuthorizationRules)) + { + writer.WritePropertyName("resourceProviderAuthorizationRules"u8); + writer.WriteObjectValue(ResourceProviderAuthorizationRules, options); + } + if (Optional.IsDefined(TokenAuthConfiguration)) + { + writer.WritePropertyName("tokenAuthConfiguration"u8); + writer.WriteObjectValue(TokenAuthConfiguration, options); + } + if (Optional.IsDefined(TemplateDeploymentPolicy)) + { + writer.WritePropertyName("templateDeploymentPolicy"u8); + writer.WriteObjectValue(TemplateDeploymentPolicy, options); + } + if (Optional.IsDefined(IsEmptyRoleAssignmentsAllowed)) + { + writer.WritePropertyName("allowEmptyRoleAssignments"u8); + writer.WriteBooleanValue(IsEmptyRoleAssignmentsAllowed.Value); + } + if (Optional.IsDefined(PolicyExecutionType)) + { + writer.WritePropertyName("policyExecutionType"u8); + writer.WriteStringValue(PolicyExecutionType.Value.ToString()); + } + if (Optional.IsDefined(AvailabilityZoneRule)) + { + writer.WritePropertyName("availabilityZoneRule"u8); + writer.WriteObjectValue(AvailabilityZoneRule, options); + } + if (Optional.IsDefined(DstsConfiguration)) + { + writer.WritePropertyName("dstsConfiguration"u8); + writer.WriteObjectValue(DstsConfiguration, options); + } + if (Optional.IsCollectionDefined(AsyncTimeoutRules)) + { + writer.WritePropertyName("asyncTimeoutRules"u8); + writer.WriteStartArray(); + foreach (var item in AsyncTimeoutRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CommonApiVersions)) + { + writer.WritePropertyName("commonApiVersions"u8); + writer.WriteStartArray(); + foreach (var item in CommonApiVersions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ApiProfiles)) + { + writer.WritePropertyName("apiProfiles"u8); + writer.WriteStartArray(); + foreach (var item in ApiProfiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(LinkedOperationRules)) + { + writer.WritePropertyName("linkedOperationRules"u8); + writer.WriteStartArray(); + foreach (var item in LinkedOperationRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LegacyName)) + { + writer.WritePropertyName("legacyName"u8); + writer.WriteStringValue(LegacyName); + } + if (Optional.IsCollectionDefined(LegacyNames)) + { + writer.WritePropertyName("legacyNames"u8); + writer.WriteStartArray(); + foreach (var item in LegacyNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AllowedTemplateDeploymentReferenceActions)) + { + writer.WritePropertyName("allowedTemplateDeploymentReferenceActions"u8); + writer.WriteStartArray(); + foreach (var item in AllowedTemplateDeploymentReferenceActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LegacyPolicy)) + { + writer.WritePropertyName("legacyPolicy"u8); + writer.WriteObjectValue(LegacyPolicy, options); + } + if (Optional.IsDefined(ManifestLink)) + { + writer.WritePropertyName("manifestLink"u8); + writer.WriteStringValue(ManifestLink); + } + if (Optional.IsDefined(CapacityRule)) + { + writer.WritePropertyName("capacityRule"u8); + writer.WriteObjectValue(CapacityRule, options); + } + if (Optional.IsDefined(MarketplaceOptions)) + { + writer.WritePropertyName("marketplaceOptions"u8); + writer.WriteObjectValue(MarketplaceOptions, options); + } + if (Optional.IsCollectionDefined(AllowedResourceNames)) + { + writer.WritePropertyName("allowedResourceNames"u8); + writer.WriteStartArray(); + foreach (var item in AllowedResourceNames) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResourceCache)) + { + writer.WritePropertyName("resourceCache"u8); + writer.WriteObjectValue(ResourceCache, options); + } + if (Optional.IsDefined(ResourceQueryManagement)) + { + writer.WritePropertyName("resourceQueryManagement"u8); + writer.WriteObjectValue(ResourceQueryManagement, options); + } + if (Optional.IsDefined(AreTagsSupported)) + { + writer.WritePropertyName("supportsTags"u8); + writer.WriteBooleanValue(AreTagsSupported.Value); + } + if (Optional.IsDefined(ResourceManagementOptions)) + { + writer.WritePropertyName("resourceManagementOptions"u8); + writer.WriteObjectValue(ResourceManagementOptions, options); + } + if (Optional.IsDefined(GroupingTag)) + { + writer.WritePropertyName("groupingTag"u8); + writer.WriteStringValue(GroupingTag); + } + if (Optional.IsDefined(IsAddResourceListTargetLocationsAllowed)) + { + writer.WritePropertyName("addResourceListTargetLocations"u8); + writer.WriteBooleanValue(IsAddResourceListTargetLocationsAllowed.Value); + } + if (Optional.IsDefined(ResourceTypeCommonAttributeManagement)) + { + writer.WritePropertyName("resourceTypeCommonAttributeManagement"u8); + writer.WriteObjectValue(ResourceTypeCommonAttributeManagement, options); + } + if (Optional.IsDefined(RoutingRule)) + { + writer.WritePropertyName("routingRule"u8); + writer.WriteObjectValue(RoutingRule, options); + } + if (Optional.IsDefined(FrontdoorRequestMode)) + { + writer.WritePropertyName("frontdoorRequestMode"u8); + writer.WriteStringValue(FrontdoorRequestMode.Value.ToString()); + } + if (Optional.IsDefined(ResourceSubType)) + { + writer.WritePropertyName("resourceSubType"u8); + writer.WriteStringValue(ResourceSubType.Value.ToString()); + } + if (Optional.IsDefined(AsyncOperationResourceTypeName)) + { + writer.WritePropertyName("asyncOperationResourceTypeName"u8); + writer.WriteStringValue(AsyncOperationResourceTypeName); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -277,19 +586,22 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist return null; } ResourceRoutingType? routingType = default; + AdditionalOptionResourceTypeRegistration? additionalOptions = default; + CrossTenantTokenValidation? crossTenantTokenValidation = default; ResourceTypeRegistrationRegionality? regionality = default; IList endpoints = default; ResourceTypeExtensionOptions extensionOptions = default; MarketplaceType? marketplaceType = default; IList swaggerSpecifications = default; IList allowedUnauthorizedActions = default; + IList allowedUnauthorizedActionsExtensions = default; IList authorizationActionMappings = default; IList linkedAccessChecks = default; string defaultApiVersion = default; IList loggingRules = default; IList throttlingRules = default; IList requiredFeatures = default; - FeaturesRule featuresRule = default; + ProviderFeaturesRule featuresRule = default; bool? enableAsyncOperation = default; ProviderHubProvisioningState? provisioningState = default; bool? enableThirdPartyS2S = default; @@ -299,12 +611,55 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist CheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications = default; IList disallowedActionVerbs = default; IList serviceTreeInfos = default; - RequestHeaderOptions requestHeaderOptions = default; + ProviderRequestHeaderOptions requestHeaderOptions = default; IList subscriptionStateRules = default; TemplateDeploymentOptions templateDeploymentOptions = default; IList extendedLocations = default; ResourceMovePolicy resourceMovePolicy = default; ResourceDeletionPolicy? resourceDeletionPolicy = default; + IDictionary resourceConcurrencyControlOptions = default; + ResourceGraphConfiguration resourceGraphConfiguration = default; + ResourceProviderManagement management = default; + OpenApiConfiguration openApiConfiguration = default; + ResourceTypeOnBehalfOfToken onBehalfOfTokens = default; + ResourceTypeCategory? category = default; + ResourceValidation? resourceValidation = default; + IList disallowedEndUserOperations = default; + IDictionary metadata = default; + string skuLink = default; + ProviderQuotaRule quotaRule = default; + IList notifications = default; + IList linkedNotificationRules = default; + ResourceProviderAuthorizationRules resourceProviderAuthorizationRules = default; + TokenAuthConfiguration tokenAuthConfiguration = default; + TemplateDeploymentPolicy templateDeploymentPolicy = default; + bool? allowEmptyRoleAssignments = default; + PolicyExecutionType? policyExecutionType = default; + ResourceTypeRegistrationAvailabilityZoneRule availabilityZoneRule = default; + ProviderDstsConfiguration dstsConfiguration = default; + IList asyncTimeoutRules = default; + IList commonApiVersions = default; + IList apiProfiles = default; + IList linkedOperationRules = default; + string legacyName = default; + IList legacyNames = default; + IList allowedTemplateDeploymentReferenceActions = default; + ResourceTypeRegistrationLegacyPolicy legacyPolicy = default; + string manifestLink = default; + ResourceTypeRegistrationCapacityRule capacityRule = default; + ResourceTypeRegistrationMarketplaceOptions marketplaceOptions = default; + IList allowedResourceNames = default; + ResourceTypeRegistrationResourceCache resourceCache = default; + ProviderResourceQueryManagement resourceQueryManagement = default; + bool? supportsTags = default; + ResourceTypeRegistrationResourceManagementOptions resourceManagementOptions = default; + string groupingTag = default; + bool? addResourceListTargetLocations = default; + ResourceTypeCommonAttributeManagement resourceTypeCommonAttributeManagement = default; + ResourceTypeRegistrationRoutingRule routingRule = default; + FrontdoorRequestMode? frontdoorRequestMode = default; + ProviderResourceSubType? resourceSubType = default; + string asyncOperationResourceTypeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -318,6 +673,24 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist routingType = new ResourceRoutingType(property.Value.GetString()); continue; } + if (property.NameEquals("additionalOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalOptions = new AdditionalOptionResourceTypeRegistration(property.Value.GetString()); + continue; + } + if (property.NameEquals("crossTenantTokenValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crossTenantTokenValidation = new CrossTenantTokenValidation(property.Value.GetString()); + continue; + } if (property.NameEquals("regionality"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -387,6 +760,20 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist allowedUnauthorizedActions = array; continue; } + if (property.NameEquals("allowedUnauthorizedActionsExtensions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AllowedUnauthorizedActionsExtension.DeserializeAllowedUnauthorizedActionsExtension(item, options)); + } + allowedUnauthorizedActionsExtensions = array; + continue; + } if (property.NameEquals("authorizationActionMappings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -468,7 +855,7 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist { continue; } - featuresRule = FeaturesRule.DeserializeFeaturesRule(property.Value, options); + featuresRule = ProviderFeaturesRule.DeserializeProviderFeaturesRule(property.Value, options); continue; } if (property.NameEquals("enableAsyncOperation"u8)) @@ -568,7 +955,7 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist { continue; } - requestHeaderOptions = RequestHeaderOptions.DeserializeRequestHeaderOptions(property.Value, options); + requestHeaderOptions = ProviderRequestHeaderOptions.DeserializeProviderRequestHeaderOptions(property.Value, options); continue; } if (property.NameEquals("subscriptionStateRules"u8)) @@ -626,6 +1013,440 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist resourceDeletionPolicy = new ResourceDeletionPolicy(property.Value.GetString()); continue; } + if (property.NameEquals("resourceConcurrencyControlOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, ResourceConcurrencyControlOption.DeserializeResourceConcurrencyControlOption(property0.Value, options)); + } + resourceConcurrencyControlOptions = dictionary; + continue; + } + if (property.NameEquals("resourceGraphConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGraphConfiguration = ResourceGraphConfiguration.DeserializeResourceGraphConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("management"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + management = ResourceProviderManagement.DeserializeResourceProviderManagement(property.Value, options); + continue; + } + if (property.NameEquals("openApiConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openApiConfiguration = OpenApiConfiguration.DeserializeOpenApiConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("onBehalfOfTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onBehalfOfTokens = ResourceTypeOnBehalfOfToken.DeserializeResourceTypeOnBehalfOfToken(property.Value, options); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new ResourceTypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceValidation = new ResourceValidation(property.Value.GetString()); + continue; + } + if (property.NameEquals("disallowedEndUserOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + disallowedEndUserOperations = array; + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + metadata = dictionary; + continue; + } + if (property.NameEquals("skuLink"u8)) + { + skuLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("quotaRule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quotaRule = ProviderQuotaRule.DeserializeProviderQuotaRule(property.Value, options); + continue; + } + if (property.NameEquals("notifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderNotification.DeserializeProviderNotification(item, options)); + } + notifications = array; + continue; + } + if (property.NameEquals("linkedNotificationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LinkedNotificationRule.DeserializeLinkedNotificationRule(item, options)); + } + linkedNotificationRules = array; + continue; + } + if (property.NameEquals("resourceProviderAuthorizationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceProviderAuthorizationRules = ResourceProviderAuthorizationRules.DeserializeResourceProviderAuthorizationRules(property.Value, options); + continue; + } + if (property.NameEquals("tokenAuthConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenAuthConfiguration = TokenAuthConfiguration.DeserializeTokenAuthConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("templateDeploymentPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + templateDeploymentPolicy = TemplateDeploymentPolicy.DeserializeTemplateDeploymentPolicy(property.Value, options); + continue; + } + if (property.NameEquals("allowEmptyRoleAssignments"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowEmptyRoleAssignments = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("policyExecutionType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyExecutionType = new PolicyExecutionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("availabilityZoneRule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityZoneRule = ResourceTypeRegistrationAvailabilityZoneRule.DeserializeResourceTypeRegistrationAvailabilityZoneRule(property.Value, options); + continue; + } + if (property.NameEquals("dstsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dstsConfiguration = ProviderDstsConfiguration.DeserializeProviderDstsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("asyncTimeoutRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AsyncTimeoutRule.DeserializeAsyncTimeoutRule(item, options)); + } + asyncTimeoutRules = array; + continue; + } + if (property.NameEquals("commonApiVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + commonApiVersions = array; + continue; + } + if (property.NameEquals("apiProfiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceTypeRegistrationApiProfile.DeserializeResourceTypeRegistrationApiProfile(item, options)); + } + apiProfiles = array; + continue; + } + if (property.NameEquals("linkedOperationRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LinkedOperationRule.DeserializeLinkedOperationRule(item, options)); + } + linkedOperationRules = array; + continue; + } + if (property.NameEquals("legacyName"u8)) + { + legacyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("legacyNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + legacyNames = array; + continue; + } + if (property.NameEquals("allowedTemplateDeploymentReferenceActions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedTemplateDeploymentReferenceActions = array; + continue; + } + if (property.NameEquals("legacyPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + legacyPolicy = ResourceTypeRegistrationLegacyPolicy.DeserializeResourceTypeRegistrationLegacyPolicy(property.Value, options); + continue; + } + if (property.NameEquals("manifestLink"u8)) + { + manifestLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("capacityRule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityRule = ResourceTypeRegistrationCapacityRule.DeserializeResourceTypeRegistrationCapacityRule(property.Value, options); + continue; + } + if (property.NameEquals("marketplaceOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + marketplaceOptions = ResourceTypeRegistrationMarketplaceOptions.DeserializeResourceTypeRegistrationMarketplaceOptions(property.Value, options); + continue; + } + if (property.NameEquals("allowedResourceNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AllowedResourceName.DeserializeAllowedResourceName(item, options)); + } + allowedResourceNames = array; + continue; + } + if (property.NameEquals("resourceCache"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceCache = ResourceTypeRegistrationResourceCache.DeserializeResourceTypeRegistrationResourceCache(property.Value, options); + continue; + } + if (property.NameEquals("resourceQueryManagement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceQueryManagement = ProviderResourceQueryManagement.DeserializeProviderResourceQueryManagement(property.Value, options); + continue; + } + if (property.NameEquals("supportsTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + supportsTags = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceManagementOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceManagementOptions = ResourceTypeRegistrationResourceManagementOptions.DeserializeResourceTypeRegistrationResourceManagementOptions(property.Value, options); + continue; + } + if (property.NameEquals("groupingTag"u8)) + { + groupingTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("addResourceListTargetLocations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addResourceListTargetLocations = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceTypeCommonAttributeManagement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceTypeCommonAttributeManagement = ResourceTypeCommonAttributeManagement.DeserializeResourceTypeCommonAttributeManagement(property.Value, options); + continue; + } + if (property.NameEquals("routingRule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + routingRule = ResourceTypeRegistrationRoutingRule.DeserializeResourceTypeRegistrationRoutingRule(property.Value, options); + continue; + } + if (property.NameEquals("frontdoorRequestMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + frontdoorRequestMode = new FrontdoorRequestMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceSubType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceSubType = new ProviderResourceSubType(property.Value.GetString()); + continue; + } + if (property.NameEquals("asyncOperationResourceTypeName"u8)) + { + asyncOperationResourceTypeName = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -634,12 +1455,15 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist serializedAdditionalRawData = rawDataDictionary; return new ResourceTypeRegistrationProperties( routingType, + additionalOptions, + crossTenantTokenValidation, regionality, endpoints ?? new ChangeTrackingList(), extensionOptions, marketplaceType, swaggerSpecifications ?? new ChangeTrackingList(), allowedUnauthorizedActions ?? new ChangeTrackingList(), + allowedUnauthorizedActionsExtensions ?? new ChangeTrackingList(), authorizationActionMappings ?? new ChangeTrackingList(), linkedAccessChecks ?? new ChangeTrackingList(), defaultApiVersion, @@ -662,6 +1486,49 @@ internal static ResourceTypeRegistrationProperties DeserializeResourceTypeRegist extendedLocations ?? new ChangeTrackingList(), resourceMovePolicy, resourceDeletionPolicy, + resourceConcurrencyControlOptions ?? new ChangeTrackingDictionary(), + resourceGraphConfiguration, + management, + openApiConfiguration, + onBehalfOfTokens, + category, + resourceValidation, + disallowedEndUserOperations ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + skuLink, + quotaRule, + notifications ?? new ChangeTrackingList(), + linkedNotificationRules ?? new ChangeTrackingList(), + resourceProviderAuthorizationRules, + tokenAuthConfiguration, + templateDeploymentPolicy, + allowEmptyRoleAssignments, + policyExecutionType, + availabilityZoneRule, + dstsConfiguration, + asyncTimeoutRules ?? new ChangeTrackingList(), + commonApiVersions ?? new ChangeTrackingList(), + apiProfiles ?? new ChangeTrackingList(), + linkedOperationRules ?? new ChangeTrackingList(), + legacyName, + legacyNames ?? new ChangeTrackingList(), + allowedTemplateDeploymentReferenceActions ?? new ChangeTrackingList(), + legacyPolicy, + manifestLink, + capacityRule, + marketplaceOptions, + allowedResourceNames ?? new ChangeTrackingList(), + resourceCache, + resourceQueryManagement, + supportsTags, + resourceManagementOptions, + groupingTag, + addResourceListTargetLocations, + resourceTypeCommonAttributeManagement, + routingRule, + frontdoorRequestMode, + resourceSubType, + asyncOperationResourceTypeName, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.cs index 771460b79134..d1a2b61fbd30 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationProperties.cs @@ -51,6 +51,7 @@ public ResourceTypeRegistrationProperties() Endpoints = new ChangeTrackingList(); SwaggerSpecifications = new ChangeTrackingList(); AllowedUnauthorizedActions = new ChangeTrackingList(); + AllowedUnauthorizedActionsExtensions = new ChangeTrackingList(); AuthorizationActionMappings = new ChangeTrackingList(); LinkedAccessChecks = new ChangeTrackingList(); LoggingRules = new ChangeTrackingList(); @@ -60,48 +61,109 @@ public ResourceTypeRegistrationProperties() ServiceTreeInfos = new ChangeTrackingList(); SubscriptionStateRules = new ChangeTrackingList(); ExtendedLocations = new ChangeTrackingList(); + ResourceConcurrencyControlOptions = new ChangeTrackingDictionary(); + DisallowedEndUserOperations = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); + Notifications = new ChangeTrackingList(); + LinkedNotificationRules = new ChangeTrackingList(); + AsyncTimeoutRules = new ChangeTrackingList(); + CommonApiVersions = new ChangeTrackingList(); + ApiProfiles = new ChangeTrackingList(); + LinkedOperationRules = new ChangeTrackingList(); + LegacyNames = new ChangeTrackingList(); + AllowedTemplateDeploymentReferenceActions = new ChangeTrackingList(); + AllowedResourceNames = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// + /// The resource routing type. + /// The additional options. + /// The cross tenant token validation. + /// The regionality. + /// The extensions. + /// The extension options. + /// The marketplace type. + /// The swagger specifications. + /// The allowed unauthorized actions. + /// The allowed unauthorized actions extensions. + /// The authorization action mappings. + /// The linked access checks. + /// The default api version. + /// The logging rules. + /// The throttling rules. + /// The required features. + /// The features rule. + /// Whether async operation is enabled. + /// The provisioning state. + /// Whether third party S2S is enabled. + /// The subscription lifecycle notification specifications. + /// Whether it is pure proxy. + /// The identity management. + /// The check name availability specifications. + /// The disallowed action verbs. + /// The service tree infos. + /// The request header options. + /// The subscription state rules. + /// The template deployment options. + /// The extended locations. + /// The resource move policy. + /// The resource deletion policy. + /// The resource concurrency control options. + /// The resource graph configuration. + /// The resource provider management. + /// The open api configuration. + /// The on behalf of tokens. + /// The category. + /// The resource validation. + /// The disallowed end user operations. + /// The metadata. + /// The sku link. + /// The quota rule. + /// The notifications. + /// The linked notification rules. + /// The resource provider authorization rules. + /// The token auth configuration. + /// The template deployment policy. + /// The allow empty role assignments. + /// The policy execution type. + /// The availability zone rule. + /// The dsts configuration. + /// Async timeout rules. + /// Common API versions for the resource type. + /// The api profiles. + /// The linked operation rules. + /// The legacy name. + /// The legacy names. + /// Allowed template deployment reference actions. + /// The legacy policy. + /// Manifest link. + /// Capacity rule. + /// Marketplace options. + /// The allowed resource names. + /// Resource cache options. + /// Resource query management options. + /// Whether tags are supported. + /// Resource management options. + /// Grouping tag. + /// Add resource list target locations?. + /// Resource type common attribute management. + /// Routing rule. + /// The frontdoor request mode. + /// The resource sub type. + /// The async operation resource type name. /// Keeps track of any properties unknown to the library. - internal ResourceTypeRegistrationProperties(ResourceRoutingType? routingType, ResourceTypeRegistrationRegionality? regionality, IList endpoints, ResourceTypeExtensionOptions extensionOptions, MarketplaceType? marketplaceType, IList swaggerSpecifications, IList allowedUnauthorizedActions, IList authorizationActionMappings, IList linkedAccessChecks, string defaultApiVersion, IList loggingRules, IList throttlingRules, IList requiredFeatures, FeaturesRule featuresRule, bool? isAsyncOperationEnabled, ProviderHubProvisioningState? provisioningState, bool? isThirdPartyS2SEnabled, SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications, bool? isPureProxy, IdentityManagementProperties identityManagement, CheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications, IList disallowedActionVerbs, IList serviceTreeInfos, RequestHeaderOptions requestHeaderOptions, IList subscriptionStateRules, TemplateDeploymentOptions templateDeploymentOptions, IList extendedLocations, ResourceMovePolicy resourceMovePolicy, ResourceDeletionPolicy? resourceDeletionPolicy, IDictionary serializedAdditionalRawData) + internal ResourceTypeRegistrationProperties(ResourceRoutingType? routingType, AdditionalOptionResourceTypeRegistration? additionalOptions, CrossTenantTokenValidation? crossTenantTokenValidation, ResourceTypeRegistrationRegionality? regionality, IList endpoints, ResourceTypeExtensionOptions extensionOptions, MarketplaceType? marketplaceType, IList swaggerSpecifications, IList allowedUnauthorizedActions, IList allowedUnauthorizedActionsExtensions, IList authorizationActionMappings, IList linkedAccessChecks, string defaultApiVersion, IList loggingRules, IList throttlingRules, IList requiredFeatures, ProviderFeaturesRule featuresRule, bool? isAsyncOperationEnabled, ProviderHubProvisioningState? provisioningState, bool? isThirdPartyS2SEnabled, SubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications, bool? isPureProxy, IdentityManagementProperties identityManagement, CheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications, IList disallowedActionVerbs, IList serviceTreeInfos, ProviderRequestHeaderOptions requestHeaderOptions, IList subscriptionStateRules, TemplateDeploymentOptions templateDeploymentOptions, IList extendedLocations, ResourceMovePolicy resourceMovePolicy, ResourceDeletionPolicy? resourceDeletionPolicy, IDictionary resourceConcurrencyControlOptions, ResourceGraphConfiguration resourceGraphConfiguration, ResourceProviderManagement management, OpenApiConfiguration openApiConfiguration, ResourceTypeOnBehalfOfToken onBehalfOfTokens, ResourceTypeCategory? category, ResourceValidation? resourceValidation, IList disallowedEndUserOperations, IDictionary metadata, string skuLink, ProviderQuotaRule quotaRule, IList notifications, IList linkedNotificationRules, ResourceProviderAuthorizationRules resourceProviderAuthorizationRules, TokenAuthConfiguration tokenAuthConfiguration, TemplateDeploymentPolicy templateDeploymentPolicy, bool? isEmptyRoleAssignmentsAllowed, PolicyExecutionType? policyExecutionType, ResourceTypeRegistrationAvailabilityZoneRule availabilityZoneRule, ProviderDstsConfiguration dstsConfiguration, IList asyncTimeoutRules, IList commonApiVersions, IList apiProfiles, IList linkedOperationRules, string legacyName, IList legacyNames, IList allowedTemplateDeploymentReferenceActions, ResourceTypeRegistrationLegacyPolicy legacyPolicy, string manifestLink, ResourceTypeRegistrationCapacityRule capacityRule, ResourceTypeRegistrationMarketplaceOptions marketplaceOptions, IList allowedResourceNames, ResourceTypeRegistrationResourceCache resourceCache, ProviderResourceQueryManagement resourceQueryManagement, bool? areTagsSupported, ResourceTypeRegistrationResourceManagementOptions resourceManagementOptions, string groupingTag, bool? isAddResourceListTargetLocationsAllowed, ResourceTypeCommonAttributeManagement resourceTypeCommonAttributeManagement, ResourceTypeRegistrationRoutingRule routingRule, FrontdoorRequestMode? frontdoorRequestMode, ProviderResourceSubType? resourceSubType, string asyncOperationResourceTypeName, IDictionary serializedAdditionalRawData) { RoutingType = routingType; + AdditionalOptions = additionalOptions; + CrossTenantTokenValidation = crossTenantTokenValidation; Regionality = regionality; Endpoints = endpoints; ExtensionOptions = extensionOptions; MarketplaceType = marketplaceType; SwaggerSpecifications = swaggerSpecifications; AllowedUnauthorizedActions = allowedUnauthorizedActions; + AllowedUnauthorizedActionsExtensions = allowedUnauthorizedActionsExtensions; AuthorizationActionMappings = authorizationActionMappings; LinkedAccessChecks = linkedAccessChecks; DefaultApiVersion = defaultApiVersion; @@ -124,18 +186,65 @@ internal ResourceTypeRegistrationProperties(ResourceRoutingType? routingType, Re ExtendedLocations = extendedLocations; ResourceMovePolicy = resourceMovePolicy; ResourceDeletionPolicy = resourceDeletionPolicy; + ResourceConcurrencyControlOptions = resourceConcurrencyControlOptions; + ResourceGraphConfiguration = resourceGraphConfiguration; + Management = management; + OpenApiConfiguration = openApiConfiguration; + OnBehalfOfTokens = onBehalfOfTokens; + Category = category; + ResourceValidation = resourceValidation; + DisallowedEndUserOperations = disallowedEndUserOperations; + Metadata = metadata; + SkuLink = skuLink; + QuotaRule = quotaRule; + Notifications = notifications; + LinkedNotificationRules = linkedNotificationRules; + ResourceProviderAuthorizationRules = resourceProviderAuthorizationRules; + TokenAuthConfiguration = tokenAuthConfiguration; + TemplateDeploymentPolicy = templateDeploymentPolicy; + IsEmptyRoleAssignmentsAllowed = isEmptyRoleAssignmentsAllowed; + PolicyExecutionType = policyExecutionType; + AvailabilityZoneRule = availabilityZoneRule; + DstsConfiguration = dstsConfiguration; + AsyncTimeoutRules = asyncTimeoutRules; + CommonApiVersions = commonApiVersions; + ApiProfiles = apiProfiles; + LinkedOperationRules = linkedOperationRules; + LegacyName = legacyName; + LegacyNames = legacyNames; + AllowedTemplateDeploymentReferenceActions = allowedTemplateDeploymentReferenceActions; + LegacyPolicy = legacyPolicy; + ManifestLink = manifestLink; + CapacityRule = capacityRule; + MarketplaceOptions = marketplaceOptions; + AllowedResourceNames = allowedResourceNames; + ResourceCache = resourceCache; + ResourceQueryManagement = resourceQueryManagement; + AreTagsSupported = areTagsSupported; + ResourceManagementOptions = resourceManagementOptions; + GroupingTag = groupingTag; + IsAddResourceListTargetLocationsAllowed = isAddResourceListTargetLocationsAllowed; + ResourceTypeCommonAttributeManagement = resourceTypeCommonAttributeManagement; + RoutingRule = routingRule; + FrontdoorRequestMode = frontdoorRequestMode; + ResourceSubType = resourceSubType; + AsyncOperationResourceTypeName = asyncOperationResourceTypeName; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the routing type. + /// The resource routing type. public ResourceRoutingType? RoutingType { get; set; } - /// Gets or sets the regionality. + /// The additional options. + public AdditionalOptionResourceTypeRegistration? AdditionalOptions { get; set; } + /// The cross tenant token validation. + public CrossTenantTokenValidation? CrossTenantTokenValidation { get; set; } + /// The regionality. public ResourceTypeRegistrationRegionality? Regionality { get; set; } - /// Gets the endpoints. + /// The extensions. public IList Endpoints { get; } - /// Gets or sets the extension options. + /// The extension options. internal ResourceTypeExtensionOptions ExtensionOptions { get; set; } - /// Gets or sets the extension options resource creation begin. + /// Resource creation begin. public ExtensionOptions ExtensionOptionsResourceCreationBegin { get => ExtensionOptions is null ? default : ExtensionOptions.ResourceCreationBegin; @@ -147,77 +256,264 @@ public ExtensionOptions ExtensionOptionsResourceCreationBegin } } - /// Gets or sets the marketplace type. + /// The marketplace type. public MarketplaceType? MarketplaceType { get; set; } - /// Gets the swagger specifications. + /// The swagger specifications. public IList SwaggerSpecifications { get; } - /// Gets the allowed unauthorized actions. + /// The allowed unauthorized actions. public IList AllowedUnauthorizedActions { get; } - /// Gets the authorization action mappings. + /// The allowed unauthorized actions extensions. + public IList AllowedUnauthorizedActionsExtensions { get; } + /// The authorization action mappings. public IList AuthorizationActionMappings { get; } - /// Gets the linked access checks. + /// The linked access checks. public IList LinkedAccessChecks { get; } - /// Gets or sets the default api version. + /// The default api version. public string DefaultApiVersion { get; set; } - /// Gets the logging rules. + /// The logging rules. public IList LoggingRules { get; } - /// Gets the throttling rules. + /// The throttling rules. public IList ThrottlingRules { get; } - /// Gets the required features. + /// The required features. public IList RequiredFeatures { get; } - /// Gets or sets the features rule. - internal FeaturesRule FeaturesRule { get; set; } - /// Gets or sets the required features policy. + /// The features rule. + internal ProviderFeaturesRule FeaturesRule { get; set; } + /// The required feature policy. public FeaturesPolicy? RequiredFeaturesPolicy { get => FeaturesRule is null ? default(FeaturesPolicy?) : FeaturesRule.RequiredFeaturesPolicy; set { - FeaturesRule = value.HasValue ? new FeaturesRule(value.Value) : null; + FeaturesRule = value.HasValue ? new ProviderFeaturesRule(value.Value) : null; } } - /// Gets or sets the is async operation enabled. + /// Whether async operation is enabled. public bool? IsAsyncOperationEnabled { get; set; } - /// Gets or sets the provisioning state. - public ProviderHubProvisioningState? ProvisioningState { get; set; } - /// Gets or sets the is third party s 2 s enabled. + /// Whether third party S2S is enabled. public bool? IsThirdPartyS2SEnabled { get; set; } - /// Gets or sets the subscription lifecycle notification specifications. + /// The subscription lifecycle notification specifications. public SubscriptionLifecycleNotificationSpecifications SubscriptionLifecycleNotificationSpecifications { get; set; } - /// Gets or sets the is pure proxy. + /// Whether it is pure proxy. public bool? IsPureProxy { get; set; } - /// Gets or sets the identity management. + /// The identity management. public IdentityManagementProperties IdentityManagement { get; set; } - /// Gets or sets the check name availability specifications. + /// The check name availability specifications. public CheckNameAvailabilitySpecifications CheckNameAvailabilitySpecifications { get; set; } - /// Gets the disallowed action verbs. + /// The disallowed action verbs. public IList DisallowedActionVerbs { get; } - /// Gets the service tree infos. + /// The service tree infos. public IList ServiceTreeInfos { get; } - /// Gets or sets the request header options. - internal RequestHeaderOptions RequestHeaderOptions { get; set; } - /// Gets or sets the opt in headers. - public OptInHeaderType? OptInHeaders + /// The request header options. + public ProviderRequestHeaderOptions RequestHeaderOptions { get; set; } + /// The subscription state rules. + public IList SubscriptionStateRules { get; } + /// The template deployment options. + public TemplateDeploymentOptions TemplateDeploymentOptions { get; set; } + /// The extended locations. + public IList ExtendedLocations { get; } + /// The resource move policy. + public ResourceMovePolicy ResourceMovePolicy { get; set; } + /// The resource deletion policy. + public ResourceDeletionPolicy? ResourceDeletionPolicy { get; set; } + /// The resource concurrency control options. + public IDictionary ResourceConcurrencyControlOptions { get; } + /// The resource graph configuration. + public ResourceGraphConfiguration ResourceGraphConfiguration { get; set; } + /// The resource provider management. + public ResourceProviderManagement Management { get; set; } + /// The open api configuration. + internal OpenApiConfiguration OpenApiConfiguration { get; set; } + /// Indicates whether a non compliance response is allowed for a LIST call. + public bool? IsNoncompliantCollectionResponseAllowed { - get => RequestHeaderOptions is null ? default : RequestHeaderOptions.OptInHeaders; + get => OpenApiConfiguration is null ? default : OpenApiConfiguration.IsNoncompliantCollectionResponseAllowed; set { - if (RequestHeaderOptions is null) - RequestHeaderOptions = new RequestHeaderOptions(); - RequestHeaderOptions.OptInHeaders = value; + if (OpenApiConfiguration is null) + OpenApiConfiguration = new OpenApiConfiguration(); + OpenApiConfiguration.IsNoncompliantCollectionResponseAllowed = value; } } - /// Gets the subscription state rules. - public IList SubscriptionStateRules { get; } - /// Gets or sets the template deployment options. - public TemplateDeploymentOptions TemplateDeploymentOptions { get; set; } - /// Gets the extended locations. - public IList ExtendedLocations { get; } - /// Gets or sets the resource move policy. - public ResourceMovePolicy ResourceMovePolicy { get; set; } - /// Gets or sets the resource deletion policy. - public ResourceDeletionPolicy? ResourceDeletionPolicy { get; set; } + /// The on behalf of tokens. + public ResourceTypeOnBehalfOfToken OnBehalfOfTokens { get; set; } + /// The category. + public ResourceTypeCategory? Category { get; set; } + /// The resource validation. + public ResourceValidation? ResourceValidation { get; set; } + /// The disallowed end user operations. + public IList DisallowedEndUserOperations { get; } + /// + /// The metadata. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Metadata { get; } + /// The sku link. + public string SkuLink { get; set; } + /// The quota rule. + public ProviderQuotaRule QuotaRule { get; set; } + /// The notifications. + public IList Notifications { get; } + /// The linked notification rules. + public IList LinkedNotificationRules { get; } + /// The resource provider authorization rules. + internal ResourceProviderAuthorizationRules ResourceProviderAuthorizationRules { get; set; } + /// The async operation polling rules. + public AsyncOperationPollingRules AsyncOperationPollingRules + { + get => ResourceProviderAuthorizationRules is null ? default : ResourceProviderAuthorizationRules.AsyncOperationPollingRules; + set + { + if (ResourceProviderAuthorizationRules is null) + ResourceProviderAuthorizationRules = new ResourceProviderAuthorizationRules(); + ResourceProviderAuthorizationRules.AsyncOperationPollingRules = value; + } + } + + /// The token auth configuration. + public TokenAuthConfiguration TokenAuthConfiguration { get; set; } + /// The template deployment policy. + public TemplateDeploymentPolicy TemplateDeploymentPolicy { get; set; } + /// The allow empty role assignments. + public bool? IsEmptyRoleAssignmentsAllowed { get; set; } + /// The policy execution type. + public PolicyExecutionType? PolicyExecutionType { get; set; } + /// The availability zone rule. + internal ResourceTypeRegistrationAvailabilityZoneRule AvailabilityZoneRule { get; set; } + /// Gets or sets the availability zone policy. + public AvailabilityZonePolicy? AvailabilityZonePolicy + { + get => AvailabilityZoneRule is null ? default : AvailabilityZoneRule.AvailabilityZonePolicy; + set + { + if (AvailabilityZoneRule is null) + AvailabilityZoneRule = new ResourceTypeRegistrationAvailabilityZoneRule(); + AvailabilityZoneRule.AvailabilityZonePolicy = value; + } + } + + /// The dsts configuration. + public ProviderDstsConfiguration DstsConfiguration { get; set; } + /// Async timeout rules. + public IList AsyncTimeoutRules { get; } + /// Common API versions for the resource type. + public IList CommonApiVersions { get; } + /// The api profiles. + public IList ApiProfiles { get; } + /// The linked operation rules. + public IList LinkedOperationRules { get; } + /// The legacy name. + public string LegacyName { get; set; } + /// The legacy names. + public IList LegacyNames { get; } + /// Allowed template deployment reference actions. + public IList AllowedTemplateDeploymentReferenceActions { get; } + /// The legacy policy. + public ResourceTypeRegistrationLegacyPolicy LegacyPolicy { get; set; } + /// Manifest link. + public string ManifestLink { get; set; } + /// Capacity rule. + public ResourceTypeRegistrationCapacityRule CapacityRule { get; set; } + /// Marketplace options. + internal ResourceTypeRegistrationMarketplaceOptions MarketplaceOptions { get; set; } + /// Add-on plan conversion allowed. + public bool? IsAddOnPlanConversionAllowed + { + get => MarketplaceOptions is null ? default : MarketplaceOptions.IsAddOnPlanConversionAllowed; + set + { + if (MarketplaceOptions is null) + MarketplaceOptions = new ResourceTypeRegistrationMarketplaceOptions(); + MarketplaceOptions.IsAddOnPlanConversionAllowed = value; + } + } + + /// The allowed resource names. + public IList AllowedResourceNames { get; } + /// Resource cache options. + public ResourceTypeRegistrationResourceCache ResourceCache { get; set; } + /// Resource query management options. + internal ProviderResourceQueryManagement ResourceQueryManagement { get; set; } + /// Filter option. + public ProviderResourceQueryFilterOption? ResourceQueryManagementFilterOption + { + get => ResourceQueryManagement is null ? default : ResourceQueryManagement.FilterOption; + set + { + if (ResourceQueryManagement is null) + ResourceQueryManagement = new ProviderResourceQueryManagement(); + ResourceQueryManagement.FilterOption = value; + } + } + + /// Whether tags are supported. + public bool? AreTagsSupported { get; set; } + /// Resource management options. + public ResourceTypeRegistrationResourceManagementOptions ResourceManagementOptions { get; set; } + /// Grouping tag. + public string GroupingTag { get; set; } + /// Add resource list target locations?. + public bool? IsAddResourceListTargetLocationsAllowed { get; set; } + /// Resource type common attribute management. + internal ResourceTypeCommonAttributeManagement ResourceTypeCommonAttributeManagement { get; set; } + /// Common api versions merge mode. + public CommonApiVersionsMergeMode? CommonApiVersionsMergeMode + { + get => ResourceTypeCommonAttributeManagement is null ? default : ResourceTypeCommonAttributeManagement.CommonApiVersionsMergeMode; + set + { + if (ResourceTypeCommonAttributeManagement is null) + ResourceTypeCommonAttributeManagement = new ResourceTypeCommonAttributeManagement(); + ResourceTypeCommonAttributeManagement.CommonApiVersionsMergeMode = value; + } + } + + /// Routing rule. + internal ResourceTypeRegistrationRoutingRule RoutingRule { get; set; } + /// Hosted resource type. + public string RoutingRuleHostResourceType + { + get => RoutingRule is null ? default : RoutingRule.HostResourceType; + set + { + if (RoutingRule is null) + RoutingRule = new ResourceTypeRegistrationRoutingRule(); + RoutingRule.HostResourceType = value; + } + } + + /// The frontdoor request mode. + public FrontdoorRequestMode? FrontdoorRequestMode { get; set; } + /// The resource sub type. + public ProviderResourceSubType? ResourceSubType { get; set; } + /// The async operation resource type name. + public string AsyncOperationResourceTypeName { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRegionality.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRegionality.cs index 2319d6b7ec94..4566a242e7f1 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRegionality.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRegionality.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceTypeRegistrationRegionality. + /// The regionality. public readonly partial struct ResourceTypeRegistrationRegionality : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceCache.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceCache.Serialization.cs new file mode 100644 index 000000000000..5021f3ba61da --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceCache.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeRegistrationResourceCache : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceCache)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsResourceCacheEnabled)) + { + writer.WritePropertyName("enableResourceCache"u8); + writer.WriteBooleanValue(IsResourceCacheEnabled.Value); + } + if (Optional.IsDefined(ResourceCacheExpirationTimespan)) + { + writer.WritePropertyName("resourceCacheExpirationTimespan"u8); + writer.WriteStringValue(ResourceCacheExpirationTimespan); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationResourceCache IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceCache)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationResourceCache(document.RootElement, options); + } + + internal static ResourceTypeRegistrationResourceCache DeserializeResourceTypeRegistrationResourceCache(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enableResourceCache = default; + string resourceCacheExpirationTimespan = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableResourceCache"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableResourceCache = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceCacheExpirationTimespan"u8)) + { + resourceCacheExpirationTimespan = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationResourceCache(enableResourceCache, resourceCacheExpirationTimespan, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceCache)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationResourceCache IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationResourceCache(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceCache)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceCache.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceCache.cs new file mode 100644 index 000000000000..0f9df97e4147 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceCache.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource cache options. + public partial class ResourceTypeRegistrationResourceCache + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationResourceCache() + { + } + + /// Initializes a new instance of . + /// Enable resource cache. + /// Resource cache expiration timespan. This is a TimeSpan property. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationResourceCache(bool? isResourceCacheEnabled, string resourceCacheExpirationTimespan, IDictionary serializedAdditionalRawData) + { + IsResourceCacheEnabled = isResourceCacheEnabled; + ResourceCacheExpirationTimespan = resourceCacheExpirationTimespan; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable resource cache. + public bool? IsResourceCacheEnabled { get; set; } + /// Resource cache expiration timespan. This is a TimeSpan property. + public string ResourceCacheExpirationTimespan { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceManagementOptions.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceManagementOptions.Serialization.cs new file mode 100644 index 000000000000..c773ed05d320 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceManagementOptions.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ResourceTypeRegistrationResourceManagementOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceManagementOptions)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(BatchProvisioningSupport)) + { + writer.WritePropertyName("batchProvisioningSupport"u8); + writer.WriteObjectValue(BatchProvisioningSupport, options); + } + if (Optional.IsCollectionDefined(DeleteDependencies)) + { + writer.WritePropertyName("deleteDependencies"u8); + writer.WriteStartArray(); + foreach (var item in DeleteDependencies) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NestedProvisioningSupport)) + { + writer.WritePropertyName("nestedProvisioningSupport"u8); + writer.WriteObjectValue(NestedProvisioningSupport, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationResourceManagementOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceManagementOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationResourceManagementOptions(document.RootElement, options); + } + + internal static ResourceTypeRegistrationResourceManagementOptions DeserializeResourceTypeRegistrationResourceManagementOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchProvisioningSupport batchProvisioningSupport = default; + IList deleteDependencies = default; + NestedProvisioningSupport nestedProvisioningSupport = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("batchProvisioningSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + batchProvisioningSupport = BatchProvisioningSupport.DeserializeBatchProvisioningSupport(property.Value, options); + continue; + } + if (property.NameEquals("deleteDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceTypeRegistrationDeleteDependency.DeserializeResourceTypeRegistrationDeleteDependency(item, options)); + } + deleteDependencies = array; + continue; + } + if (property.NameEquals("nestedProvisioningSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nestedProvisioningSupport = NestedProvisioningSupport.DeserializeNestedProvisioningSupport(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationResourceManagementOptions(batchProvisioningSupport, deleteDependencies ?? new ChangeTrackingList(), nestedProvisioningSupport, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceManagementOptions)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationResourceManagementOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationResourceManagementOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationResourceManagementOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceManagementOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceManagementOptions.cs new file mode 100644 index 000000000000..558dc12486a0 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationResourceManagementOptions.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Resource management options. + public partial class ResourceTypeRegistrationResourceManagementOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationResourceManagementOptions() + { + DeleteDependencies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Batch provisioning support. + /// Delete dependencies. + /// Nested provisioning support. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationResourceManagementOptions(BatchProvisioningSupport batchProvisioningSupport, IList deleteDependencies, NestedProvisioningSupport nestedProvisioningSupport, IDictionary serializedAdditionalRawData) + { + BatchProvisioningSupport = batchProvisioningSupport; + DeleteDependencies = deleteDependencies; + NestedProvisioningSupport = nestedProvisioningSupport; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Batch provisioning support. + internal BatchProvisioningSupport BatchProvisioningSupport { get; set; } + /// Supported operations. + public ResourceManagementSupportedOperation? BatchProvisioningSupportSupportedOperations + { + get => BatchProvisioningSupport is null ? default : BatchProvisioningSupport.SupportedOperations; + set + { + if (BatchProvisioningSupport is null) + BatchProvisioningSupport = new BatchProvisioningSupport(); + BatchProvisioningSupport.SupportedOperations = value; + } + } + + /// Delete dependencies. + public IList DeleteDependencies { get; } + /// Nested provisioning support. + internal NestedProvisioningSupport NestedProvisioningSupport { get; set; } + /// Minimum API version. + public string NestedProvisioningSupportMinimumApiVersion + { + get => NestedProvisioningSupport is null ? default : NestedProvisioningSupport.MinimumApiVersion; + set + { + if (NestedProvisioningSupport is null) + NestedProvisioningSupport = new NestedProvisioningSupport(); + NestedProvisioningSupport.MinimumApiVersion = value; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRoutingRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRoutingRule.Serialization.cs new file mode 100644 index 000000000000..b05ea86b3795 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRoutingRule.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + internal partial class ResourceTypeRegistrationRoutingRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationRoutingRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(HostResourceType)) + { + writer.WritePropertyName("hostResourceType"u8); + writer.WriteStringValue(HostResourceType); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceTypeRegistrationRoutingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceTypeRegistrationRoutingRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceTypeRegistrationRoutingRule(document.RootElement, options); + } + + internal static ResourceTypeRegistrationRoutingRule DeserializeResourceTypeRegistrationRoutingRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hostResourceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hostResourceType"u8)) + { + hostResourceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceTypeRegistrationRoutingRule(hostResourceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationRoutingRule)} does not support writing '{options.Format}' format."); + } + } + + ResourceTypeRegistrationRoutingRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResourceTypeRegistrationRoutingRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceTypeRegistrationRoutingRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRoutingRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRoutingRule.cs new file mode 100644 index 000000000000..c8285532cd70 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeRegistrationRoutingRule.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Routing rule. + internal partial class ResourceTypeRegistrationRoutingRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceTypeRegistrationRoutingRule() + { + } + + /// Initializes a new instance of . + /// Hosted resource type. + /// Keeps track of any properties unknown to the library. + internal ResourceTypeRegistrationRoutingRule(string hostResourceType, IDictionary serializedAdditionalRawData) + { + HostResourceType = hostResourceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Hosted resource type. + public string HostResourceType { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCapacity.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCapacity.cs index 021a1def8c31..d205001b42eb 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCapacity.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCapacity.cs @@ -46,17 +46,17 @@ public partial class ResourceTypeSkuCapacity private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The minimum. public ResourceTypeSkuCapacity(int minimum) { Minimum = minimum; } /// Initializes a new instance of . - /// - /// - /// - /// + /// The minimum. + /// The maximum. + /// The default. + /// The scale type. /// Keeps track of any properties unknown to the library. internal ResourceTypeSkuCapacity(int minimum, int? maximum, int? @default, ResourceTypeSkuScaleType? scaleType, IDictionary serializedAdditionalRawData) { @@ -72,13 +72,13 @@ internal ResourceTypeSkuCapacity() { } - /// Gets or sets the minimum. + /// The minimum. public int Minimum { get; set; } - /// Gets or sets the maximum. + /// The maximum. public int? Maximum { get; set; } - /// Gets or sets the default. + /// The default. public int? Default { get; set; } - /// Gets or sets the scale type. + /// The scale type. public ResourceTypeSkuScaleType? ScaleType { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCost.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCost.cs index 4ec4acd26c80..d0a1d262c987 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCost.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuCost.cs @@ -46,7 +46,7 @@ public partial class ResourceTypeSkuCost private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The meter id. /// is null. public ResourceTypeSkuCost(string meterId) { @@ -56,9 +56,9 @@ public ResourceTypeSkuCost(string meterId) } /// Initializes a new instance of . - /// - /// - /// + /// The meter id. + /// The quantity. + /// The extended unit. /// Keeps track of any properties unknown to the library. internal ResourceTypeSkuCost(string meterId, int? quantity, string extendedUnit, IDictionary serializedAdditionalRawData) { @@ -73,11 +73,11 @@ internal ResourceTypeSkuCost() { } - /// Gets or sets the meter id. + /// The meter id. public string MeterId { get; set; } - /// Gets or sets the quantity. + /// The quantity. public int? Quantity { get; set; } - /// Gets or sets the extended unit. + /// The extended unit. public string ExtendedUnit { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuListResult.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuListResult.cs index aa609c11e9fb..1f2001045417 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuListResult.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuListResult.cs @@ -52,7 +52,7 @@ internal ResourceTypeSkuListResult() } /// Initializes a new instance of . - /// + /// The sku resources. /// The URL to get to the next set of results, if there are any. /// Keeps track of any properties unknown to the library. internal ResourceTypeSkuListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) @@ -62,7 +62,7 @@ internal ResourceTypeSkuListResult(IReadOnlyList value, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// The sku resources. public IReadOnlyList Value { get; } /// The URL to get to the next set of results, if there are any. public string NextLink { get; } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.Serialization.cs index 1aa3c57a5607..df584b6edcd5 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.Serialization.cs @@ -66,10 +66,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(ExtendedLocationType)) + if (Optional.IsDefined(LocationType)) { writer.WritePropertyName("type"u8); - writer.WriteStringValue(ExtendedLocationType.Value.ToSerialString()); + writer.WriteStringValue(LocationType.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -112,7 +112,7 @@ internal static ResourceTypeSkuLocationInfo DeserializeResourceTypeSkuLocationIn IList zones = default; IList zoneDetails = default; IList extendedLocations = default; - ProviderHubExtendedLocationType? type = default; + ProviderExtendedLocationType? type = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -170,7 +170,7 @@ internal static ResourceTypeSkuLocationInfo DeserializeResourceTypeSkuLocationIn { continue; } - type = property.Value.GetString().ToProviderHubExtendedLocationType(); + type = new ProviderExtendedLocationType(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.cs index e4ca443b9d9b..15045adc878c 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuLocationInfo.cs @@ -47,7 +47,7 @@ public partial class ResourceTypeSkuLocationInfo private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The location. public ResourceTypeSkuLocationInfo(AzureLocation location) { Location = location; @@ -57,19 +57,19 @@ public ResourceTypeSkuLocationInfo(AzureLocation location) } /// Initializes a new instance of . - /// - /// - /// - /// - /// + /// The location. + /// The zones. + /// The zone details. + /// The extended locations. + /// The type. /// Keeps track of any properties unknown to the library. - internal ResourceTypeSkuLocationInfo(AzureLocation location, IList zones, IList zoneDetails, IList extendedLocations, ProviderHubExtendedLocationType? extendedLocationType, IDictionary serializedAdditionalRawData) + internal ResourceTypeSkuLocationInfo(AzureLocation location, IList zones, IList zoneDetails, IList extendedLocations, ProviderExtendedLocationType? locationType, IDictionary serializedAdditionalRawData) { Location = location; Zones = zones; ZoneDetails = zoneDetails; ExtendedLocations = extendedLocations; - ExtendedLocationType = extendedLocationType; + LocationType = locationType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -78,15 +78,15 @@ internal ResourceTypeSkuLocationInfo() { } - /// Gets or sets the location. + /// The location. public AzureLocation Location { get; set; } - /// Gets the zones. + /// The zones. public IList Zones { get; } - /// Gets the zone details. + /// The zone details. public IList ZoneDetails { get; } - /// Gets the extended locations. + /// The extended locations. public IList ExtendedLocations { get; } - /// Gets or sets the extended location type. - public ProviderHubExtendedLocationType? ExtendedLocationType { get; set; } + /// The type. + public ProviderExtendedLocationType? LocationType { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.Serialization.cs index 75456951a799..f83016fcee96 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.cs index 3b34b783298d..2de57881ccc8 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuProperties.cs @@ -47,7 +47,7 @@ public partial class ResourceTypeSkuProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The sku settings. /// is null. public ResourceTypeSkuProperties(IEnumerable skuSettings) { @@ -57,8 +57,8 @@ public ResourceTypeSkuProperties(IEnumerable skuSettings } /// Initializes a new instance of . - /// - /// + /// The sku settings. + /// The provisioning state. /// Keeps track of any properties unknown to the library. internal ResourceTypeSkuProperties(IList skuSettings, ProviderHubProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { @@ -72,9 +72,7 @@ internal ResourceTypeSkuProperties() { } - /// Gets the sku settings. + /// The sku settings. public IList SkuSettings { get; } - /// Gets or sets the provisioning state. - public ProviderHubProvisioningState? ProvisioningState { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuScaleType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuScaleType.cs index f2fdcc8a631b..812f33d250d6 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuScaleType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuScaleType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceTypeSkuScaleType. + /// The scale type. public readonly partial struct ResourceTypeSkuScaleType : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuSetting.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuSetting.cs index a3c73dbf9e3d..941f0678fbeb 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuSetting.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuSetting.cs @@ -46,7 +46,7 @@ public partial class ResourceTypeSkuSetting private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The name. /// is null. public ResourceTypeSkuSetting(string name) { @@ -62,18 +62,18 @@ public ResourceTypeSkuSetting(string name) } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// + /// The name. + /// The tier. + /// The size. + /// The family. + /// The kind. + /// The locations. + /// The location info. + /// The required quota ids. + /// The required features. + /// The capacity. + /// The costs. + /// The capabilities. /// Keeps track of any properties unknown to the library. internal ResourceTypeSkuSetting(string name, string tier, string size, string family, string kind, IList locations, IList locationInfo, IList requiredQuotaIds, IList requiredFeatures, ResourceTypeSkuCapacity capacity, IList costs, IList capabilities, IDictionary serializedAdditionalRawData) { @@ -97,29 +97,29 @@ internal ResourceTypeSkuSetting() { } - /// Gets or sets the name. + /// The name. public string Name { get; set; } - /// Gets or sets the tier. + /// The tier. public string Tier { get; set; } - /// Gets or sets the size. + /// The size. public string Size { get; set; } - /// Gets or sets the family. + /// The family. public string Family { get; set; } - /// Gets or sets the kind. + /// The kind. public string Kind { get; set; } - /// Gets the locations. + /// The locations. public IList Locations { get; } - /// Gets the location info. + /// The location info. public IList LocationInfo { get; } - /// Gets the required quota ids. + /// The required quota ids. public IList RequiredQuotaIds { get; } - /// Gets the required features. + /// The required features. public IList RequiredFeatures { get; } - /// Gets or sets the capacity. + /// The capacity. public ResourceTypeSkuCapacity Capacity { get; set; } - /// Gets the costs. + /// The costs. public IList Costs { get; } - /// Gets the capabilities. + /// The capabilities. public IList Capabilities { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuZoneDetail.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuZoneDetail.cs index 518318a56c97..06794801fcbc 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuZoneDetail.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceTypeSkuZoneDetail.cs @@ -53,8 +53,8 @@ public ResourceTypeSkuZoneDetail() } /// Initializes a new instance of . - /// - /// + /// The name. + /// The capabilities. /// Keeps track of any properties unknown to the library. internal ResourceTypeSkuZoneDetail(IList name, IList capabilities, IDictionary serializedAdditionalRawData) { @@ -63,9 +63,9 @@ internal ResourceTypeSkuZoneDetail(IList name, IList Gets the name. + /// The name. public IList Name { get; } - /// Gets the capabilities. + /// The capabilities. public IList Capabilities { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceValidation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceValidation.cs index f63830b30d98..131e43f3ab6d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceValidation.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ResourceValidation.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ResourceValidation. + /// The resource validation. public readonly partial struct ResourceValidation : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RolloutStatusBase.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RolloutStatusBase.cs index 53321d238105..04aee29136f6 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RolloutStatusBase.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/RolloutStatusBase.cs @@ -54,8 +54,8 @@ public RolloutStatusBase() } /// Initializes a new instance of . - /// - /// Dictionary of <ExtendedErrorInfo>. + /// The completed regions. + /// The failed or skipped regions. /// Keeps track of any properties unknown to the library. internal RolloutStatusBase(IList completedRegions, IDictionary failedOrSkippedRegions, IDictionary serializedAdditionalRawData) { @@ -64,9 +64,9 @@ internal RolloutStatusBase(IList completedRegions, IDictionary Gets the completed regions. + /// The completed regions. public IList CompletedRegions { get; } - /// Dictionary of <ExtendedErrorInfo>. + /// The failed or skipped regions. public IDictionary FailedOrSkippedRegions { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServerFailureResponseMessageType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServerFailureResponseMessageType.cs new file mode 100644 index 000000000000..f5b0e7bb815f --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServerFailureResponseMessageType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Type of server failure response message. + public readonly partial struct ServerFailureResponseMessageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ServerFailureResponseMessageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string OutageReportingValue = "OutageReporting"; + + /// NotSpecified. + public static ServerFailureResponseMessageType NotSpecified { get; } = new ServerFailureResponseMessageType(NotSpecifiedValue); + /// OutageReporting. + public static ServerFailureResponseMessageType OutageReporting { get; } = new ServerFailureResponseMessageType(OutageReportingValue); + /// Determines if two values are the same. + public static bool operator ==(ServerFailureResponseMessageType left, ServerFailureResponseMessageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServerFailureResponseMessageType left, ServerFailureResponseMessageType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ServerFailureResponseMessageType(string value) => new ServerFailureResponseMessageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServerFailureResponseMessageType other && Equals(other); + /// + public bool Equals(ServerFailureResponseMessageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceClientOptionsType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceClientOptionsType.cs new file mode 100644 index 000000000000..6fd5111ef242 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceClientOptionsType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ServiceClientOptionsType. + public readonly partial struct ServiceClientOptionsType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ServiceClientOptionsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string DisableAutomaticDecompressionValue = "DisableAutomaticDecompression"; + + /// NotSpecified. + public static ServiceClientOptionsType NotSpecified { get; } = new ServiceClientOptionsType(NotSpecifiedValue); + /// DisableAutomaticDecompression. + public static ServiceClientOptionsType DisableAutomaticDecompression { get; } = new ServiceClientOptionsType(DisableAutomaticDecompressionValue); + /// Determines if two values are the same. + public static bool operator ==(ServiceClientOptionsType left, ServiceClientOptionsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServiceClientOptionsType left, ServiceClientOptionsType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ServiceClientOptionsType(string value) => new ServiceClientOptionsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServiceClientOptionsType other && Equals(other); + /// + public bool Equals(ServiceClientOptionsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceFeatureFlagAction.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceFeatureFlagAction.cs new file mode 100644 index 000000000000..26f14dce8de9 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceFeatureFlagAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The service feature flag. + public readonly partial struct ServiceFeatureFlagAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ServiceFeatureFlagAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DoNotCreateValue = "DoNotCreate"; + private const string CreateValue = "Create"; + + /// DoNotCreate. + public static ServiceFeatureFlagAction DoNotCreate { get; } = new ServiceFeatureFlagAction(DoNotCreateValue); + /// Create. + public static ServiceFeatureFlagAction Create { get; } = new ServiceFeatureFlagAction(CreateValue); + /// Determines if two values are the same. + public static bool operator ==(ServiceFeatureFlagAction left, ServiceFeatureFlagAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServiceFeatureFlagAction left, ServiceFeatureFlagAction right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ServiceFeatureFlagAction(string value) => new ServiceFeatureFlagAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServiceFeatureFlagAction other && Equals(other); + /// + public bool Equals(ServiceFeatureFlagAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.Serialization.cs index 32aaf46da6f5..ded098544183 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.Serialization.cs @@ -44,6 +44,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("componentId"u8); writer.WriteStringValue(ComponentId); } + if (Optional.IsDefined(Readiness)) + { + writer.WritePropertyName("readiness"u8); + writer.WriteStringValue(Readiness.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,6 +88,7 @@ internal static ServiceTreeInfo DeserializeServiceTreeInfo(JsonElement element, } string serviceId = default; string componentId = default; + ServiceTreeReadiness? readiness = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -97,13 +103,22 @@ internal static ServiceTreeInfo DeserializeServiceTreeInfo(JsonElement element, componentId = property.Value.GetString(); continue; } + if (property.NameEquals("readiness"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readiness = new ServiceTreeReadiness(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ServiceTreeInfo(serviceId, componentId, serializedAdditionalRawData); + return new ServiceTreeInfo(serviceId, componentId, readiness, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.cs index 6d22cc3a1261..456e0c96ceb6 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeInfo.cs @@ -51,19 +51,23 @@ public ServiceTreeInfo() } /// Initializes a new instance of . - /// - /// + /// The service id. + /// The component id. + /// The readiness. /// Keeps track of any properties unknown to the library. - internal ServiceTreeInfo(string serviceId, string componentId, IDictionary serializedAdditionalRawData) + internal ServiceTreeInfo(string serviceId, string componentId, ServiceTreeReadiness? readiness, IDictionary serializedAdditionalRawData) { ServiceId = serviceId; ComponentId = componentId; + Readiness = readiness; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the service id. + /// The service id. public string ServiceId { get; set; } - /// Gets or sets the component id. + /// The component id. public string ComponentId { get; set; } + /// The readiness. + public ServiceTreeReadiness? Readiness { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeReadiness.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeReadiness.cs new file mode 100644 index 000000000000..f781a30699d0 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ServiceTreeReadiness.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The readiness. + public readonly partial struct ServiceTreeReadiness : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ServiceTreeReadiness(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClosingDownValue = "ClosingDown"; + private const string DeprecatedValue = "Deprecated"; + private const string GAValue = "GA"; + private const string InDevelopmentValue = "InDevelopment"; + private const string InternalOnlyValue = "InternalOnly"; + private const string PrivatePreviewValue = "PrivatePreview"; + private const string PublicPreviewValue = "PublicPreview"; + private const string RemovedFromARMValue = "RemovedFromARM"; + private const string RetiredValue = "Retired"; + + /// ClosingDown. + public static ServiceTreeReadiness ClosingDown { get; } = new ServiceTreeReadiness(ClosingDownValue); + /// Deprecated. + public static ServiceTreeReadiness Deprecated { get; } = new ServiceTreeReadiness(DeprecatedValue); + /// GA. + public static ServiceTreeReadiness GA { get; } = new ServiceTreeReadiness(GAValue); + /// InDevelopment. + public static ServiceTreeReadiness InDevelopment { get; } = new ServiceTreeReadiness(InDevelopmentValue); + /// InternalOnly. + public static ServiceTreeReadiness InternalOnly { get; } = new ServiceTreeReadiness(InternalOnlyValue); + /// PrivatePreview. + public static ServiceTreeReadiness PrivatePreview { get; } = new ServiceTreeReadiness(PrivatePreviewValue); + /// PublicPreview. + public static ServiceTreeReadiness PublicPreview { get; } = new ServiceTreeReadiness(PublicPreviewValue); + /// RemovedFromARM. + public static ServiceTreeReadiness RemovedFromARM { get; } = new ServiceTreeReadiness(RemovedFromARMValue); + /// Retired. + public static ServiceTreeReadiness Retired { get; } = new ServiceTreeReadiness(RetiredValue); + /// Determines if two values are the same. + public static bool operator ==(ServiceTreeReadiness left, ServiceTreeReadiness right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServiceTreeReadiness left, ServiceTreeReadiness right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ServiceTreeReadiness(string value) => new ServiceTreeReadiness(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServiceTreeReadiness other && Equals(other); + /// + public bool Equals(ServiceTreeReadiness other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SignedRequestScope.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SignedRequestScope.cs new file mode 100644 index 000000000000..4262cb1518d2 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SignedRequestScope.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The signed request scope. + public readonly partial struct SignedRequestScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SignedRequestScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ResourceUriValue = "ResourceUri"; + private const string EndpointValue = "Endpoint"; + + /// ResourceUri. + public static SignedRequestScope ResourceUri { get; } = new SignedRequestScope(ResourceUriValue); + /// Endpoint. + public static SignedRequestScope Endpoint { get; } = new SignedRequestScope(EndpointValue); + /// Determines if two values are the same. + public static bool operator ==(SignedRequestScope left, SignedRequestScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SignedRequestScope left, SignedRequestScope right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SignedRequestScope(string value) => new SignedRequestScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SignedRequestScope other && Equals(other); + /// + public bool Equals(SignedRequestScope other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SkipNotification.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SkipNotification.cs new file mode 100644 index 000000000000..ffc1c62e28a0 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SkipNotification.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// Whether notifications should be skipped. + public readonly partial struct SkipNotification : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkipNotification(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnspecifiedValue = "Unspecified"; + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Unspecified. + public static SkipNotification Unspecified { get; } = new SkipNotification(UnspecifiedValue); + /// Enabled. + public static SkipNotification Enabled { get; } = new SkipNotification(EnabledValue); + /// Disabled. + public static SkipNotification Disabled { get; } = new SkipNotification(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(SkipNotification left, SkipNotification right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkipNotification left, SkipNotification right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SkipNotification(string value) => new SkipNotification(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkipNotification other && Equals(other); + /// + public bool Equals(SkipNotification other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriberSetting.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriberSetting.Serialization.cs new file mode 100644 index 000000000000..3b000715d6d6 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriberSetting.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class SubscriberSetting : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubscriberSetting)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(FilterRules)) + { + writer.WritePropertyName("filterRules"u8); + writer.WriteStartArray(); + foreach (var item in FilterRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SubscriberSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubscriberSetting)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSubscriberSetting(document.RootElement, options); + } + + internal static SubscriberSetting DeserializeSubscriberSetting(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList filterRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filterRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProviderFilterRule.DeserializeProviderFilterRule(item, options)); + } + filterRules = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SubscriberSetting(filterRules ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(SubscriberSetting)} does not support writing '{options.Format}' format."); + } + } + + SubscriberSetting IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSubscriberSetting(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SubscriberSetting)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriberSetting.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriberSetting.cs new file mode 100644 index 000000000000..92b200767a4d --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriberSetting.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The SubscriberSetting. + public partial class SubscriberSetting + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SubscriberSetting() + { + FilterRules = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The filter rules. + /// Keeps track of any properties unknown to the library. + internal SubscriberSetting(IList filterRules, IDictionary serializedAdditionalRawData) + { + FilterRules = filterRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The filter rules. + public IList FilterRules { get; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionLifecycleNotificationSpecifications.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionLifecycleNotificationSpecifications.cs index 1264981ef5f4..0f829b5a7773 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionLifecycleNotificationSpecifications.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionLifecycleNotificationSpecifications.cs @@ -52,8 +52,8 @@ public SubscriptionLifecycleNotificationSpecifications() } /// Initializes a new instance of . - /// - /// + /// The subscription state override actions. + /// The soft delete TTL. /// Keeps track of any properties unknown to the library. internal SubscriptionLifecycleNotificationSpecifications(IList subscriptionStateOverrideActions, TimeSpan? softDeleteTtl, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal SubscriptionLifecycleNotificationSpecifications(IList Gets the subscription state override actions. + /// The subscription state override actions. public IList SubscriptionStateOverrideActions { get; } - /// Gets or sets the soft delete ttl. + /// The soft delete TTL. public TimeSpan? SoftDeleteTtl { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionNotificationOperation.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionNotificationOperation.cs index 8662a9d871a2..0ef80ce29041 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionNotificationOperation.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionNotificationOperation.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The SubscriptionNotificationOperation. + /// The action. public readonly partial struct SubscriptionNotificationOperation : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionReregistrationResult.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionReregistrationResult.cs index d0f429b9d8c2..5d3923d86e6b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionReregistrationResult.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionReregistrationResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The SubscriptionReregistrationResult. + /// The subscription reregistration result. public readonly partial struct SubscriptionReregistrationResult : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionStateOverrideAction.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionStateOverrideAction.cs index cd109add802f..e4cdeebf90ee 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionStateOverrideAction.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionStateOverrideAction.cs @@ -46,8 +46,8 @@ public partial class SubscriptionStateOverrideAction private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// + /// The state. + /// The action. public SubscriptionStateOverrideAction(SubscriptionTransitioningState state, SubscriptionNotificationOperation action) { State = state; @@ -55,8 +55,8 @@ public SubscriptionStateOverrideAction(SubscriptionTransitioningState state, Sub } /// Initializes a new instance of . - /// - /// + /// The state. + /// The action. /// Keeps track of any properties unknown to the library. internal SubscriptionStateOverrideAction(SubscriptionTransitioningState state, SubscriptionNotificationOperation action, IDictionary serializedAdditionalRawData) { @@ -70,9 +70,9 @@ internal SubscriptionStateOverrideAction() { } - /// Gets or sets the state. + /// The state. public SubscriptionTransitioningState State { get; set; } - /// Gets or sets the action. + /// The action. public SubscriptionNotificationOperation Action { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionTransitioningState.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionTransitioningState.cs index 77573764ba94..3ef0e307d530 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionTransitioningState.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SubscriptionTransitioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The SubscriptionTransitioningState. + /// The state. public readonly partial struct SubscriptionTransitioningState : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SwaggerSpecification.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SwaggerSpecification.cs index a1554a5c8f47..7a4a7069da5d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SwaggerSpecification.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/SwaggerSpecification.cs @@ -52,8 +52,8 @@ public SwaggerSpecification() } /// Initializes a new instance of . - /// - /// + /// The api versions. + /// The swagger spec folder uri. /// Keeps track of any properties unknown to the library. internal SwaggerSpecification(IList apiVersions, Uri swaggerSpecFolderUri, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal SwaggerSpecification(IList apiVersions, Uri swaggerSpecFolderUr _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the api versions. + /// The api versions. public IList ApiVersions { get; } - /// Gets or sets the swagger spec folder uri. + /// The swagger spec folder uri. public Uri SwaggerSpecFolderUri { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentCapability.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentCapability.cs index 69907ce1f60e..0ac96b05b8af 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentCapability.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentCapability.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The TemplateDeploymentCapability. + /// The capabilities. public readonly partial struct TemplateDeploymentCapability : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentOptions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentOptions.cs index 24393de818f4..8f82969a32c7 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentOptions.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentOptions.cs @@ -52,8 +52,8 @@ public TemplateDeploymentOptions() } /// Initializes a new instance of . - /// - /// + /// Whether preflight is supported. + /// The preflight options. /// Keeps track of any properties unknown to the library. internal TemplateDeploymentOptions(bool? isPreflightSupported, IList preflightOptions, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal TemplateDeploymentOptions(bool? isPreflightSupported, IList Gets or sets the is preflight supported. + /// Whether preflight is supported. public bool? IsPreflightSupported { get; set; } - /// Gets the preflight options. + /// The preflight options. public IList PreflightOptions { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.Serialization.cs index d3c1cd9f5715..768a073f7554 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.Serialization.cs @@ -38,6 +38,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Capabilities.ToString()); writer.WritePropertyName("preflightOptions"u8); writer.WriteStringValue(PreflightOptions.ToString()); + if (Optional.IsDefined(PreflightNotifications)) + { + writer.WritePropertyName("preflightNotifications"u8); + writer.WriteStringValue(PreflightNotifications.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +82,7 @@ internal static TemplateDeploymentPolicy DeserializeTemplateDeploymentPolicy(Jso } TemplateDeploymentCapability capabilities = default; TemplateDeploymentPreflightOption preflightOptions = default; + TemplateDeploymentPreflightNotification? preflightNotifications = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +97,22 @@ internal static TemplateDeploymentPolicy DeserializeTemplateDeploymentPolicy(Jso preflightOptions = new TemplateDeploymentPreflightOption(property.Value.GetString()); continue; } + if (property.NameEquals("preflightNotifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + preflightNotifications = new TemplateDeploymentPreflightNotification(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new TemplateDeploymentPolicy(capabilities, preflightOptions, serializedAdditionalRawData); + return new TemplateDeploymentPolicy(capabilities, preflightOptions, preflightNotifications, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.cs index 705f6c575874..6e50a02b68a8 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPolicy.cs @@ -46,22 +46,24 @@ public partial class TemplateDeploymentPolicy private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// - internal TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities, TemplateDeploymentPreflightOption preflightOptions) + /// The capabilities. + /// The preflight options. + public TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities, TemplateDeploymentPreflightOption preflightOptions) { Capabilities = capabilities; PreflightOptions = preflightOptions; } /// Initializes a new instance of . - /// - /// + /// The capabilities. + /// The preflight options. + /// The preflight notifications. /// Keeps track of any properties unknown to the library. - internal TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities, TemplateDeploymentPreflightOption preflightOptions, IDictionary serializedAdditionalRawData) + internal TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities, TemplateDeploymentPreflightOption preflightOptions, TemplateDeploymentPreflightNotification? preflightNotifications, IDictionary serializedAdditionalRawData) { Capabilities = capabilities; PreflightOptions = preflightOptions; + PreflightNotifications = preflightNotifications; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -70,9 +72,11 @@ internal TemplateDeploymentPolicy() { } - /// Gets the capabilities. - public TemplateDeploymentCapability Capabilities { get; } - /// Gets the preflight options. - public TemplateDeploymentPreflightOption PreflightOptions { get; } + /// The capabilities. + public TemplateDeploymentCapability Capabilities { get; set; } + /// The preflight options. + public TemplateDeploymentPreflightOption PreflightOptions { get; set; } + /// The preflight notifications. + public TemplateDeploymentPreflightNotification? PreflightNotifications { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPreflightNotification.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPreflightNotification.cs new file mode 100644 index 000000000000..34342ba04766 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPreflightNotification.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The preflight notifications. + public readonly partial struct TemplateDeploymentPreflightNotification : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TemplateDeploymentPreflightNotification(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UnregisteredSubscriptionsValue = "UnregisteredSubscriptions"; + + /// None. + public static TemplateDeploymentPreflightNotification None { get; } = new TemplateDeploymentPreflightNotification(NoneValue); + /// UnregisteredSubscriptions. + public static TemplateDeploymentPreflightNotification UnregisteredSubscriptions { get; } = new TemplateDeploymentPreflightNotification(UnregisteredSubscriptionsValue); + /// Determines if two values are the same. + public static bool operator ==(TemplateDeploymentPreflightNotification left, TemplateDeploymentPreflightNotification right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TemplateDeploymentPreflightNotification left, TemplateDeploymentPreflightNotification right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TemplateDeploymentPreflightNotification(string value) => new TemplateDeploymentPreflightNotification(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TemplateDeploymentPreflightNotification other && Equals(other); + /// + public bool Equals(TemplateDeploymentPreflightNotification other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPreflightOption.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPreflightOption.cs index 925ba9515605..eb28bbd266e2 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPreflightOption.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TemplateDeploymentPreflightOption.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The TemplateDeploymentPreflightOption. + /// The preflight options. public readonly partial struct TemplateDeploymentPreflightOption : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyExtension.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyExtension.Serialization.cs new file mode 100644 index 000000000000..6886d0eec35f --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyExtension.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class ThirdPartyExtension : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThirdPartyExtension)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ThirdPartyExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThirdPartyExtension)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThirdPartyExtension(document.RootElement, options); + } + + internal static ThirdPartyExtension DeserializeThirdPartyExtension(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThirdPartyExtension(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ThirdPartyExtension)} does not support writing '{options.Format}' format."); + } + } + + ThirdPartyExtension IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThirdPartyExtension(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThirdPartyExtension)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyExtension.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyExtension.cs new file mode 100644 index 000000000000..73f78fd955ce --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyExtension.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The ThirdPartyExtension. + public partial class ThirdPartyExtension + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ThirdPartyExtension() + { + } + + /// Initializes a new instance of . + /// Name of third party extension. + /// Keeps track of any properties unknown to the library. + internal ThirdPartyExtension(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of third party extension. + public string Name { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyProviderAuthorization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyProviderAuthorization.cs index b4ded7d1056f..a168eb04962b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyProviderAuthorization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThirdPartyProviderAuthorization.cs @@ -52,8 +52,8 @@ public ThirdPartyProviderAuthorization() } /// Initializes a new instance of . - /// - /// + /// The authorizations. + /// The managed by tenant id. /// Keeps track of any properties unknown to the library. internal ThirdPartyProviderAuthorization(IList authorizations, string managedByTenantId, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal ThirdPartyProviderAuthorization(IList authoriz _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the authorizations. + /// The authorizations. public IList Authorizations { get; } - /// Gets or sets the managed by tenant id. + /// The managed by tenant id. public string ManagedByTenantId { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetric.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetric.cs index 95acbd132470..d2b227d648e8 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetric.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetric.cs @@ -46,8 +46,8 @@ public partial class ThrottlingMetric private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// + /// The throttling metric type. + /// The limit. public ThrottlingMetric(ThrottlingMetricType metricType, long limit) { MetricType = metricType; @@ -55,9 +55,9 @@ public ThrottlingMetric(ThrottlingMetricType metricType, long limit) } /// Initializes a new instance of . - /// - /// - /// + /// The throttling metric type. + /// The limit. + /// The interval. /// Keeps track of any properties unknown to the library. internal ThrottlingMetric(ThrottlingMetricType metricType, long limit, TimeSpan? interval, IDictionary serializedAdditionalRawData) { @@ -72,11 +72,11 @@ internal ThrottlingMetric() { } - /// Gets or sets the metric type. + /// The throttling metric type. public ThrottlingMetricType MetricType { get; set; } - /// Gets or sets the limit. + /// The limit. public long Limit { get; set; } - /// Gets or sets the interval. + /// The interval. public TimeSpan? Interval { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetricType.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetricType.cs index 0f3c22784718..c693a460d442 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetricType.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingMetricType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The ThrottlingMetricType. + /// The throttling metric type. public readonly partial struct ThrottlingMetricType : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.Serialization.cs index ceb738cb634c..1744bd489774 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.Serialization.cs @@ -53,6 +53,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(ApplicationId)) + { + writer.WritePropertyName("applicationId"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -93,6 +103,7 @@ internal static ThrottlingRule DeserializeThrottlingRule(JsonElement element, Mo string action = default; IList metrics = default; IList requiredFeatures = default; + IList applicationId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,13 +137,27 @@ internal static ThrottlingRule DeserializeThrottlingRule(JsonElement element, Mo requiredFeatures = array; continue; } + if (property.NameEquals("applicationId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + applicationId = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ThrottlingRule(action, metrics, requiredFeatures ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ThrottlingRule(action, metrics, requiredFeatures ?? new ChangeTrackingList(), applicationId ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.cs index 0e82a246f08b..282553383982 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/ThrottlingRule.cs @@ -47,8 +47,8 @@ public partial class ThrottlingRule private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// + /// The action. + /// The metrics. /// or is null. public ThrottlingRule(string action, IEnumerable metrics) { @@ -58,18 +58,21 @@ public ThrottlingRule(string action, IEnumerable metrics) Action = action; Metrics = metrics.ToList(); RequiredFeatures = new ChangeTrackingList(); + ApplicationId = new ChangeTrackingList(); } /// Initializes a new instance of . - /// - /// - /// + /// The action. + /// The metrics. + /// The required features. + /// The application id. /// Keeps track of any properties unknown to the library. - internal ThrottlingRule(string action, IList metrics, IList requiredFeatures, IDictionary serializedAdditionalRawData) + internal ThrottlingRule(string action, IList metrics, IList requiredFeatures, IList applicationId, IDictionary serializedAdditionalRawData) { Action = action; Metrics = metrics; RequiredFeatures = requiredFeatures; + ApplicationId = applicationId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -78,11 +81,13 @@ internal ThrottlingRule() { } - /// Gets or sets the action. + /// The action. public string Action { get; set; } - /// Gets the metrics. + /// The metrics. public IList Metrics { get; } - /// Gets the required features. + /// The required features. public IList RequiredFeatures { get; } + /// The application id. + public IList ApplicationId { get; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TokenAuthConfiguration.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TokenAuthConfiguration.Serialization.cs new file mode 100644 index 000000000000..bc3d9d62d0eb --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TokenAuthConfiguration.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + public partial class TokenAuthConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TokenAuthConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AuthenticationScheme)) + { + writer.WritePropertyName("authenticationScheme"u8); + writer.WriteStringValue(AuthenticationScheme.Value.ToString()); + } + if (Optional.IsDefined(SignedRequestScope)) + { + writer.WritePropertyName("signedRequestScope"u8); + writer.WriteStringValue(SignedRequestScope.Value.ToString()); + } + if (Optional.IsDefined(DisableCertificateAuthenticationFallback)) + { + writer.WritePropertyName("disableCertificateAuthenticationFallback"u8); + writer.WriteBooleanValue(DisableCertificateAuthenticationFallback.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TokenAuthConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TokenAuthConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTokenAuthConfiguration(document.RootElement, options); + } + + internal static TokenAuthConfiguration DeserializeTokenAuthConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderAuthenticationScheme? authenticationScheme = default; + SignedRequestScope? signedRequestScope = default; + bool? disableCertificateAuthenticationFallback = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authenticationScheme"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationScheme = new ProviderAuthenticationScheme(property.Value.GetString()); + continue; + } + if (property.NameEquals("signedRequestScope"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + signedRequestScope = new SignedRequestScope(property.Value.GetString()); + continue; + } + if (property.NameEquals("disableCertificateAuthenticationFallback"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableCertificateAuthenticationFallback = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TokenAuthConfiguration(authenticationScheme, signedRequestScope, disableCertificateAuthenticationFallback, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(TokenAuthConfiguration)} does not support writing '{options.Format}' format."); + } + } + + TokenAuthConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTokenAuthConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TokenAuthConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TokenAuthConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TokenAuthConfiguration.cs new file mode 100644 index 000000000000..f47a1d8ab9b1 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TokenAuthConfiguration.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ProviderHub.Models +{ + /// The TokenAuthConfiguration. + public partial class TokenAuthConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TokenAuthConfiguration() + { + } + + /// Initializes a new instance of . + /// The authentication scheme. + /// The signed request scope. + /// Whether certification authentication fallback is disabled. + /// Keeps track of any properties unknown to the library. + internal TokenAuthConfiguration(ProviderAuthenticationScheme? authenticationScheme, SignedRequestScope? signedRequestScope, bool? disableCertificateAuthenticationFallback, IDictionary serializedAdditionalRawData) + { + AuthenticationScheme = authenticationScheme; + SignedRequestScope = signedRequestScope; + DisableCertificateAuthenticationFallback = disableCertificateAuthenticationFallback; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The authentication scheme. + public ProviderAuthenticationScheme? AuthenticationScheme { get; set; } + /// The signed request scope. + public SignedRequestScope? SignedRequestScope { get; set; } + /// Whether certification authentication fallback is disabled. + public bool? DisableCertificateAuthenticationFallback { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionCategory.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionCategory.cs index 1414c0fa1510..1b90e94253d4 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionCategory.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionCategory.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The TrafficRegionCategory. + /// The next traffic region. public readonly partial struct TrafficRegionCategory : IEquatable { private readonly string _value; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionRolloutConfiguration.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionRolloutConfiguration.cs index 4c1bec592ce9..102deac0b665 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionRolloutConfiguration.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TrafficRegionRolloutConfiguration.cs @@ -22,13 +22,13 @@ public TrafficRegionRolloutConfiguration() /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - /// + /// The wait duration. internal TrafficRegionRolloutConfiguration(IList regions, IDictionary serializedAdditionalRawData, TimeSpan? waitDuration) : base(regions, serializedAdditionalRawData) { WaitDuration = waitDuration; } - /// Gets or sets the wait duration. + /// The wait duration. public TimeSpan? WaitDuration { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TypedErrorInfo.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TypedErrorInfo.cs index 51db52f2afd0..e7a61f93154b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TypedErrorInfo.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/Models/TypedErrorInfo.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ProviderHub.Models { - /// The TypedErrorInfo. + /// Error information. public partial class TypedErrorInfo { /// @@ -46,7 +46,7 @@ public partial class TypedErrorInfo private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// + /// The type of the error. /// is null. public TypedErrorInfo(string typedErrorInfoType) { @@ -56,8 +56,8 @@ public TypedErrorInfo(string typedErrorInfoType) } /// Initializes a new instance of . - /// - /// Any object. + /// The type of the error. + /// The error information. /// Keeps track of any properties unknown to the library. internal TypedErrorInfo(string typedErrorInfoType, BinaryData info, IDictionary serializedAdditionalRawData) { @@ -71,10 +71,10 @@ internal TypedErrorInfo() { } - /// Gets or sets the typed error info type. + /// The type of the error. public string TypedErrorInfoType { get; set; } /// - /// Any object + /// The error information. /// /// To assign an object to this property use . /// diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuCollection.cs index 44cf32871d11..d88881435947 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -120,7 +120,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string sku, Canc /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string sku, CancellationTo /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string sku, CancellationToken cancellationT /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.cs index b1d3ccb10edc..65cebd869cd6 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuCollection.cs index a038c4a0afcf..ccd9f09c8c69 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuCollection.cs @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Get(string sku, Can /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string sku, CancellationTo /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string sku, CancellationToken cancellationT /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.cs index b80fc4322b9f..02360799f1bc 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuCollection.cs index 20d3ef86f4c2..c359742e05e1 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuCollection.cs @@ -75,7 +75,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -126,7 +126,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual Response Get(string sku, Canc /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string sku, CancellationTo /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string sku, CancellationToken cancellationT /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.cs index 331d008edbc4..f7d9e944b82d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationCollection.cs index d890db397f60..2a9be702ed10 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string notificatio /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string notificationRegistr /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string notificationRegistrationName, Cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationData.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationData.cs index 59e0e681321c..2e17ec1b51a6 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationData.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationData.cs @@ -13,10 +13,7 @@ namespace Azure.ResourceManager.ProviderHub { - /// - /// A class representing the NotificationRegistration data model. - /// The notification registration definition. - /// + /// A class representing the NotificationRegistration data model. public partial class NotificationRegistrationData : ResourceData { /// diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.cs index fb4cba561e53..ea6b6996acc6 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationCollection.cs new file mode 100644 index 000000000000..8dbf4aaf017f --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationCollection.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ProviderHub +{ + /// + /// 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 GetProviderAuthorizedApplications method from an instance of . + /// + public partial class ProviderAuthorizedApplicationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics; + private readonly AuthorizedApplicationsRestOperations _providerAuthorizedApplicationAuthorizedApplicationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ProviderAuthorizedApplicationCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ProviderAuthorizedApplicationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ProviderAuthorizedApplicationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ProviderAuthorizedApplicationResource.ResourceType, out string providerAuthorizedApplicationAuthorizedApplicationsApiVersion); + _providerAuthorizedApplicationAuthorizedApplicationsRestClient = new AuthorizedApplicationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, providerAuthorizedApplicationAuthorizedApplicationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ProviderRegistrationResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ProviderRegistrationResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates the authorized application. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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 application ID. + /// The authorized application properties supplied to the CreateOrUpdate operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, Guid applicationId, ProviderAuthorizedApplicationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.Name, applicationId, data, cancellationToken).ConfigureAwait(false); + var operation = new ProviderHubArmOperation(new ProviderAuthorizedApplicationOperationSource(Client), _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics, Pipeline, _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Name, applicationId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the authorized application. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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 application ID. + /// The authorized application properties supplied to the CreateOrUpdate operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, Guid applicationId, ProviderAuthorizedApplicationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.Name, applicationId, data, cancellationToken); + var operation = new ProviderHubArmOperation(new ProviderAuthorizedApplicationOperationSource(Client), _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics, Pipeline, _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Name, applicationId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the authorized application details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + public virtual async Task> GetAsync(Guid applicationId, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.Get"); + scope.Start(); + try + { + var response = await _providerAuthorizedApplicationAuthorizedApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.Name, applicationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderAuthorizedApplicationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the authorized application details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + public virtual Response Get(Guid applicationId, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.Get"); + scope.Start(); + try + { + var response = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.Get(Id.SubscriptionId, Id.Name, applicationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderAuthorizedApplicationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of the authorized applications in the provider namespace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications + /// + /// + /// Operation Id + /// AuthorizedApplications_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateListRequest(Id.SubscriptionId, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProviderAuthorizedApplicationResource(Client, ProviderAuthorizedApplicationData.DeserializeProviderAuthorizedApplicationData(e)), _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics, Pipeline, "ProviderAuthorizedApplicationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of the authorized applications in the provider namespace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications + /// + /// + /// Operation Id + /// AuthorizedApplications_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateListRequest(Id.SubscriptionId, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProviderAuthorizedApplicationResource(Client, ProviderAuthorizedApplicationData.DeserializeProviderAuthorizedApplicationData(e)), _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics, Pipeline, "ProviderAuthorizedApplicationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(Guid applicationId, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.Exists"); + scope.Start(); + try + { + var response = await _providerAuthorizedApplicationAuthorizedApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.Name, applicationId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + public virtual Response Exists(Guid applicationId, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.Exists"); + scope.Start(); + try + { + var response = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.Get(Id.SubscriptionId, Id.Name, applicationId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(Guid applicationId, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _providerAuthorizedApplicationAuthorizedApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.Name, applicationId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProviderAuthorizedApplicationResource(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}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(Guid applicationId, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.Get(Id.SubscriptionId, Id.Name, applicationId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProviderAuthorizedApplicationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationData.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationData.Serialization.cs new file mode 100644 index 000000000000..59cf4766ebac --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationData.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + public partial class ProviderAuthorizedApplicationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ProviderAuthorizedApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderAuthorizedApplicationData(document.RootElement, options); + } + + internal static ProviderAuthorizedApplicationData DeserializeProviderAuthorizedApplicationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderAuthorizedApplicationProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ProviderAuthorizedApplicationProperties.DeserializeProviderAuthorizedApplicationProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerProviderHubContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderAuthorizedApplicationData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationData)} does not support writing '{options.Format}' format."); + } + } + + ProviderAuthorizedApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderAuthorizedApplicationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderAuthorizedApplicationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationData.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationData.cs new file mode 100644 index 000000000000..24bfd3030b73 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationData.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + /// A class representing the ProviderAuthorizedApplication data model. + public partial class ProviderAuthorizedApplicationData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProviderAuthorizedApplicationData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Keeps track of any properties unknown to the library. + internal ProviderAuthorizedApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProviderAuthorizedApplicationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the properties. + public ProviderAuthorizedApplicationProperties Properties { get; set; } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationResource.Serialization.cs new file mode 100644 index 000000000000..327242b3e827 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ProviderHub +{ + public partial class ProviderAuthorizedApplicationResource : IJsonModel + { + private static ProviderAuthorizedApplicationData s_dataDeserializationInstance; + private static ProviderAuthorizedApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ProviderAuthorizedApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); + + ProviderAuthorizedApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationResource.cs new file mode 100644 index 000000000000..e163bb589ee4 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderAuthorizedApplicationResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ProviderHub +{ + /// + /// A Class representing a ProviderAuthorizedApplication 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 GetProviderAuthorizedApplicationResource method. + /// Otherwise you can get one from its parent resource using the GetProviderAuthorizedApplication method. + /// + public partial class ProviderAuthorizedApplicationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The providerNamespace. + /// The applicationId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, Guid applicationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics; + private readonly AuthorizedApplicationsRestOperations _providerAuthorizedApplicationAuthorizedApplicationsRestClient; + private readonly ProviderAuthorizedApplicationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ProviderHub/providerRegistrations/authorizedApplications"; + + /// Initializes a new instance of the class for mocking. + protected ProviderAuthorizedApplicationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ProviderAuthorizedApplicationResource(ArmClient client, ProviderAuthorizedApplicationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ProviderAuthorizedApplicationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string providerAuthorizedApplicationAuthorizedApplicationsApiVersion); + _providerAuthorizedApplicationAuthorizedApplicationsRestClient = new AuthorizedApplicationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, providerAuthorizedApplicationAuthorizedApplicationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ProviderAuthorizedApplicationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the authorized application details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationResource.Get"); + scope.Start(); + try + { + var response = await _providerAuthorizedApplicationAuthorizedApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderAuthorizedApplicationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the authorized application details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationResource.Get"); + scope.Start(); + try + { + var response = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.Get(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderAuthorizedApplicationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an authorized application. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationResource.Delete"); + scope.Start(); + try + { + var response = await _providerAuthorizedApplicationAuthorizedApplicationsRestClient.DeleteAsync(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), cancellationToken).ConfigureAwait(false); + var uri = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name)); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an authorized application. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationResource.Delete"); + scope.Start(); + try + { + var response = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.Delete(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), cancellationToken); + var uri = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name)); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the authorized application. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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 authorized application properties supplied to the CreateOrUpdate operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ProviderAuthorizedApplicationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationResource.Update"); + scope.Start(); + try + { + var response = await _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), data, cancellationToken).ConfigureAwait(false); + var operation = new ProviderHubArmOperation(new ProviderAuthorizedApplicationOperationSource(Client), _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics, Pipeline, _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the authorized application. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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 authorized application properties supplied to the CreateOrUpdate operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ProviderAuthorizedApplicationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics.CreateScope("ProviderAuthorizedApplicationResource.Update"); + scope.Start(); + try + { + var response = _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), data, cancellationToken); + var operation = new ProviderHubArmOperation(new ProviderAuthorizedApplicationOperationSource(Client), _providerAuthorizedApplicationAuthorizedApplicationsClientDiagnostics, Pipeline, _providerAuthorizedApplicationAuthorizedApplicationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.Parent.Name, Guid.Parse(Id.Name), data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingCollection.cs new file mode 100644 index 000000000000..d63a1dbd6bf7 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ProviderHub +{ + /// + /// 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 GetProviderMonitorSettings method from an instance of . + /// + public partial class ProviderMonitorSettingCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _providerMonitorSettingClientDiagnostics; + private readonly ProviderMonitorSettingsRestOperations _providerMonitorSettingRestClient; + + /// Initializes a new instance of the class for mocking. + protected ProviderMonitorSettingCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ProviderMonitorSettingCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _providerMonitorSettingClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ProviderMonitorSettingResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ProviderMonitorSettingResource.ResourceType, out string providerMonitorSettingApiVersion); + _providerMonitorSettingRestClient = new ProviderMonitorSettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, providerMonitorSettingApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates the provider monitor setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the provider monitor setting. + /// The provider monitor setting properties supplied to the create operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string providerMonitorSettingName, ProviderMonitorSettingData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _providerMonitorSettingRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, data, cancellationToken).ConfigureAwait(false); + var operation = new ProviderHubArmOperation(new ProviderMonitorSettingOperationSource(Client), _providerMonitorSettingClientDiagnostics, Pipeline, _providerMonitorSettingRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the provider monitor setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the provider monitor setting. + /// The provider monitor setting properties supplied to the create operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string providerMonitorSettingName, ProviderMonitorSettingData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _providerMonitorSettingRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, data, cancellationToken); + var operation = new ProviderHubArmOperation(new ProviderMonitorSettingOperationSource(Client), _providerMonitorSettingClientDiagnostics, Pipeline, _providerMonitorSettingRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.Get"); + scope.Start(); + try + { + var response = await _providerMonitorSettingRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderMonitorSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.Get"); + scope.Start(); + try + { + var response = _providerMonitorSettingRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderMonitorSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of the provider monitor settings in the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings + /// + /// + /// Operation Id + /// ProviderMonitorSettings_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _providerMonitorSettingRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _providerMonitorSettingRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProviderMonitorSettingResource(Client, ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(e)), _providerMonitorSettingClientDiagnostics, Pipeline, "ProviderMonitorSettingCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of the provider monitor settings in the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings + /// + /// + /// Operation Id + /// ProviderMonitorSettings_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _providerMonitorSettingRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _providerMonitorSettingRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProviderMonitorSettingResource(Client, ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(e)), _providerMonitorSettingClientDiagnostics, Pipeline, "ProviderMonitorSettingCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.Exists"); + scope.Start(); + try + { + var response = await _providerMonitorSettingRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.Exists"); + scope.Start(); + try + { + var response = _providerMonitorSettingRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _providerMonitorSettingRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProviderMonitorSettingResource(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.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingCollection.GetIfExists"); + scope.Start(); + try + { + var response = _providerMonitorSettingRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, providerMonitorSettingName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProviderMonitorSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingData.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingData.Serialization.cs new file mode 100644 index 000000000000..abf74caab05b --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingData.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + public partial class ProviderMonitorSettingData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderMonitorSettingData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ProviderMonitorSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProviderMonitorSettingData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProviderMonitorSettingData(document.RootElement, options); + } + + internal static ProviderMonitorSettingData DeserializeProviderMonitorSettingData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProviderMonitorSettingProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ProviderMonitorSettingProperties.DeserializeProviderMonitorSettingProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerProviderHubContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProviderMonitorSettingData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerProviderHubContext.Default); + default: + throw new FormatException($"The model {nameof(ProviderMonitorSettingData)} does not support writing '{options.Format}' format."); + } + } + + ProviderMonitorSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProviderMonitorSettingData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProviderMonitorSettingData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingData.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingData.cs new file mode 100644 index 000000000000..ff7475fcb80a --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingData.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + /// A class representing the ProviderMonitorSetting data model. + public partial class ProviderMonitorSettingData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ProviderMonitorSettingData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// Keeps track of any properties unknown to the library. + internal ProviderMonitorSettingData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProviderMonitorSettingProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProviderMonitorSettingData() + { + } + + /// Gets or sets the properties. + internal ProviderMonitorSettingProperties Properties { get; set; } + /// The provisioning state. + public ProviderHubProvisioningState? ProviderMonitorSettingProvisioningState + { + get => Properties is null ? default : Properties.ProvisioningState; + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingResource.Serialization.cs new file mode 100644 index 000000000000..214a98f58102 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ProviderHub +{ + public partial class ProviderMonitorSettingResource : IJsonModel + { + private static ProviderMonitorSettingData s_dataDeserializationInstance; + private static ProviderMonitorSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ProviderMonitorSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); + + ProviderMonitorSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingResource.cs new file mode 100644 index 000000000000..d8f59d924364 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderMonitorSettingResource.cs @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ProviderHub +{ + /// + /// A Class representing a ProviderMonitorSetting 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 GetProviderMonitorSettingResource method. + /// Otherwise you can get one from its parent resource using the GetProviderMonitorSetting method. + /// + public partial class ProviderMonitorSettingResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The providerMonitorSettingName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _providerMonitorSettingClientDiagnostics; + private readonly ProviderMonitorSettingsRestOperations _providerMonitorSettingRestClient; + private readonly ProviderMonitorSettingData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ProviderHub/providerMonitorSettings"; + + /// Initializes a new instance of the class for mocking. + protected ProviderMonitorSettingResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ProviderMonitorSettingResource(ArmClient client, ProviderMonitorSettingData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ProviderMonitorSettingResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _providerMonitorSettingClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string providerMonitorSettingApiVersion); + _providerMonitorSettingRestClient = new ProviderMonitorSettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, providerMonitorSettingApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ProviderMonitorSettingData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingResource.Get"); + scope.Start(); + try + { + var response = await _providerMonitorSettingRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderMonitorSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the provider monitor setting details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingResource.Get"); + scope.Start(); + try + { + var response = _providerMonitorSettingRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProviderMonitorSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a provider monitor setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingResource.Delete"); + scope.Start(); + try + { + var response = await _providerMonitorSettingRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _providerMonitorSettingRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a provider monitor setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingResource.Delete"); + scope.Start(); + try + { + var response = _providerMonitorSettingRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var uri = _providerMonitorSettingRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the provider monitor setting properties as specified in the request body. Update fails if the specified provider monitor setting does not already exist. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> UpdateAsync(CancellationToken cancellationToken = default) + { + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingResource.Update"); + scope.Start(); + try + { + var response = await _providerMonitorSettingRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ProviderMonitorSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the provider monitor setting properties as specified in the request body. Update fails if the specified provider monitor setting does not already exist. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName} + /// + /// + /// Operation Id + /// ProviderMonitorSettings_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Update(CancellationToken cancellationToken = default) + { + using var scope = _providerMonitorSettingClientDiagnostics.CreateScope("ProviderMonitorSettingResource.Update"); + scope.Start(); + try + { + var response = _providerMonitorSettingRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ProviderMonitorSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationCollection.cs index f05dd824a06e..4ab238e45750 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string providerNamespa /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string providerNamespace, /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string providerNamespace, CancellationToken /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.Serialization.cs index 9263f1b7a7be..2949af9a943d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.Serialization.cs @@ -43,6 +43,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } } ProviderRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -66,6 +71,7 @@ internal static ProviderRegistrationData DeserializeProviderRegistrationData(Jso return null; } ProviderRegistrationProperties properties = default; + ProviderRegistrationKind? kind = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -83,6 +89,15 @@ internal static ProviderRegistrationData DeserializeProviderRegistrationData(Jso properties = ProviderRegistrationProperties.DeserializeProviderRegistrationProperties(property.Value, options); continue; } + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new ProviderRegistrationKind(property.Value.GetString()); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -119,6 +134,7 @@ internal static ProviderRegistrationData DeserializeProviderRegistrationData(Jso type, systemData, properties, + kind, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.cs index d10353f2d443..a1a12cee60e4 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationData.cs @@ -59,14 +59,18 @@ public ProviderRegistrationData() /// The resourceType. /// The systemData. /// + /// Provider registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. /// Keeps track of any properties unknown to the library. - internal ProviderRegistrationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProviderRegistrationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ProviderRegistrationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProviderRegistrationProperties properties, ProviderRegistrationKind? kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; + Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets or sets the properties. public ProviderRegistrationProperties Properties { get; set; } + /// Provider registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. + public ProviderRegistrationKind? Kind { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.cs index 5753496616d8..dadebab9311d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.cs @@ -37,6 +37,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ProviderRegistrationsRestOperations _providerRegistrationRestClient; private readonly ClientDiagnostics _defaultClientDiagnostics; private readonly ProviderHubRestOperations _defaultRestClient; + private readonly ClientDiagnostics _resourceActionsClientDiagnostics; + private readonly ResourceActionsRestOperations _resourceActionsRestClient; + private readonly ClientDiagnostics _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics; + private readonly NewRegionFrontloadReleaseRestOperations _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient; private readonly ProviderRegistrationData _data; /// Gets the resource type for the operations. @@ -66,6 +70,11 @@ internal ProviderRegistrationResource(ArmClient client, ResourceIdentifier id) : _providerRegistrationRestClient = new ProviderRegistrationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, providerRegistrationApiVersion); _defaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ProviderConstants.DefaultProviderNamespace, Diagnostics); _defaultRestClient = new ProviderHubRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _resourceActionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _resourceActionsRestClient = new ResourceActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", RegistrationNewRegionFrontloadReleaseResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(RegistrationNewRegionFrontloadReleaseResource.ResourceType, out string registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseApiVersion); + _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient = new NewRegionFrontloadReleaseRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -112,7 +121,7 @@ public virtual CustomRolloutCollection GetCustomRollouts() /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -143,7 +152,7 @@ public virtual async Task> GetCustomRolloutAsync /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -181,7 +190,7 @@ public virtual DefaultRolloutCollection GetDefaultRollouts() /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -212,7 +221,7 @@ public virtual async Task> GetDefaultRolloutAsy /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -230,6 +239,75 @@ public virtual Response GetDefaultRollout(string rollout return GetDefaultRollouts().Get(rolloutName, cancellationToken); } + /// Gets a collection of RegistrationNewRegionFrontloadReleaseResources in the ProviderRegistration. + /// An object representing collection of RegistrationNewRegionFrontloadReleaseResources and their operations over a RegistrationNewRegionFrontloadReleaseResource. + public virtual RegistrationNewRegionFrontloadReleaseCollection GetRegistrationNewRegionFrontloadReleases() + { + return GetCachedClient(client => new RegistrationNewRegionFrontloadReleaseCollection(client, Id)); + } + + /// + /// Gets a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetRegistrationNewRegionFrontloadReleaseAsync(string releaseName, CancellationToken cancellationToken = default) + { + return await GetRegistrationNewRegionFrontloadReleases().GetAsync(releaseName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetRegistrationNewRegionFrontloadRelease(string releaseName, CancellationToken cancellationToken = default) + { + return GetRegistrationNewRegionFrontloadReleases().Get(releaseName, cancellationToken); + } + /// Gets a collection of NotificationRegistrationResources in the ProviderRegistration. /// An object representing collection of NotificationRegistrationResources and their operations over a NotificationRegistrationResource. public virtual NotificationRegistrationCollection GetNotificationRegistrations() @@ -250,7 +328,7 @@ public virtual NotificationRegistrationCollection GetNotificationRegistrations() /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -281,7 +359,7 @@ public virtual async Task> GetNotific /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -319,7 +397,7 @@ public virtual ResourceTypeRegistrationCollection GetResourceTypeRegistrations() /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -350,7 +428,7 @@ public virtual async Task> GetResourc /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -368,6 +446,71 @@ public virtual Response GetResourceTypeRegistr return GetResourceTypeRegistrations().Get(resourceType, cancellationToken); } + /// Gets a collection of ProviderAuthorizedApplicationResources in the ProviderRegistration. + /// An object representing collection of ProviderAuthorizedApplicationResources and their operations over a ProviderAuthorizedApplicationResource. + public virtual ProviderAuthorizedApplicationCollection GetProviderAuthorizedApplications() + { + return GetCachedClient(client => new ProviderAuthorizedApplicationCollection(client, Id)); + } + + /// + /// Gets the authorized application details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetProviderAuthorizedApplicationAsync(Guid applicationId, CancellationToken cancellationToken = default) + { + return await GetProviderAuthorizedApplications().GetAsync(applicationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the authorized application details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId} + /// + /// + /// Operation Id + /// AuthorizedApplications_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The application ID. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetProviderAuthorizedApplication(Guid applicationId, CancellationToken cancellationToken = default) + { + return GetProviderAuthorizedApplications().Get(applicationId, cancellationToken); + } + /// /// Gets the provider registration details. /// @@ -381,7 +524,7 @@ public virtual Response GetResourceTypeRegistr /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -421,7 +564,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -461,7 +604,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -505,7 +648,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -549,7 +692,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -595,7 +738,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -641,7 +784,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// @@ -675,7 +818,7 @@ public virtual async Task> GenerateManifestAs /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// @@ -709,7 +852,7 @@ public virtual Response GenerateManifest(CancellationT /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// @@ -747,7 +890,7 @@ public virtual async Task> CheckinManifestAsync(Ch /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// @@ -771,5 +914,179 @@ public virtual Response CheckinManifest(CheckinManifestCont throw; } } + + /// + /// Deletes resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourceActions/{resourceActionName}/deleteResources + /// + /// + /// Operation Id + /// ResourceActions_DeleteResources + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// 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 action name. + /// The properties supplied to the DeleteResources operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task DeleteResourcesResourceActionAsync(WaitUntil waitUntil, string resourceActionName, ResourceManagementAction properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resourceActionName, nameof(resourceActionName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _resourceActionsClientDiagnostics.CreateScope("ProviderRegistrationResource.DeleteResourcesResourceAction"); + scope.Start(); + try + { + var response = await _resourceActionsRestClient.DeleteResourcesAsync(Id.SubscriptionId, Id.Name, resourceActionName, properties, cancellationToken).ConfigureAwait(false); + var operation = new ProviderHubArmOperation(_resourceActionsClientDiagnostics, Pipeline, _resourceActionsRestClient.CreateDeleteResourcesRequest(Id.SubscriptionId, Id.Name, resourceActionName, properties).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourceActions/{resourceActionName}/deleteResources + /// + /// + /// Operation Id + /// ResourceActions_DeleteResources + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// 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 action name. + /// The properties supplied to the DeleteResources operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation DeleteResourcesResourceAction(WaitUntil waitUntil, string resourceActionName, ResourceManagementAction properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resourceActionName, nameof(resourceActionName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _resourceActionsClientDiagnostics.CreateScope("ProviderRegistrationResource.DeleteResourcesResourceAction"); + scope.Start(); + try + { + var response = _resourceActionsRestClient.DeleteResources(Id.SubscriptionId, Id.Name, resourceActionName, properties, cancellationToken); + var operation = new ProviderHubArmOperation(_resourceActionsClientDiagnostics, Pipeline, _resourceActionsRestClient.CreateDeleteResourcesRequest(Id.SubscriptionId, Id.Name, resourceActionName, properties).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generates the new region frontload manifest. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/generateNewRegionFrontloadManifest + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_GenerateManifest + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> GenerateManifestNewRegionFrontloadReleaseAsync(ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("ProviderRegistrationResource.GenerateManifestNewRegionFrontloadRelease"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.GenerateManifestAsync(Id.SubscriptionId, Id.Name, properties, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generates the new region frontload manifest. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/generateNewRegionFrontloadManifest + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_GenerateManifest + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual Response GenerateManifestNewRegionFrontloadRelease(ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("ProviderRegistrationResource.GenerateManifestNewRegionFrontloadRelease"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.GenerateManifest(Id.SubscriptionId, Id.Name, properties, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseCollection.cs new file mode 100644 index 000000000000..514b1b665fc3 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseCollection.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + /// + /// 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 GetRegistrationNewRegionFrontloadReleases method from an instance of . + /// + public partial class RegistrationNewRegionFrontloadReleaseCollection : ArmCollection + { + private readonly ClientDiagnostics _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics; + private readonly NewRegionFrontloadReleaseRestOperations _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient; + + /// Initializes a new instance of the class for mocking. + protected RegistrationNewRegionFrontloadReleaseCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal RegistrationNewRegionFrontloadReleaseCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", RegistrationNewRegionFrontloadReleaseResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(RegistrationNewRegionFrontloadReleaseResource.ResourceType, out string registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseApiVersion); + _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient = new NewRegionFrontloadReleaseRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ProviderRegistrationResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ProviderRegistrationResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the release. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string releaseName, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.Name, releaseName, properties, cancellationToken).ConfigureAwait(false); + var uri = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Name, releaseName, properties); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the release. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string releaseName, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateOrUpdate(Id.SubscriptionId, Id.Name, releaseName, properties, cancellationToken); + var uri = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Name, releaseName, properties); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.Get"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.GetAsync(Id.SubscriptionId, Id.Name, releaseName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.Get"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.Get(Id.SubscriptionId, Id.Name, releaseName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.Exists"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.GetAsync(Id.SubscriptionId, Id.Name, releaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.Exists"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.Get(Id.SubscriptionId, Id.Name, releaseName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.GetAsync(Id.SubscriptionId, Id.Name, releaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(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}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the release. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.Get(Id.SubscriptionId, Id.Name, releaseName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseResource.Serialization.cs new file mode 100644 index 000000000000..9832cbefb886 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ProviderHub +{ + public partial class RegistrationNewRegionFrontloadReleaseResource : IJsonModel + { + private static DefaultRolloutData s_dataDeserializationInstance; + private static DefaultRolloutData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DefaultRolloutData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); + + DefaultRolloutData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseResource.cs new file mode 100644 index 000000000000..09cd91c4e34c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RegistrationNewRegionFrontloadReleaseResource.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + /// + /// A Class representing a RegistrationNewRegionFrontloadRelease 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 GetRegistrationNewRegionFrontloadReleaseResource method. + /// Otherwise you can get one from its parent resource using the GetRegistrationNewRegionFrontloadRelease method. + /// + public partial class RegistrationNewRegionFrontloadReleaseResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The providerNamespace. + /// The releaseName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string providerNamespace, string releaseName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics; + private readonly NewRegionFrontloadReleaseRestOperations _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient; + private readonly DefaultRolloutData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ProviderHub/providerRegistrations/newRegionFrontloadRelease"; + + /// Initializes a new instance of the class for mocking. + protected RegistrationNewRegionFrontloadReleaseResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal RegistrationNewRegionFrontloadReleaseResource(ArmClient client, DefaultRolloutData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal RegistrationNewRegionFrontloadReleaseResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ProviderHub", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseApiVersion); + _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient = new NewRegionFrontloadReleaseRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DefaultRolloutData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseResource.Get"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.GetAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseResource.Get"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.Get(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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 to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseResource.Update"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, properties, cancellationToken).ConfigureAwait(false); + var uri = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name, properties); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName} + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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 to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseResource.Update"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateOrUpdate(Id.SubscriptionId, Id.Parent.Name, Id.Name, properties, cancellationToken); + var uri = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name, properties); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ProviderHubArmOperation(Response.FromValue(new RegistrationNewRegionFrontloadReleaseResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}/stop + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task StopAsync(CancellationToken cancellationToken = default) + { + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseResource.Stop"); + scope.Start(); + try + { + var response = await _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.StopAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a new region frontload release. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}/stop + /// + /// + /// Operation Id + /// NewRegionFrontloadRelease_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Stop(CancellationToken cancellationToken = default) + { + using var scope = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseClientDiagnostics.CreateScope("RegistrationNewRegionFrontloadReleaseResource.Stop"); + scope.Start(); + try + { + var response = _registrationNewRegionFrontloadReleaseNewRegionFrontloadReleaseRestClient.Stop(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationCollection.cs index 620b46d29921..f6085fc380c2 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string resourceTyp /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string resourceType, Cance /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string resourceType, CancellationToken canc /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.Serialization.cs index 6990db2307e0..e6f82019b86d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.Serialization.cs @@ -43,6 +43,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } } ResourceTypeRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -66,6 +71,7 @@ internal static ResourceTypeRegistrationData DeserializeResourceTypeRegistration return null; } ResourceTypeRegistrationProperties properties = default; + ResourceTypeRegistrationKind? kind = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -83,6 +89,15 @@ internal static ResourceTypeRegistrationData DeserializeResourceTypeRegistration properties = ResourceTypeRegistrationProperties.DeserializeResourceTypeRegistrationProperties(property.Value, options); continue; } + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new ResourceTypeRegistrationKind(property.Value.GetString()); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -119,6 +134,7 @@ internal static ResourceTypeRegistrationData DeserializeResourceTypeRegistration type, systemData, properties, + kind, serializedAdditionalRawData); } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.cs index 7d0783780314..443bb73dc20c 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationData.cs @@ -59,14 +59,18 @@ public ResourceTypeRegistrationData() /// The resourceType. /// The systemData. /// + /// Resource type registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. /// Keeps track of any properties unknown to the library. - internal ResourceTypeRegistrationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceTypeRegistrationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ResourceTypeRegistrationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceTypeRegistrationProperties properties, ResourceTypeRegistrationKind? kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; + Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets or sets the properties. public ResourceTypeRegistrationProperties Properties { get; set; } + /// Resource type registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for resources of the same type. + public ResourceTypeRegistrationKind? Kind { get; set; } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.cs index 7ff205a5a68f..82664f9ff2a0 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.cs @@ -107,7 +107,7 @@ public virtual ResourceTypeSkuCollection GetResourceTypeSkus() /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -138,7 +138,7 @@ public virtual async Task> GetResourceTypeSkuA /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual NestedResourceTypeFirstSkuCollection GetNestedResourceTypeFirstSk /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetNeste /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual NestedResourceTypeSecondSkuCollection GetNestedResourceTypeSecond /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual async Task> GetNest /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -332,7 +332,7 @@ public virtual NestedResourceTypeThirdSkuCollection GetNestedResourceTypeThirdSk /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> GetNeste /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response GetNestedResourceTyp /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -440,7 +440,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -497,9 +497,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _resourceTypeRegistrationRestClient.DeleteAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _resourceTypeRegistrationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ProviderHubArmOperation(response, rehydrationToken); + var operation = new ProviderHubArmOperation(_resourceTypeRegistrationClientDiagnostics, Pipeline, _resourceTypeRegistrationRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -524,7 +522,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -541,9 +539,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _resourceTypeRegistrationRestClient.Delete(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); - var uri = _resourceTypeRegistrationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ProviderHubArmOperation(response, rehydrationToken); + var operation = new ProviderHubArmOperation(_resourceTypeRegistrationClientDiagnostics, Pipeline, _resourceTypeRegistrationRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -568,7 +564,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -614,7 +610,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuCollection.cs index 015c9d008cea..c0ac198d8ba5 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string sku /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string sku, CancellationTok /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string sku, CancellationTo /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string sku, CancellationToken cancellationT /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.cs index a7a012aee72c..bbc6bc131f2b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2020-11-20 + /// 2024-09-01 /// /// /// Resource diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/AuthorizedApplicationsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/AuthorizedApplicationsRestOperations.cs new file mode 100644 index 000000000000..35e37d6ece42 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/AuthorizedApplicationsRestOperations.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + internal partial class AuthorizedApplicationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizedApplicationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizedApplicationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string providerNamespace, Guid applicationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications/", false); + uri.AppendPath(applicationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string providerNamespace, Guid applicationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications/", false); + uri.AppendPath(applicationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the authorized application details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The application ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string providerNamespace, Guid applicationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateGetRequest(subscriptionId, providerNamespace, applicationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProviderAuthorizedApplicationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProviderAuthorizedApplicationData.DeserializeProviderAuthorizedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProviderAuthorizedApplicationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the authorized application details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The application ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string providerNamespace, Guid applicationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateGetRequest(subscriptionId, providerNamespace, applicationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProviderAuthorizedApplicationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProviderAuthorizedApplicationData.DeserializeProviderAuthorizedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProviderAuthorizedApplicationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string providerNamespace, Guid applicationId, ProviderAuthorizedApplicationData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications/", false); + uri.AppendPath(applicationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string providerNamespace, Guid applicationId, ProviderAuthorizedApplicationData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications/", false); + uri.AppendPath(applicationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates the authorized application. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The application ID. + /// The authorized application properties supplied to the CreateOrUpdate operation. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string providerNamespace, Guid applicationId, ProviderAuthorizedApplicationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, providerNamespace, applicationId, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates the authorized application. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The application ID. + /// The authorized application properties supplied to the CreateOrUpdate operation. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string providerNamespace, Guid applicationId, ProviderAuthorizedApplicationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, providerNamespace, applicationId, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string providerNamespace, Guid applicationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications/", false); + uri.AppendPath(applicationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string providerNamespace, Guid applicationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications/", false); + uri.AppendPath(applicationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes an authorized application. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The application ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string providerNamespace, Guid applicationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateDeleteRequest(subscriptionId, providerNamespace, applicationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes an authorized application. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The application ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string providerNamespace, Guid applicationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateDeleteRequest(subscriptionId, providerNamespace, applicationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string providerNamespace) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string providerNamespace) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/authorizedApplications", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of the authorized applications in the provider namespace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string providerNamespace, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateListRequest(subscriptionId, providerNamespace); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizedApplicationArrayResponseWithContinuation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AuthorizedApplicationArrayResponseWithContinuation.DeserializeAuthorizedApplicationArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of the authorized applications in the provider namespace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string providerNamespace, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateListRequest(subscriptionId, providerNamespace); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizedApplicationArrayResponseWithContinuation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AuthorizedApplicationArrayResponseWithContinuation.DeserializeAuthorizedApplicationArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string providerNamespace) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string providerNamespace) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of the authorized applications in the provider namespace. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string providerNamespace, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, providerNamespace); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizedApplicationArrayResponseWithContinuation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AuthorizedApplicationArrayResponseWithContinuation.DeserializeAuthorizedApplicationArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of the authorized applications in the provider namespace. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string providerNamespace, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, providerNamespace); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizedApplicationArrayResponseWithContinuation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AuthorizedApplicationArrayResponseWithContinuation.DeserializeAuthorizedApplicationArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/CustomRolloutsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/CustomRolloutsRestOperations.cs index 43f42cb69e2c..7bd5a715a101 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/CustomRolloutsRestOperations.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/CustomRolloutsRestOperations.cs @@ -32,7 +32,7 @@ public CustomRolloutsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-20"; + _apiVersion = apiVersion ?? "2024-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,7 +71,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string providerName } /// Gets the custom rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the custom rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -132,6 +132,90 @@ public Response Get(string subscriptionId, string providerNam } } + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string providerNamespace, string rolloutName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/customRollouts/", false); + uri.AppendPath(rolloutName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string providerNamespace, string rolloutName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/customRollouts/", false); + uri.AppendPath(rolloutName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the custom rollout resource. Custom rollout must be in terminal state. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The rollout name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string providerNamespace, string rolloutName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); + + using var message = CreateDeleteRequest(subscriptionId, providerNamespace, rolloutName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the custom rollout resource. Custom rollout must be in terminal state. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The rollout name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string providerNamespace, string rolloutName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); + + using var message = CreateDeleteRequest(subscriptionId, providerNamespace, rolloutName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string providerNamespace, string rolloutName, CustomRolloutData data) { var uri = new RawRequestUriBuilder(); @@ -171,14 +255,14 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string p } /// Creates or updates the rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The custom rollout properties supplied to the CreateOrUpdate operation. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string providerNamespace, string rolloutName, CustomRolloutData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string providerNamespace, string rolloutName, CustomRolloutData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); @@ -190,26 +274,22 @@ public async Task> CreateOrUpdateAsync(string subscr switch (message.Response.Status) { case 200: - { - CustomRolloutData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = CustomRolloutData.DeserializeCustomRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } /// Creates or updates the rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The custom rollout properties supplied to the CreateOrUpdate operation. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string providerNamespace, string rolloutName, CustomRolloutData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string providerNamespace, string rolloutName, CustomRolloutData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); @@ -221,12 +301,8 @@ public Response CreateOrUpdate(string subscriptionId, string switch (message.Response.Status) { case 200: - { - CustomRolloutData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = CustomRolloutData.DeserializeCustomRolloutData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -265,7 +341,7 @@ internal HttpMessage CreateListByProviderRegistrationRequest(string subscription } /// Gets the list of the custom rollouts for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -292,7 +368,7 @@ public async Task> ListByProviderRegistrationA } /// Gets the list of the custom rollouts for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -318,6 +394,90 @@ public Response ListByProviderRegistration(string subsc } } + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string providerNamespace, string rolloutName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/customRollouts/", false); + uri.AppendPath(rolloutName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string providerNamespace, string rolloutName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/customRollouts/", false); + uri.AppendPath(rolloutName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Stops or cancels the custom rollout, if in progress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The rollout name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string providerNamespace, string rolloutName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); + + using var message = CreateStopRequest(subscriptionId, providerNamespace, rolloutName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops or cancels the custom rollout, if in progress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The rollout name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string providerNamespace, string rolloutName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(rolloutName, nameof(rolloutName)); + + using var message = CreateStopRequest(subscriptionId, providerNamespace, rolloutName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByProviderRegistrationNextPageRequestUri(string nextLink, string subscriptionId, string providerNamespace) { var uri = new RawRequestUriBuilder(); @@ -342,7 +502,7 @@ internal HttpMessage CreateListByProviderRegistrationNextPageRequest(string next /// Gets the list of the custom rollouts for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. @@ -371,7 +531,7 @@ public async Task> ListByProviderRegistrationN /// Gets the list of the custom rollouts for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/DefaultRolloutsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/DefaultRolloutsRestOperations.cs index 49a524a69c1a..a5ec96dcef28 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/DefaultRolloutsRestOperations.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/DefaultRolloutsRestOperations.cs @@ -32,7 +32,7 @@ public DefaultRolloutsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-20"; + _apiVersion = apiVersion ?? "2024-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,7 +71,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string providerName } /// Gets the default rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> GetAsync(string subscriptionId, } /// Gets the default rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -167,7 +167,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string providerN } /// Deletes the rollout resource. Rollout must be in terminal state. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -192,7 +192,7 @@ public async Task DeleteAsync(string subscriptionId, string providerNa } /// Deletes the rollout resource. Rollout must be in terminal state. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -255,7 +255,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string p } /// Creates or updates the rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The Default rollout properties supplied to the CreateOrUpdate operation. @@ -282,7 +282,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string pr } /// Creates or updates the rollout details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The Default rollout properties supplied to the CreateOrUpdate operation. @@ -341,7 +341,7 @@ internal HttpMessage CreateListByProviderRegistrationRequest(string subscription } /// Gets the list of the rollouts for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -368,7 +368,7 @@ public async Task> ListByProviderRegistration } /// Gets the list of the rollouts for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -431,7 +431,7 @@ internal HttpMessage CreateStopRequest(string subscriptionId, string providerNam } /// Stops or cancels the rollout, if in progress. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -455,7 +455,7 @@ public async Task StopAsync(string subscriptionId, string providerName } /// Stops or cancels the rollout, if in progress. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The rollout name. /// The cancellation token to use. @@ -502,7 +502,7 @@ internal HttpMessage CreateListByProviderRegistrationNextPageRequest(string next /// Gets the list of the rollouts for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. @@ -531,7 +531,7 @@ public async Task> ListByProviderRegistration /// Gets the list of the rollouts for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/NewRegionFrontloadReleaseRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/NewRegionFrontloadReleaseRestOperations.cs new file mode 100644 index 000000000000..b78f195cea76 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/NewRegionFrontloadReleaseRestOperations.cs @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + internal partial class NewRegionFrontloadReleaseRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NewRegionFrontloadReleaseRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public NewRegionFrontloadReleaseRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGenerateManifestRequestUri(string subscriptionId, string providerNamespace, ProviderFrontloadPayload properties) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/generateNewRegionFrontloadManifest", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGenerateManifestRequest(string subscriptionId, string providerNamespace, ProviderFrontloadPayload properties) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/generateNewRegionFrontloadManifest", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(properties, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generates the new region frontload manifest. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The to use. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GenerateManifestAsync(string subscriptionId, string providerNamespace, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateGenerateManifestRequest(subscriptionId, providerNamespace, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceProviderManifest value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ResourceProviderManifest.DeserializeResourceProviderManifest(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generates the new region frontload manifest. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The to use. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GenerateManifest(string subscriptionId, string providerNamespace, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateGenerateManifestRequest(subscriptionId, providerNamespace, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceProviderManifest value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ResourceProviderManifest.DeserializeResourceProviderManifest(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string providerNamespace, string releaseName, ProviderFrontloadPayload properties) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/newRegionFrontloadRelease/", false); + uri.AppendPath(releaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string providerNamespace, string releaseName, ProviderFrontloadPayload properties) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/newRegionFrontloadRelease/", false); + uri.AppendPath(releaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(properties, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a new region frontload release. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The name of the release. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string providerNamespace, string releaseName, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, providerNamespace, releaseName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DefaultRolloutData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DefaultRolloutData.DeserializeDefaultRolloutData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a new region frontload release. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The name of the release. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string providerNamespace, string releaseName, ProviderFrontloadPayload properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, providerNamespace, releaseName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DefaultRolloutData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DefaultRolloutData.DeserializeDefaultRolloutData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string providerNamespace, string releaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/newRegionFrontloadRelease/", false); + uri.AppendPath(releaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string providerNamespace, string releaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/newRegionFrontloadRelease/", false); + uri.AppendPath(releaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a new region frontload release. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The name of the release. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string providerNamespace, string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var message = CreateGetRequest(subscriptionId, providerNamespace, releaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DefaultRolloutData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DefaultRolloutData.DeserializeDefaultRolloutData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DefaultRolloutData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a new region frontload release. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The name of the release. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string providerNamespace, string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var message = CreateGetRequest(subscriptionId, providerNamespace, releaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DefaultRolloutData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DefaultRolloutData.DeserializeDefaultRolloutData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DefaultRolloutData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string providerNamespace, string releaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/newRegionFrontloadRelease/", false); + uri.AppendPath(releaseName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string providerNamespace, string releaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/newRegionFrontloadRelease/", false); + uri.AppendPath(releaseName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Stops a new region frontload release. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The name of the release. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string providerNamespace, string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var message = CreateStopRequest(subscriptionId, providerNamespace, releaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops a new region frontload release. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The name of the release. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string providerNamespace, string releaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(releaseName, nameof(releaseName)); + + using var message = CreateStopRequest(subscriptionId, providerNamespace, releaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/NotificationRegistrationsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/NotificationRegistrationsRestOperations.cs index 42626b6f24ed..74ec5442c505 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/NotificationRegistrationsRestOperations.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/NotificationRegistrationsRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRegistrationsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-20"; + _apiVersion = apiVersion ?? "2024-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,7 +71,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string providerName } /// Gets the notification registration details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The notification registration. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> GetAsync(string subscr } /// Gets the notification registration details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The notification registration. /// The cancellation token to use. @@ -171,7 +171,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string p } /// Creates or updates a notification registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The notification registration. /// The required body parameters supplied to the notification registration operation. @@ -202,7 +202,7 @@ public async Task> CreateOrUpdateAsync(st } /// Creates or updates a notification registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The notification registration. /// The required body parameters supplied to the notification registration operation. @@ -267,7 +267,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string providerN } /// Deletes a notification registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The notification registration. /// The cancellation token to use. @@ -292,7 +292,7 @@ public async Task DeleteAsync(string subscriptionId, string providerNa } /// Deletes a notification registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The notification registration. /// The cancellation token to use. @@ -349,7 +349,7 @@ internal HttpMessage CreateListByProviderRegistrationRequest(string subscription } /// Gets the list of the notification registrations for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -376,7 +376,7 @@ public async Task> ListByProviderRe } /// Gets the list of the notification registrations for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -426,7 +426,7 @@ internal HttpMessage CreateListByProviderRegistrationNextPageRequest(string next /// Gets the list of the notification registrations for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. @@ -455,7 +455,7 @@ public async Task> ListByProviderRe /// Gets the list of the notification registrations for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderHubRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderHubRestOperations.cs index 53847578245b..64b179a4eb46 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderHubRestOperations.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderHubRestOperations.cs @@ -32,7 +32,7 @@ public ProviderHubRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-20"; + _apiVersion = apiVersion ?? "2024-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -69,7 +69,7 @@ internal HttpMessage CreateGenerateManifestRequest(string subscriptionId, string } /// Generates the manifest for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -96,7 +96,7 @@ public async Task> GenerateManifestAsync(stri } /// Generates the manifest for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -159,7 +159,7 @@ internal HttpMessage CreateCheckinManifestRequest(string subscriptionId, string } /// Checkin the manifest. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The required body parameters supplied to the checkin manifest operation. /// The cancellation token to use. @@ -188,7 +188,7 @@ public async Task> CheckinManifestAsync(string sub } /// Checkin the manifest. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The required body parameters supplied to the checkin manifest operation. /// The cancellation token to use. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderMonitorSettingsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderMonitorSettingsRestOperations.cs new file mode 100644 index 000000000000..039b8d3cc758 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderMonitorSettingsRestOperations.cs @@ -0,0 +1,723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + internal partial class ProviderMonitorSettingsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProviderMonitorSettingsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProviderMonitorSettingsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the provider monitor setting details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, providerMonitorSettingName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProviderMonitorSettingData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the provider monitor setting details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, providerMonitorSettingName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProviderMonitorSettingData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, ProviderMonitorSettingData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, ProviderMonitorSettingData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the provider monitor setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The provider monitor setting properties supplied to the create operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, ProviderMonitorSettingData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, providerMonitorSettingName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the provider monitor setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The provider monitor setting properties supplied to the create operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, ProviderMonitorSettingData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, providerMonitorSettingName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Updates the provider monitor setting properties as specified in the request body. Update fails if the specified provider monitor setting does not already exist. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, providerMonitorSettingName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the provider monitor setting properties as specified in the request body. Update fails if the specified provider monitor setting does not already exist. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, providerMonitorSettingName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProviderMonitorSettingData.DeserializeProviderMonitorSettingData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string providerMonitorSettingName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings/", false); + uri.AppendPath(providerMonitorSettingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a provider monitor setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, providerMonitorSettingName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a provider monitor setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the provider monitor setting. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string providerMonitorSettingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(providerMonitorSettingName, nameof(providerMonitorSettingName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, providerMonitorSettingName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of the provider monitor settings in the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of the provider monitor settings in the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerMonitorSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of the provider monitor settings in the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of the provider monitor settings in the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of the provider monitor settings in the resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of the provider monitor settings in the resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of the provider monitor settings in the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of the provider monitor settings in the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProviderMonitorSettingArrayResponseWithContinuation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProviderMonitorSettingArrayResponseWithContinuation.DeserializeProviderMonitorSettingArrayResponseWithContinuation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderRegistrationsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderRegistrationsRestOperations.cs index e53fb4c02afc..917de526e82c 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderRegistrationsRestOperations.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ProviderRegistrationsRestOperations.cs @@ -32,7 +32,7 @@ public ProviderRegistrationsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-20"; + _apiVersion = apiVersion ?? "2024-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string providerName } /// Gets the provider registration details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -96,7 +96,7 @@ public async Task> GetAsync(string subscripti } /// Gets the provider registration details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -159,7 +159,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string p } /// Creates or updates the provider registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The provider registration properties supplied to the CreateOrUpdate operation. /// The cancellation token to use. @@ -184,7 +184,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string pr } /// Creates or updates the provider registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The provider registration properties supplied to the CreateOrUpdate operation. /// The cancellation token to use. @@ -239,7 +239,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string providerN } /// Deletes a provider registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -262,7 +262,7 @@ public async Task DeleteAsync(string subscriptionId, string providerNa } /// Deletes a provider registration. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -313,7 +313,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Gets the list of the provider registrations in the subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -338,7 +338,7 @@ public async Task> ListAsync(string sub } /// Gets the list of the provider registrations in the subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -386,7 +386,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets the list of the provider registrations in the subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -413,7 +413,7 @@ public async Task> ListNextPageAsync(st /// Gets the list of the provider registrations in the subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ResourceActionsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ResourceActionsRestOperations.cs new file mode 100644 index 000000000000..0f7e5e9fe917 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ResourceActionsRestOperations.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ProviderHub.Models; + +namespace Azure.ResourceManager.ProviderHub +{ + internal partial class ResourceActionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ResourceActionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ResourceActionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateDeleteResourcesRequestUri(string subscriptionId, string providerNamespace, string resourceActionName, ResourceManagementAction properties) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/resourceActions/", false); + uri.AppendPath(resourceActionName, true); + uri.AppendPath("/deleteResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteResourcesRequest(string subscriptionId, string providerNamespace, string resourceActionName, ResourceManagementAction properties) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ProviderHub/providerRegistrations/", false); + uri.AppendPath(providerNamespace, true); + uri.AppendPath("/resourceActions/", false); + uri.AppendPath(resourceActionName, true); + uri.AppendPath("/deleteResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(properties, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Deletes resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The resource action name. + /// The properties supplied to the DeleteResources operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteResourcesAsync(string subscriptionId, string providerNamespace, string resourceActionName, ResourceManagementAction properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(resourceActionName, nameof(resourceActionName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateDeleteResourcesRequest(subscriptionId, providerNamespace, resourceActionName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource provider hosted within ProviderHub. + /// The resource action name. + /// The properties supplied to the DeleteResources operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DeleteResources(string subscriptionId, string providerNamespace, string resourceActionName, ResourceManagementAction properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(providerNamespace, nameof(providerNamespace)); + Argument.AssertNotNullOrEmpty(resourceActionName, nameof(resourceActionName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateDeleteResourcesRequest(subscriptionId, providerNamespace, resourceActionName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ResourceTypeRegistrationsRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ResourceTypeRegistrationsRestOperations.cs index 55046d0d97aa..55def9f9a5d0 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ResourceTypeRegistrationsRestOperations.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/ResourceTypeRegistrationsRestOperations.cs @@ -32,7 +32,7 @@ public ResourceTypeRegistrationsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-20"; + _apiVersion = apiVersion ?? "2024-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,7 +71,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string providerName } /// Gets a resource type details in the given subscription and provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> GetAsync(string subscr } /// Gets a resource type details in the given subscription and provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -171,7 +171,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string p } /// Creates or updates a resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The required request body parameters supplied to the resource type registration CreateOrUpdate operation. @@ -198,7 +198,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string pr } /// Creates or updates a resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The required request body parameters supplied to the resource type registration CreateOrUpdate operation. @@ -259,7 +259,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string providerN } /// Deletes a resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -275,7 +275,7 @@ public async Task DeleteAsync(string subscriptionId, string providerNa await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: @@ -284,7 +284,7 @@ public async Task DeleteAsync(string subscriptionId, string providerNa } /// Deletes a resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -300,7 +300,7 @@ public Response Delete(string subscriptionId, string providerNamespace, string r _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: @@ -341,7 +341,7 @@ internal HttpMessage CreateListByProviderRegistrationRequest(string subscription } /// Gets the list of the resource types for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -368,7 +368,7 @@ public async Task> ListByProviderRe } /// Gets the list of the resource types for the given provider. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// or is null. @@ -418,7 +418,7 @@ internal HttpMessage CreateListByProviderRegistrationNextPageRequest(string next /// Gets the list of the resource types for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. @@ -447,7 +447,7 @@ public async Task> ListByProviderRe /// Gets the list of the resource types for the given provider. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The cancellation token to use. /// , or is null. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/SkusRestOperations.cs index e6e078a330c1..7219de3651a5 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/RestOperations/SkusRestOperations.cs @@ -32,7 +32,7 @@ public SkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-11-20"; + _apiVersion = apiVersion ?? "2024-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string providerName } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The SKU. @@ -108,7 +108,7 @@ public async Task> GetAsync(string subscriptionId, } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The SKU. @@ -183,7 +183,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string p } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The SKU. @@ -216,7 +216,7 @@ public async Task> CreateOrUpdateAsync(string subs } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The SKU. @@ -287,7 +287,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string providerN } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The SKU. @@ -314,7 +314,7 @@ public async Task DeleteAsync(string subscriptionId, string providerNa } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The SKU. @@ -383,7 +383,7 @@ internal HttpMessage CreateGetNestedResourceTypeFirstRequest(string subscription } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -418,7 +418,7 @@ public async Task> GetNestedResourceTypeFirstAsync } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -499,7 +499,7 @@ internal HttpMessage CreateCreateOrUpdateNestedResourceTypeFirstRequest(string s } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -534,7 +534,7 @@ public async Task> CreateOrUpdateNestedResourceTyp } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -611,7 +611,7 @@ internal HttpMessage CreateDeleteNestedResourceTypeFirstRequest(string subscript } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -640,7 +640,7 @@ public async Task DeleteNestedResourceTypeFirstAsync(string subscripti } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -715,7 +715,7 @@ internal HttpMessage CreateGetNestedResourceTypeSecondRequest(string subscriptio } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -752,7 +752,7 @@ public async Task> GetNestedResourceTypeSecondAsyn } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -839,7 +839,7 @@ internal HttpMessage CreateCreateOrUpdateNestedResourceTypeSecondRequest(string } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -876,7 +876,7 @@ public async Task> CreateOrUpdateNestedResourceTyp } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -959,7 +959,7 @@ internal HttpMessage CreateDeleteNestedResourceTypeSecondRequest(string subscrip } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -990,7 +990,7 @@ public async Task DeleteNestedResourceTypeSecondAsync(string subscript } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1071,7 +1071,7 @@ internal HttpMessage CreateGetNestedResourceTypeThirdRequest(string subscription } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1110,7 +1110,7 @@ public async Task> GetNestedResourceTypeThirdAsync } /// Gets the sku details for the given resource type and sku name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1203,7 +1203,7 @@ internal HttpMessage CreateCreateOrUpdateNestedResourceTypeThirdRequest(string s } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1242,7 +1242,7 @@ public async Task> CreateOrUpdateNestedResourceTyp } /// Creates or updates the resource type skus in the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1331,7 +1331,7 @@ internal HttpMessage CreateDeleteNestedResourceTypeThirdRequest(string subscript } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1364,7 +1364,7 @@ public async Task DeleteNestedResourceTypeThirdAsync(string subscripti } /// Deletes a resource type sku. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1433,7 +1433,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsRequest(string subscri } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -1462,7 +1462,7 @@ public async Task> ListByResourceTypeRegistr } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -1531,7 +1531,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsNestedResourceTypeFirs } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1562,7 +1562,7 @@ public async Task> ListByResourceTypeRegistr } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1637,7 +1637,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsNestedResourceTypeSeco } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1670,7 +1670,7 @@ public async Task> ListByResourceTypeRegistr } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1751,7 +1751,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsNestedResourceTypeThir } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1786,7 +1786,7 @@ public async Task> ListByResourceTypeRegistr } /// Gets the list of skus for the given resource type. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1844,7 +1844,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsNextPageRequest(string /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -1875,7 +1875,7 @@ public async Task> ListByResourceTypeRegistr /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The cancellation token to use. @@ -1928,7 +1928,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsNestedResourceTypeFirs /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -1961,7 +1961,7 @@ public async Task> ListByResourceTypeRegistr /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -2016,7 +2016,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsNestedResourceTypeSeco /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -2051,7 +2051,7 @@ public async Task> ListByResourceTypeRegistr /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -2108,7 +2108,7 @@ internal HttpMessage CreateListByResourceTypeRegistrationsNestedResourceTypeThir /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. @@ -2145,7 +2145,7 @@ public async Task> ListByResourceTypeRegistr /// Gets the list of skus for the given resource type. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource provider hosted within ProviderHub. /// The resource type. /// The first child resource type. diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/autorest.md b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/autorest.md index ccf9afa4d666..14d67caf32e7 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/autorest.md +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: ProviderHub namespace: Azure.ResourceManager.ProviderHub -require: https://github.com/Azure/azure-rest-api-specs/blob/34ba022add0034e30462b76e1548ce5a7e053e33/specification/providerhub/resource-manager/readme.md -tag: package-2020-11-20 +require: https://github.com/Azure/azure-rest-api-specs/blob/247a38a5fea02ac50132f591f3b53fec06e9377b/specification/providerhub/resource-manager/readme.md +#tag: package-2024-09-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -20,58 +20,134 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true -# mgmt-debug: +#mgmt-debug: # show-serialized-names: true rename-mapping: - ResourceTypeSku: ResourceTypeSkuProperties - SkuResource: ResourceTypeSku + AdditionalAuthorization: ProviderAdditionalAuthorization + AdditionalOptions: AdditionalOptionResourceType + AdditionalOptionsAsyncOperation: AdditionalOptionAsyncOperation + AdditionalOptionsResourceTypeRegistration: AdditionalOptionResourceTypeRegistration + ApiProfile: ResourceTypeRegistrationApiProfile + AuthenticationScheme: ProviderAuthenticationScheme + AuthorizedApplication: ProviderAuthorizedApplication + AuthorizedApplicationProperties: ProviderAuthorizedApplicationProperties + CanaryTrafficRegionRolloutConfiguration.regions: -|azure-location + CanaryTrafficRegionRolloutConfiguration.skipRegions: -|azure-location + CapacityPolicy: ResourceTypeRegistrationCapacityPolicy CheckinManifestParams: CheckinManifestContent + CheckinManifestParams.baselineArmManifestLocation: -|azure-location + CheckNameAvailabilitySpecifications.enableDefaultValidation: IsDefaultValidationEnabled CustomRolloutArrayResponseWithContinuation: CustomRolloutListResult + CustomRolloutSpecificationAutoProvisionConfig: CustomRolloutAutoProvisionConfig + CustomRolloutSpecificationAutoProvisionConfig.resourceGraph: IsResourceGraphEnabled + CustomRolloutSpecificationAutoProvisionConfig.storage: IsStorageEnabled + CustomRolloutStatus.completedRegions: -|azure-location + DataBoundary: ResourceTypeDataBoundary DefaultRolloutArrayResponseWithContinuation: DefaultRolloutListResult + DefaultRolloutSpecificationAutoProvisionConfig: DefaultRolloutAutoProvisionConfig + DefaultRolloutSpecificationAutoProvisionConfig.resourceGraph: IsResourceGraphEnabled + DefaultRolloutSpecificationAutoProvisionConfig.storage: IsStorageEnabled + DeleteDependency: ResourceTypeRegistrationDeleteDependency + DstsConfiguration: ProviderDstsConfiguration + EndpointInformation: ProviderEndpointInformation + EndpointType: ProviderEndpointType + EndpointTypeResourceType: ProviderEndpointTypeResourceType + ExpeditedRolloutDefinition.enabled: IsExpeditedRolloutEnabled + ExtendedLocationOptions.supportedPolicy: SupportedLocationPolicy + ExtendedLocationOptions.type: LocationType + ExtendedLocationType: ProviderExtendedLocationType ExtensionCategory: ResourceTypeExtensionCategory + FeaturesRule: ProviderFeaturesRule + FilterOption: ProviderResourceQueryFilterOption + FilterRule: ProviderFilterRule + FrontloadPayload: ProviderFrontloadPayload + FrontloadPayloadProperties: ProviderFrontloadPayloadProperties + Intent: AllowedUnauthorizedActionIntent + Intent.LOW_PRIVILEGE: LowPrivilege + Intent.NOT_SPECIFIED: NotSpecified + LegacyOperation: ProviderLegacyOperation + LocationQuotaRule: ProviderLocationQuotaRule LoggingHiddenPropertyPath: LoggingHiddenPropertyPaths + Notification: ProviderNotification + NotificationEndpoint.locations: -|azure-location + NotificationEndpoint.notificationDestination: -|arm-id + NotificationEndpointType: ProviderNotificationEndpointType + NotificationOptions: ProviderNotificationOption NotificationRegistrationArrayResponseWithContinuation: NotificationRegistrationListResult + NotificationType: ProviderNotificationType + OpenApiValidation.allowNoncompliantCollectionResponse: IsNoncompliantCollectionResponseAllowed + Policy: ResourceConcurrencyPolicy ProviderRegistrationArrayResponseWithContinuation: ProviderRegistrationListResult + QuotaPolicy: ProviderQuotaPolicy + QuotaRule: ProviderQuotaRule + Readiness: ServiceTreeReadiness Regionality: ResourceTypeRegistrationRegionality + ReRegisterSubscriptionMetadata.enabled: IsEnabled + RequestHeaderOptions: ProviderRequestHeaderOptions + ResourceGraphConfiguration.enabled: IsEnabled + ResourceMovePolicy.crossResourceGroupMoveEnabled: IsCrossResourceGroupMoveEnabled + ResourceMovePolicy.crossSubscriptionMoveEnabled: IsCrossSubscriptionMoveEnabled + ResourceMovePolicy.validationRequired: IsValidationRequired + ResourceProviderAuthorizationManagedByAuthorization: ResourceProviderManagedByAuthorization + ResourceProviderAuthorizationManagedByAuthorization.allowManagedByInheritance: DoesAllowManagedByInheritance + ResourceProviderEndpoint.enabled: IsEnabled + ResourceProviderEndpoint.locations: -|azure-location + ResourceProviderManagement.pcCode: ProfitCenterCode + ResourceProviderManagement.resourceAccessRoles: ResourceAccessRoleList + ResourceProviderManagementErrorResponseMessageOptions: ResourceProviderErrorResponseMessageOptions + ResourceProviderManagementExpeditedRolloutMetadata: ExpeditedRolloutMetadata + ResourceProviderManagementExpeditedRolloutMetadata.enabled: IsEnabled + ResourceProviderManifest.enableTenantLinkedNotification: IsTenantLinkedNotificationEnabled + ResourceProviderManifestPropertiesNotificationSettings: ResourceProviderManifestNotificationSettings + ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove: ResourceProviderManifestResourceGroupLockOptionDuringMove + ResourceProviderManifestPropertiesResponseOptions: ResourceProviderManifestResponseOptions + ResourceSubType: ProviderResourceSubType ResourceType: ProviderResourceType + ResourceTypeEndpoint.enabled: IsEnabled + ResourceTypeEndpoint.locations: -|azure-location ResourceTypeRegistrationArrayResponseWithContinuation: ResourceTypeRegistrationListResult + ResourceTypeRegistrationProperties.addResourceListTargetLocations: IsAddResourceListTargetLocationsAllowed + ResourceTypeRegistrationProperties.allowEmptyRoleAssignments: IsEmptyRoleAssignmentsAllowed + ResourceTypeRegistrationProperties.enableAsyncOperation: IsAsyncOperationEnabled + ResourceTypeRegistrationProperties.enableThirdPartyS2S: IsThirdPartyS2SEnabled + ResourceTypeRegistrationProperties.supportsTags: AreTagsSupported + ResourceTypeRegistrationPropertiesAvailabilityZoneRule: ResourceTypeRegistrationAvailabilityZoneRule + ResourceTypeRegistrationPropertiesCapacityRule: ResourceTypeRegistrationCapacityRule + ResourceTypeRegistrationPropertiesLegacyPolicy: ResourceTypeRegistrationLegacyPolicy + ResourceTypeRegistrationPropertiesMarketplaceOptions: ResourceTypeRegistrationMarketplaceOptions + ResourceTypeRegistrationPropertiesMarketplaceOptions.addOnPlanConversionAllowed: IsAddOnPlanConversionAllowed + ResourceTypeRegistrationPropertiesResourceCache: ResourceTypeRegistrationResourceCache + ResourceTypeRegistrationPropertiesResourceCache.enableResourceCache: IsResourceCacheEnabled + ResourceTypeRegistrationPropertiesResourceManagementOptions: ResourceTypeRegistrationResourceManagementOptions + ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport: BatchProvisioningSupport + ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport: NestedProvisioningSupport + ResourceTypeRegistrationPropertiesResourceQueryManagement: ProviderResourceQueryManagement + ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement: ResourceTypeCommonAttributeManagement + ResourceTypeRegistrationPropertiesRoutingRule: ResourceTypeRegistrationRoutingRule + ResourceTypeSku: ResourceTypeSkuProperties + Role: ApplicationOwnershipRole + RolloutStatusBase.completedRegions: -|azure-location RoutingType: ResourceRoutingType + ServiceStatus: ResourceProviderServiceStatus SkuCapability: ResourceSkuCapability SkuCapacity: ResourceTypeSkuCapacity SkuCost: ResourceTypeSkuCost SkuLocationInfo: ResourceTypeSkuLocationInfo + SkuLocationInfo.type: LocationType + SkuResource: ResourceTypeSku + SkuResourceArrayResponseWithContinuation: ResourceTypeSkuListResult SkuScaleType: ResourceTypeSkuScaleType SkuSetting: ResourceTypeSkuSetting SkuZoneDetail: ResourceTypeSkuZoneDetail - SkuResourceArrayResponseWithContinuation: ResourceTypeSkuListResult SubscriptionState: ProviderSubscriptionState SubscriptionStateRule: ProviderSubscriptionStateRule - CanaryTrafficRegionRolloutConfiguration.skipRegions: -|azure-location - CanaryTrafficRegionRolloutConfiguration.regions: -|azure-location - CheckinManifestParams.baselineArmManifestLocation: -|azure-location - CheckNameAvailabilitySpecifications.enableDefaultValidation: IsDefaultValidationEnabled - CustomRolloutStatus.completedRegions: -|azure-location - NotificationEndpoint.notificationDestination: -|arm-id - NotificationEndpoint.locations: -|azure-location - TrafficRegions.regions: -|azure-location - ReRegisterSubscriptionMetadata.enabled: IsEnabled - ResourceProviderEndpoint.enabled: IsEnabled - ResourceProviderEndpoint.locations: -|azure-location - ResourceTypeEndpoint.enabled: IsEnabled - ResourceTypeEndpoint.locations: -|azure-location - RolloutStatusBase.completedRegions: -|azure-location - ResourceMovePolicy.validationRequired: IsValidationRequired - ResourceMovePolicy.crossResourceGroupMoveEnabled: IsCrossResourceGroupMoveEnabled - ResourceMovePolicy.crossSubscriptionMoveEnabled: IsCrossSubscriptionMoveEnabled - ResourceTypeRegistrationProperties.enableAsyncOperation: IsAsyncOperationEnabled - ResourceTypeRegistrationProperties.enableThirdPartyS2S: IsThirdPartyS2SEnabled + SupportedOperations: ResourceManagementSupportedOperation TemplateDeploymentOptions.preflightSupported: IsPreflightSupported - SkuLocationInfo.type: ExtendedLocationType + TrafficRegions.regions: -|azure-location prepend-rp-prefix: - ExtendedLocationOptions - - ExtendedLocationType - ProvisioningState format-by-name-rules: @@ -110,6 +186,8 @@ request-path-to-resource-name: /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}: NestedResourceTypeFirstSku /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}: NestedResourceTypeSecondSku /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}: NestedResourceTypeThirdSku + /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/defaultRollouts/{rolloutName}: DefaultRollout + /subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}: RegistrationNewRegionFrontloadRelease directive: - remove-operation: Operations_List @@ -221,5 +299,43 @@ directive: $.ResourceTypeRegistrationProperties.properties.resourceMovePolicy['$ref'] = '#/definitions/ResourceMovePolicy'; delete $.SkuSetting.properties.capacity['allOf']; $.SkuSetting.properties.capacity['$ref'] = '#/definitions/SkuCapacity'; + delete $.DefaultRolloutStatus.properties.manifestCheckinStatus['allOf']; + $.DefaultRolloutStatus.properties.manifestCheckinStatus['$ref'] = '#/definitions/CheckinManifestInfo'; + delete $.CustomRolloutStatus.properties.manifestCheckinStatus['allOf']; + $.CustomRolloutStatus.properties.manifestCheckinStatus['$ref'] = '#/definitions/CheckinManifestInfo'; + delete $.ResourceProviderManifestProperties.properties.dstsConfiguration['allOf']; + $.ResourceProviderManifestProperties.properties.dstsConfiguration['$ref'] = '#/definitions/DstsConfiguration'; + delete $.ResourceTypeEndpoint.properties.dstsConfiguration['allOf']; + $.ResourceTypeEndpoint.properties.dstsConfiguration['$ref'] = '#/definitions/DstsConfiguration'; + delete $.ResourceTypeRegistrationProperties.properties.dstsConfiguration['allOf']; + $.ResourceTypeRegistrationProperties.properties.dstsConfiguration['$ref'] = '#/definitions/DstsConfiguration'; + delete $.FanoutLinkedNotificationRule.properties.dstsConfiguration['allOf']; + $.FanoutLinkedNotificationRule.properties.dstsConfiguration['$ref'] = '#/definitions/DstsConfiguration'; + delete $.ResourceTypeEndpointBase.properties.dstsConfiguration['allOf']; + $.ResourceTypeEndpointBase.properties.dstsConfiguration['$ref'] = '#/definitions/DstsConfiguration'; + delete $.ResourceProviderEndpoint.properties.featuresRule['allOf']; + $.ResourceProviderEndpoint.properties.featuresRule['$ref'] = '#/definitions/FeaturesRule'; + delete $.ResourceType.properties.featuresRule['allOf']; + $.ResourceType.properties.featuresRule['$ref'] = '#/definitions/FeaturesRule'; + delete $.ResourceProviderManifest.properties.featuresRule['allOf']; + $.ResourceProviderManifest.properties.featuresRule['$ref'] = '#/definitions/FeaturesRule'; + delete $.ResourceProviderManifestProperties.properties.featuresRule['allOf']; + $.ResourceProviderManifestProperties.properties.featuresRule['$ref'] = '#/definitions/FeaturesRule'; + delete $.ResourceTypeEndpoint.properties.featuresRule['allOf']; + $.ResourceTypeEndpoint.properties.featuresRule['$ref'] = '#/definitions/FeaturesRule'; + delete $.ResourceTypeRegistrationProperties.properties.featuresRule['allOf']; + $.ResourceTypeRegistrationProperties.properties.featuresRule['$ref'] = '#/definitions/FeaturesRule'; + delete $.ResourceTypeEndpointBase.properties.featuresRule['allOf']; + $.ResourceTypeEndpointBase.properties.featuresRule['$ref'] = '#/definitions/FeaturesRule'; + delete $.FrontloadPayloadProperties.properties.overrideManifestLevelFields['allOf']; + $.FrontloadPayloadProperties.properties.overrideManifestLevelFields['$ref'] = '#/definitions/ManifestLevelPropertyBag'; + delete $.FrontloadPayloadProperties.properties.overrideEndpointLevelFields['allOf']; + $.FrontloadPayloadProperties.properties.overrideEndpointLevelFields['$ref'] = '#/definitions/ResourceTypeEndpointBase'; + delete $.ResourceTypeRegistrationProperties.properties.management['allOf']; + $.ResourceTypeRegistrationProperties.properties.management['$ref'] = '#/definitions/ResourceProviderManagement'; + delete $.ResourceTypeRegistrationProperties.properties.resourceGraphConfiguration['allOf']; + $.ResourceTypeRegistrationProperties.properties.resourceGraphConfiguration['$ref'] = '#/definitions/ResourceGraphConfiguration'; + delete $.ResourceTypeRegistrationProperties.properties.templateDeploymentPolicy['allOf']; + $.ResourceTypeRegistrationProperties.properties.templateDeploymentPolicy['$ref'] = '#/definitions/TemplateDeploymentPolicy'; ``` diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutCollection.cs index ba1e8a1d84c7..5f065a52726b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CustomRolloutCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CustomRolloutsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_CreateOrUpdate.json // this example is just showing the usage of "CustomRollouts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -40,10 +40,16 @@ public async Task CreateOrUpdate_CustomRolloutsCreateOrUpdate() // invoke the operation string rolloutName = "brazilUsShoeBoxTesting"; - CustomRolloutData data = new CustomRolloutData(new CustomRolloutProperties(new CustomRolloutSpecification(new TrafficRegions + CustomRolloutData data = new CustomRolloutData(new CustomRolloutProperties(new CustomRolloutSpecification { - Regions = { new AzureLocation("brazilus") }, - }))); + AutoProvisionConfig = new CustomRolloutAutoProvisionConfig + { + IsStorageEnabled = true, + IsResourceGraphEnabled = true, + }, + CanaryRegions = { new AzureLocation("brazilus") }, + RefreshSubscriptionRegistration = true, + })); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, rolloutName, data); CustomRolloutResource result = lro.Value; @@ -58,7 +64,7 @@ public async Task CreateOrUpdate_CustomRolloutsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_CustomRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Get.json // this example is just showing the usage of "CustomRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +97,7 @@ public async Task Get_CustomRolloutsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CustomRolloutsListByProviderRegistration() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_ListByProviderRegistration.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_ListByProviderRegistration.json // this example is just showing the usage of "CustomRollouts_ListByProviderRegistration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +132,7 @@ public async Task GetAll_CustomRolloutsListByProviderRegistration() [Ignore("Only validating compilation of examples")] public async Task Exists_CustomRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Get.json // this example is just showing the usage of "CustomRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +161,7 @@ public async Task Exists_CustomRolloutsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CustomRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Get.json // this example is just showing the usage of "CustomRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutResource.cs index 1736a7cf21ae..e5f437c9c404 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_CustomRolloutResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CustomRolloutResource [Ignore("Only validating compilation of examples")] public async Task Get_CustomRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Get.json // this example is just showing the usage of "CustomRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,11 +46,37 @@ public async Task Get_CustomRolloutsGet() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ProviderReleasesDelete() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Delete.json + // this example is just showing the usage of "CustomRollouts_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomRolloutResource created on azure + // for more information of creating CustomRolloutResource, please refer to the document of CustomRolloutResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + string rolloutName = "2020week10"; + ResourceIdentifier customRolloutResourceId = CustomRolloutResource.CreateResourceIdentifier(subscriptionId, providerNamespace, rolloutName); + CustomRolloutResource customRollout = client.GetCustomRolloutResource(customRolloutResourceId); + + // invoke the operation + await customRollout.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Update_CustomRolloutsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_CreateOrUpdate.json // this example is just showing the usage of "CustomRollouts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,10 +93,16 @@ public async Task Update_CustomRolloutsCreateOrUpdate() CustomRolloutResource customRollout = client.GetCustomRolloutResource(customRolloutResourceId); // invoke the operation - CustomRolloutData data = new CustomRolloutData(new CustomRolloutProperties(new CustomRolloutSpecification(new TrafficRegions + CustomRolloutData data = new CustomRolloutData(new CustomRolloutProperties(new CustomRolloutSpecification { - Regions = { new AzureLocation("brazilus") }, - }))); + AutoProvisionConfig = new CustomRolloutAutoProvisionConfig + { + IsStorageEnabled = true, + IsResourceGraphEnabled = true, + }, + CanaryRegions = { new AzureLocation("brazilus") }, + RefreshSubscriptionRegistration = true, + })); ArmOperation lro = await customRollout.UpdateAsync(WaitUntil.Completed, data); CustomRolloutResource result = lro.Value; @@ -80,5 +112,31 @@ public async Task Update_CustomRolloutsCreateOrUpdate() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_CustomRolloutsStop() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Stop.json + // this example is just showing the usage of "CustomRollouts_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomRolloutResource created on azure + // for more information of creating CustomRolloutResource, please refer to the document of CustomRolloutResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + string rolloutName = "2020week10"; + ResourceIdentifier customRolloutResourceId = CustomRolloutResource.CreateResourceIdentifier(subscriptionId, providerNamespace, rolloutName); + CustomRolloutResource customRollout = client.GetCustomRolloutResource(customRolloutResourceId); + + // invoke the operation + await customRollout.StopAsync(); + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutCollection.cs index 3da20ed0365c..385c323e35a4 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_DefaultRolloutCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DefaultRolloutsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_CreateOrUpdate.json // this example is just showing the usage of "DefaultRollouts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,6 +47,7 @@ public async Task CreateOrUpdate_DefaultRolloutsCreateOrUpdate() { Specification = new DefaultRolloutSpecification { + IsExpeditedRolloutEnabled = true, Canary = new CanaryTrafficRegionRolloutConfiguration { SkipRegions = { new AzureLocation("eastus2euap") }, @@ -72,7 +73,7 @@ public async Task CreateOrUpdate_DefaultRolloutsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_DefaultRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Get.json // this example is just showing the usage of "DefaultRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +106,7 @@ public async Task Get_DefaultRolloutsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DefaultRolloutsListByProviderRegistration() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_ListByProviderRegistration.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_ListByProviderRegistration.json // this example is just showing the usage of "DefaultRollouts_ListByProviderRegistration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +141,7 @@ public async Task GetAll_DefaultRolloutsListByProviderRegistration() [Ignore("Only validating compilation of examples")] public async Task Exists_DefaultRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Get.json // this example is just showing the usage of "DefaultRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +170,7 @@ public async Task Exists_DefaultRolloutsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DefaultRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Get.json // this example is just showing the usage of "DefaultRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutResource.cs index d6eb507cd4fb..914dac1f6343 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_DefaultRolloutResource.cs @@ -21,7 +21,7 @@ public partial class Sample_DefaultRolloutResource [Ignore("Only validating compilation of examples")] public async Task Get_DefaultRolloutsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Get.json // this example is just showing the usage of "DefaultRollouts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_DefaultRolloutsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DefaultRolloutsDelete() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Delete.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Delete.json // this example is just showing the usage of "DefaultRollouts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Delete_DefaultRolloutsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DefaultRolloutsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_CreateOrUpdate.json // this example is just showing the usage of "DefaultRollouts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,6 +100,7 @@ public async Task Update_DefaultRolloutsCreateOrUpdate() { Specification = new DefaultRolloutSpecification { + IsExpeditedRolloutEnabled = true, Canary = new CanaryTrafficRegionRolloutConfiguration { SkipRegions = { new AzureLocation("eastus2euap") }, @@ -125,7 +126,7 @@ public async Task Update_DefaultRolloutsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Stop_DefaultRolloutsStop() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Stop.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Stop.json // this example is just showing the usage of "DefaultRollouts_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuCollection.cs index a3417b5e6971..36822fa6503e 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NestedResourceTypeFirstSkuCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SkusCreateOrUpdateNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdateNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdateNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_CreateOrUpdateNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +73,7 @@ public async Task CreateOrUpdate_SkusCreateOrUpdateNestedResourceTypeFirst() [Ignore("Only validating compilation of examples")] public async Task Get_SkusGetNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_GetNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task Get_SkusGetNestedResourceTypeFirst() [Ignore("Only validating compilation of examples")] public async Task GetAll_SkusListByResourceTypeRegistrationsNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task GetAll_SkusListByResourceTypeRegistrationsNestedResourceTypeFi [Ignore("Only validating compilation of examples")] public async Task Exists_SkusGetNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_GetNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task Exists_SkusGetNestedResourceTypeFirst() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SkusGetNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_GetNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuResource.cs index ebfe7a80d1cf..cfa3f664a903 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeFirstSkuResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NestedResourceTypeFirstSkuResource [Ignore("Only validating compilation of examples")] public async Task Get_SkusGetNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_GetNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_SkusGetNestedResourceTypeFirst() [Ignore("Only validating compilation of examples")] public async Task Delete_SkusDeleteNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_DeleteNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_DeleteNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_DeleteNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_SkusDeleteNestedResourceTypeFirst() [Ignore("Only validating compilation of examples")] public async Task Update_SkusCreateOrUpdateNestedResourceTypeFirst() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdateNestedResourceTypeFirst.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdateNestedResourceTypeFirst.json // this example is just showing the usage of "Skus_CreateOrUpdateNestedResourceTypeFirst" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuCollection.cs index d5ab00dcf0dd..e9b7d2eb6e99 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NestedResourceTypeSecondSkuCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SkusCreateOrUpdateNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdateNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdateNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_CreateOrUpdateNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,7 +74,7 @@ public async Task CreateOrUpdate_SkusCreateOrUpdateNestedResourceTypeSecond() [Ignore("Only validating compilation of examples")] public async Task Get_SkusGetNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_GetNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_SkusGetNestedResourceTypeSecond() [Ignore("Only validating compilation of examples")] public async Task GetAll_SkusListByResourceTypeRegistrationsNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task GetAll_SkusListByResourceTypeRegistrationsNestedResourceTypeSe [Ignore("Only validating compilation of examples")] public async Task Exists_SkusGetNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_GetNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task Exists_SkusGetNestedResourceTypeSecond() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SkusGetNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_GetNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuResource.cs index 47c0ce46dfed..8e6862ce1595 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeSecondSkuResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NestedResourceTypeSecondSkuResource [Ignore("Only validating compilation of examples")] public async Task Get_SkusGetNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_GetNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_SkusGetNestedResourceTypeSecond() [Ignore("Only validating compilation of examples")] public async Task Delete_SkusDeleteNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_DeleteNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_DeleteNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_DeleteNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_SkusDeleteNestedResourceTypeSecond() [Ignore("Only validating compilation of examples")] public async Task Update_SkusCreateOrUpdateNestedResourceTypeSecond() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdateNestedResourceTypeSecond.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdateNestedResourceTypeSecond.json // this example is just showing the usage of "Skus_CreateOrUpdateNestedResourceTypeSecond" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuCollection.cs index 5334c3d283db..29dd28285d16 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NestedResourceTypeThirdSkuCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SkusCreateOrUpdateNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdateNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdateNestedResourceTypeThird.json // this example is just showing the usage of "Skus_CreateOrUpdateNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task CreateOrUpdate_SkusCreateOrUpdateNestedResourceTypeThird() [Ignore("Only validating compilation of examples")] public async Task Get_SkusGetNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeThird.json // this example is just showing the usage of "Skus_GetNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_SkusGetNestedResourceTypeThird() [Ignore("Only validating compilation of examples")] public async Task GetAll_SkusListByResourceTypeRegistrationsNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_ListByResourceTypeRegistrationsNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_ListByResourceTypeRegistrationsNestedResourceTypeThird.json // this example is just showing the usage of "Skus_ListByResourceTypeRegistrationsNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task GetAll_SkusListByResourceTypeRegistrationsNestedResourceTypeTh [Ignore("Only validating compilation of examples")] public async Task Exists_SkusGetNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeThird.json // this example is just showing the usage of "Skus_GetNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,7 +184,7 @@ public async Task Exists_SkusGetNestedResourceTypeThird() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SkusGetNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeThird.json // this example is just showing the usage of "Skus_GetNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuResource.cs index 4e790b5b6432..6e43b5a1408f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NestedResourceTypeThirdSkuResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NestedResourceTypeThirdSkuResource [Ignore("Only validating compilation of examples")] public async Task Get_SkusGetNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_GetNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_GetNestedResourceTypeThird.json // this example is just showing the usage of "Skus_GetNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_SkusGetNestedResourceTypeThird() [Ignore("Only validating compilation of examples")] public async Task Delete_SkusDeleteNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_DeleteNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_DeleteNestedResourceTypeThird.json // this example is just showing the usage of "Skus_DeleteNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Delete_SkusDeleteNestedResourceTypeThird() [Ignore("Only validating compilation of examples")] public async Task Update_SkusCreateOrUpdateNestedResourceTypeThird() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdateNestedResourceTypeThird.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdateNestedResourceTypeThird.json // this example is just showing the usage of "Skus_CreateOrUpdateNestedResourceTypeThird" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationCollection.cs index 92929f5eff9a..bcbd075333a9 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NotificationRegistrationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_NotificationRegistrationsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_CreateOrUpdate.json // this example is just showing the usage of "NotificationRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_NotificationRegistrationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_NotificationRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_Get.json // this example is just showing the usage of "NotificationRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,7 @@ public async Task Get_NotificationRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_NotificationRegistrationsListByProviderRegistration() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_ListByProviderRegistration.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_ListByProviderRegistration.json // this example is just showing the usage of "NotificationRegistrations_ListByProviderRegistration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task GetAll_NotificationRegistrationsListByProviderRegistration() [Ignore("Only validating compilation of examples")] public async Task Exists_NotificationRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_Get.json // this example is just showing the usage of "NotificationRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task Exists_NotificationRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_NotificationRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_Get.json // this example is just showing the usage of "NotificationRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationResource.cs index 80888b3c3de2..cb22c8cafd67 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_NotificationRegistrationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NotificationRegistrationResource [Ignore("Only validating compilation of examples")] public async Task Get_NotificationRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_Get.json // this example is just showing the usage of "NotificationRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_NotificationRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_NotificationRegistrationsDelete() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_Delete.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_Delete.json // this example is just showing the usage of "NotificationRegistrations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_NotificationRegistrationsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_NotificationRegistrationsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/NotificationRegistrations_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NotificationRegistrations_CreateOrUpdate.json // this example is just showing the usage of "NotificationRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderAuthorizedApplicationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderAuthorizedApplicationCollection.cs new file mode 100644 index 000000000000..27e9074a834c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderAuthorizedApplicationCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ProviderHub.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ProviderHub.Samples +{ + public partial class Sample_ProviderAuthorizedApplicationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AuthorizedApplicationsCreateOrUpdate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_CreateOrUpdate.json + // this example is just showing the usage of "AuthorizedApplications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this ProviderAuthorizedApplicationResource + ProviderAuthorizedApplicationCollection collection = providerRegistration.GetProviderAuthorizedApplications(); + + // invoke the operation + Guid applicationId = Guid.Parse("760505bf-dcfa-4311-b890-18da392a00b2"); + ProviderAuthorizedApplicationData data = new ProviderAuthorizedApplicationData + { + Properties = new ProviderAuthorizedApplicationProperties + { + ProviderAuthorization = new ApplicationProviderAuthorization + { + RoleDefinitionId = "123456bf-gkur-2098-b890-98da392a00b2", + ManagedByRoleDefinitionId = "1a3b5c7d-8e9f-10g1-1h12-i13j14k1", + }, + DataAuthorizations = {new ApplicationDataAuthorization(ApplicationOwnershipRole.ServiceOwner) +{ +ResourceTypes = {"*"}, +}}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationId, data); + ProviderAuthorizedApplicationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderAuthorizedApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AuthorizedApplicationsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_Get.json + // this example is just showing the usage of "AuthorizedApplications_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this ProviderAuthorizedApplicationResource + ProviderAuthorizedApplicationCollection collection = providerRegistration.GetProviderAuthorizedApplications(); + + // invoke the operation + Guid applicationId = Guid.Parse("760505bf-dcfa-4311-b890-18da392a00b2"); + ProviderAuthorizedApplicationResource result = await collection.GetAsync(applicationId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderAuthorizedApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AuthorizedApplicationsList() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_List.json + // this example is just showing the usage of "AuthorizedApplications_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this ProviderAuthorizedApplicationResource + ProviderAuthorizedApplicationCollection collection = providerRegistration.GetProviderAuthorizedApplications(); + + // invoke the operation and iterate over the result + await foreach (ProviderAuthorizedApplicationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderAuthorizedApplicationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AuthorizedApplicationsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_Get.json + // this example is just showing the usage of "AuthorizedApplications_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this ProviderAuthorizedApplicationResource + ProviderAuthorizedApplicationCollection collection = providerRegistration.GetProviderAuthorizedApplications(); + + // invoke the operation + Guid applicationId = Guid.Parse("760505bf-dcfa-4311-b890-18da392a00b2"); + bool result = await collection.ExistsAsync(applicationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AuthorizedApplicationsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_Get.json + // this example is just showing the usage of "AuthorizedApplications_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this ProviderAuthorizedApplicationResource + ProviderAuthorizedApplicationCollection collection = providerRegistration.GetProviderAuthorizedApplications(); + + // invoke the operation + Guid applicationId = Guid.Parse("760505bf-dcfa-4311-b890-18da392a00b2"); + NullableResponse response = await collection.GetIfExistsAsync(applicationId); + ProviderAuthorizedApplicationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderAuthorizedApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderAuthorizedApplicationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderAuthorizedApplicationResource.cs new file mode 100644 index 000000000000..93c8326e0f62 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderAuthorizedApplicationResource.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ProviderHub.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ProviderHub.Samples +{ + public partial class Sample_ProviderAuthorizedApplicationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AuthorizedApplicationsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_Get.json + // this example is just showing the usage of "AuthorizedApplications_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderAuthorizedApplicationResource created on azure + // for more information of creating ProviderAuthorizedApplicationResource, please refer to the document of ProviderAuthorizedApplicationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + Guid applicationId = Guid.Parse("760505bf-dcfa-4311-b890-18da392a00b2"); + ResourceIdentifier providerAuthorizedApplicationResourceId = ProviderAuthorizedApplicationResource.CreateResourceIdentifier(subscriptionId, providerNamespace, applicationId); + ProviderAuthorizedApplicationResource providerAuthorizedApplication = client.GetProviderAuthorizedApplicationResource(providerAuthorizedApplicationResourceId); + + // invoke the operation + ProviderAuthorizedApplicationResource result = await providerAuthorizedApplication.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderAuthorizedApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AuthorizedApplicationsDelete() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_Delete.json + // this example is just showing the usage of "AuthorizedApplications_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderAuthorizedApplicationResource created on azure + // for more information of creating ProviderAuthorizedApplicationResource, please refer to the document of ProviderAuthorizedApplicationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + Guid applicationId = Guid.Parse("760505bf-dcfa-4311-b890-18da392a00b2"); + ResourceIdentifier providerAuthorizedApplicationResourceId = ProviderAuthorizedApplicationResource.CreateResourceIdentifier(subscriptionId, providerNamespace, applicationId); + ProviderAuthorizedApplicationResource providerAuthorizedApplication = client.GetProviderAuthorizedApplicationResource(providerAuthorizedApplicationResourceId); + + // invoke the operation + await providerAuthorizedApplication.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AuthorizedApplicationsCreateOrUpdate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/AuthorizedApplications_CreateOrUpdate.json + // this example is just showing the usage of "AuthorizedApplications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderAuthorizedApplicationResource created on azure + // for more information of creating ProviderAuthorizedApplicationResource, please refer to the document of ProviderAuthorizedApplicationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + Guid applicationId = Guid.Parse("760505bf-dcfa-4311-b890-18da392a00b2"); + ResourceIdentifier providerAuthorizedApplicationResourceId = ProviderAuthorizedApplicationResource.CreateResourceIdentifier(subscriptionId, providerNamespace, applicationId); + ProviderAuthorizedApplicationResource providerAuthorizedApplication = client.GetProviderAuthorizedApplicationResource(providerAuthorizedApplicationResourceId); + + // invoke the operation + ProviderAuthorizedApplicationData data = new ProviderAuthorizedApplicationData + { + Properties = new ProviderAuthorizedApplicationProperties + { + ProviderAuthorization = new ApplicationProviderAuthorization + { + RoleDefinitionId = "123456bf-gkur-2098-b890-98da392a00b2", + ManagedByRoleDefinitionId = "1a3b5c7d-8e9f-10g1-1h12-i13j14k1", + }, + DataAuthorizations = {new ApplicationDataAuthorization(ApplicationOwnershipRole.ServiceOwner) +{ +ResourceTypes = {"*"}, +}}, + }, + }; + ArmOperation lro = await providerAuthorizedApplication.UpdateAsync(WaitUntil.Completed, data); + ProviderAuthorizedApplicationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderAuthorizedApplicationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderMonitorSettingCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderMonitorSettingCollection.cs new file mode 100644 index 000000000000..9bef086885cd --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderMonitorSettingCollection.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ProviderHub.Samples +{ + public partial class Sample_ProviderMonitorSettingCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ProviderMonitorSettingsCreate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_Create.json + // this example is just showing the usage of "ProviderMonitorSettings_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ProviderMonitorSettingResource + ProviderMonitorSettingCollection collection = resourceGroupResource.GetProviderMonitorSettings(); + + // invoke the operation + string providerMonitorSettingName = "ContosoMonitorSetting"; + ProviderMonitorSettingData data = new ProviderMonitorSettingData(new AzureLocation("eastus")); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, providerMonitorSettingName, data); + ProviderMonitorSettingResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderMonitorSettingData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ProviderMonitorSettingsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_Get.json + // this example is just showing the usage of "ProviderMonitorSettings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ProviderMonitorSettingResource + ProviderMonitorSettingCollection collection = resourceGroupResource.GetProviderMonitorSettings(); + + // invoke the operation + string providerMonitorSettingName = "ContosoMonitorSetting"; + ProviderMonitorSettingResource result = await collection.GetAsync(providerMonitorSettingName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderMonitorSettingData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ProviderMonitorSettingsListByResourceGroup() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_ListByResourceGroup.json + // this example is just showing the usage of "ProviderMonitorSettings_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ProviderMonitorSettingResource + ProviderMonitorSettingCollection collection = resourceGroupResource.GetProviderMonitorSettings(); + + // invoke the operation and iterate over the result + await foreach (ProviderMonitorSettingResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderMonitorSettingData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ProviderMonitorSettingsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_Get.json + // this example is just showing the usage of "ProviderMonitorSettings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ProviderMonitorSettingResource + ProviderMonitorSettingCollection collection = resourceGroupResource.GetProviderMonitorSettings(); + + // invoke the operation + string providerMonitorSettingName = "ContosoMonitorSetting"; + bool result = await collection.ExistsAsync(providerMonitorSettingName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ProviderMonitorSettingsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_Get.json + // this example is just showing the usage of "ProviderMonitorSettings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ProviderMonitorSettingResource + ProviderMonitorSettingCollection collection = resourceGroupResource.GetProviderMonitorSettings(); + + // invoke the operation + string providerMonitorSettingName = "ContosoMonitorSetting"; + NullableResponse response = await collection.GetIfExistsAsync(providerMonitorSettingName); + ProviderMonitorSettingResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderMonitorSettingData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderMonitorSettingResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderMonitorSettingResource.cs new file mode 100644 index 000000000000..0800e072293c --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderMonitorSettingResource.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.ProviderHub.Samples +{ + public partial class Sample_ProviderMonitorSettingResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ProviderMonitorSettingsGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_Get.json + // this example is just showing the usage of "ProviderMonitorSettings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderMonitorSettingResource created on azure + // for more information of creating ProviderMonitorSettingResource, please refer to the document of ProviderMonitorSettingResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + string providerMonitorSettingName = "ContosoMonitorSetting"; + ResourceIdentifier providerMonitorSettingResourceId = ProviderMonitorSettingResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, providerMonitorSettingName); + ProviderMonitorSettingResource providerMonitorSetting = client.GetProviderMonitorSettingResource(providerMonitorSettingResourceId); + + // invoke the operation + ProviderMonitorSettingResource result = await providerMonitorSetting.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderMonitorSettingData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ProviderMonitorSettingsDelete() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_Delete.json + // this example is just showing the usage of "ProviderMonitorSettings_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderMonitorSettingResource created on azure + // for more information of creating ProviderMonitorSettingResource, please refer to the document of ProviderMonitorSettingResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + string providerMonitorSettingName = "ContosoMonitorSetting"; + ResourceIdentifier providerMonitorSettingResourceId = ProviderMonitorSettingResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, providerMonitorSettingName); + ProviderMonitorSettingResource providerMonitorSetting = client.GetProviderMonitorSettingResource(providerMonitorSettingResourceId); + + // invoke the operation + await providerMonitorSetting.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ProviderMonitorSettingsUpdate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_Update.json + // this example is just showing the usage of "ProviderMonitorSettings_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderMonitorSettingResource created on azure + // for more information of creating ProviderMonitorSettingResource, please refer to the document of ProviderMonitorSettingResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string resourceGroupName = "default"; + string providerMonitorSettingName = "ContosoMonitorSetting"; + ResourceIdentifier providerMonitorSettingResourceId = ProviderMonitorSettingResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, providerMonitorSettingName); + ProviderMonitorSettingResource providerMonitorSetting = client.GetProviderMonitorSettingResource(providerMonitorSettingResourceId); + + // invoke the operation + ProviderMonitorSettingResource result = await providerMonitorSetting.UpdateAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderMonitorSettingData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationCollection.cs index a64945bc83ed..6e05220eca4b 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationCollection.cs @@ -17,11 +17,114 @@ namespace Azure.ResourceManager.ProviderHub.Samples { public partial class Sample_ProviderRegistrationCollection { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DirectProviderRegistrationsCreateOrUpdate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DirectProviderRegistrations_CreateOrUpdate.json + // this example is just showing the usage of "ProviderRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ProviderRegistrationResource + ProviderRegistrationCollection collection = subscriptionResource.GetProviderRegistrations(); + + // invoke the operation + string providerNamespace = "Microsoft.Contoso"; + ProviderRegistrationData data = new ProviderRegistrationData + { + Properties = new ProviderRegistrationProperties + { + Services = {new ResourceProviderService +{ +ServiceName = "tags", +Status = ResourceProviderServiceStatus.Inactive, +}}, + ServiceName = "root", + ProviderVersion = "2.0", + ProviderType = ResourceProviderType.Internal, + Management = new ResourceProviderManagement + { + IncidentRoutingService = "Contoso Resource Provider", + IncidentRoutingTeam = "Contoso Triage", + IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + }, + Capabilities = { new ResourceProviderCapabilities("CSP_2015-05-01", ResourceProviderCapabilitiesEffect.Allow), new ResourceProviderCapabilities("CSP_MG_2017-12-01", ResourceProviderCapabilitiesEffect.Allow) }, + DstsConfiguration = new ProviderDstsConfiguration("prds-shim") + { + ServiceDnsName = "prds.sparta.azure.com", + }, + NotificationOptions = ProviderNotificationOption.EmitSpendingLimit, + ResourceHydrationAccounts = {new ResourceHydrationAccount +{ +AccountName = "classichydrationprodsn01", +SubscriptionId = "e4eae963-2d15-43e6-a097-98bd75b33edd", +}, new ResourceHydrationAccount +{ +AccountName = "classichydrationprodch01", +SubscriptionId = "69e69ecb-e69c-41d4-99b8-87dd12781067", +}}, + NotificationSubscriberSettings = {new SubscriberSetting +{ +FilterRules = {new ProviderFilterRule +{ +FilterQuery = "Resources | where event.eventType in ('Microsoft.Network/IpAddresses/write', 'Microsoft.KeyVault/vaults/move/action')", +EndpointInformation = {new ProviderEndpointInformation +{ +Endpoint = "https://userrp.azure.com/arnnotify", +EndpointType = ProviderNotificationEndpointType.Webhook, +SchemaVersion = "3.0", +}, new ProviderEndpointInformation +{ +Endpoint = "https://userrp.azure.com/arnnotify", +EndpointType = ProviderNotificationEndpointType.Eventhub, +SchemaVersion = "3.0", +}}, +}}, +}}, + ManagementGroupGlobalNotificationEndpoints = {new ResourceProviderEndpoint +{ +EndpointUri = new Uri("{your_management_group_notification_endpoint}"), +}}, + OptionalFeatures = { "Microsoft.Resources/PlatformSubscription" }, + ResourceGroupLockOptionDuringMoveBlockActionVerb = BlockActionVerb.Action, + ServiceClientOptionsType = ServiceClientOptionsType.DisableAutomaticDecompression, + LegacyNamespace = "legacyNamespace", + LegacyRegistrations = { "legacyRegistration" }, + CustomManifestVersion = "2.0", + }, + Kind = ProviderRegistrationKind.Direct, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, providerNamespace, data); + ProviderRegistrationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderRegistrationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ProviderRegistrationsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_CreateOrUpdate.json // this example is just showing the usage of "ProviderRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -44,6 +147,12 @@ public async Task CreateOrUpdate_ProviderRegistrationsCreateOrUpdate() { Properties = new ProviderRegistrationProperties { + Services = {new ResourceProviderService +{ +ServiceName = "tags", +Status = ResourceProviderServiceStatus.Inactive, +}}, + ServiceName = "root", ProviderVersion = "2.0", ProviderType = ResourceProviderType.Internal, Management = new ResourceProviderManagement @@ -51,8 +160,25 @@ public async Task CreateOrUpdate_ProviderRegistrationsCreateOrUpdate() IncidentRoutingService = "Contoso Resource Provider", IncidentRoutingTeam = "Contoso Triage", IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + ExpeditedRolloutSubmitters = { "SPARTA-PlatformServiceOperator" }, + ServerFailureResponseMessageType = ServerFailureResponseMessageType.OutageReporting, + ExpeditedRolloutMetadata = new ExpeditedRolloutMetadata + { + IsEnabled = false, + ExpeditedRolloutIntent = ExpeditedRolloutIntent.Hotfix, + }, + CanaryManifestOwners = { "SPARTA-PlatformServiceAdmin" }, + ProfitCenterCode = "P1234", + ProfitCenterProgramId = "1234", }, Capabilities = { new ResourceProviderCapabilities("CSP_2015-05-01", ResourceProviderCapabilitiesEffect.Allow), new ResourceProviderCapabilities("CSP_MG_2017-12-01", ResourceProviderCapabilitiesEffect.Allow) }, + CrossTenantTokenValidation = CrossTenantTokenValidation.EnsureSecureValidation, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, providerNamespace, data); @@ -69,7 +195,7 @@ public async Task CreateOrUpdate_ProviderRegistrationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ProviderRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_Get.json // this example is just showing the usage of "ProviderRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +227,7 @@ public async Task Get_ProviderRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ProviderRegistrationsList() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_List.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_List.json // this example is just showing the usage of "ProviderRegistrations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +261,7 @@ public async Task GetAll_ProviderRegistrationsList() [Ignore("Only validating compilation of examples")] public async Task Exists_ProviderRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_Get.json // this example is just showing the usage of "ProviderRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +289,7 @@ public async Task Exists_ProviderRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ProviderRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_Get.json // this example is just showing the usage of "ProviderRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationResource.cs index ce4a25f02d5a..475a670f4ebe 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ProviderRegistrationResource.cs @@ -7,6 +7,7 @@ using System; using System.Threading.Tasks; +using System.Xml; using Azure.Core; using Azure.Identity; using Azure.ResourceManager.ProviderHub.Models; @@ -20,7 +21,7 @@ public partial class Sample_ProviderRegistrationResource [Ignore("Only validating compilation of examples")] public async Task Get_ProviderRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_Get.json // this example is just showing the usage of "ProviderRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +50,7 @@ public async Task Get_ProviderRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ProviderRegistrationsDelete() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_Delete.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_Delete.json // this example is just showing the usage of "ProviderRegistrations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,11 +71,111 @@ public async Task Delete_ProviderRegistrationsDelete() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DirectProviderRegistrationsCreateOrUpdate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DirectProviderRegistrations_CreateOrUpdate.json + // this example is just showing the usage of "ProviderRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // invoke the operation + ProviderRegistrationData data = new ProviderRegistrationData + { + Properties = new ProviderRegistrationProperties + { + Services = {new ResourceProviderService +{ +ServiceName = "tags", +Status = ResourceProviderServiceStatus.Inactive, +}}, + ServiceName = "root", + ProviderVersion = "2.0", + ProviderType = ResourceProviderType.Internal, + Management = new ResourceProviderManagement + { + IncidentRoutingService = "Contoso Resource Provider", + IncidentRoutingTeam = "Contoso Triage", + IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + }, + Capabilities = { new ResourceProviderCapabilities("CSP_2015-05-01", ResourceProviderCapabilitiesEffect.Allow), new ResourceProviderCapabilities("CSP_MG_2017-12-01", ResourceProviderCapabilitiesEffect.Allow) }, + DstsConfiguration = new ProviderDstsConfiguration("prds-shim") + { + ServiceDnsName = "prds.sparta.azure.com", + }, + NotificationOptions = ProviderNotificationOption.EmitSpendingLimit, + ResourceHydrationAccounts = {new ResourceHydrationAccount +{ +AccountName = "classichydrationprodsn01", +SubscriptionId = "e4eae963-2d15-43e6-a097-98bd75b33edd", +}, new ResourceHydrationAccount +{ +AccountName = "classichydrationprodch01", +SubscriptionId = "69e69ecb-e69c-41d4-99b8-87dd12781067", +}}, + NotificationSubscriberSettings = {new SubscriberSetting +{ +FilterRules = {new ProviderFilterRule +{ +FilterQuery = "Resources | where event.eventType in ('Microsoft.Network/IpAddresses/write', 'Microsoft.KeyVault/vaults/move/action')", +EndpointInformation = {new ProviderEndpointInformation +{ +Endpoint = "https://userrp.azure.com/arnnotify", +EndpointType = ProviderNotificationEndpointType.Webhook, +SchemaVersion = "3.0", +}, new ProviderEndpointInformation +{ +Endpoint = "https://userrp.azure.com/arnnotify", +EndpointType = ProviderNotificationEndpointType.Eventhub, +SchemaVersion = "3.0", +}}, +}}, +}}, + ManagementGroupGlobalNotificationEndpoints = {new ResourceProviderEndpoint +{ +EndpointUri = new Uri("{your_management_group_notification_endpoint}"), +}}, + OptionalFeatures = { "Microsoft.Resources/PlatformSubscription" }, + ResourceGroupLockOptionDuringMoveBlockActionVerb = BlockActionVerb.Action, + ServiceClientOptionsType = ServiceClientOptionsType.DisableAutomaticDecompression, + LegacyNamespace = "legacyNamespace", + LegacyRegistrations = { "legacyRegistration" }, + CustomManifestVersion = "2.0", + }, + Kind = ProviderRegistrationKind.Direct, + }; + ArmOperation lro = await providerRegistration.UpdateAsync(WaitUntil.Completed, data); + ProviderRegistrationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderRegistrationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Update_ProviderRegistrationsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ProviderRegistrations_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderRegistrations_CreateOrUpdate.json // this example is just showing the usage of "ProviderRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,6 +195,12 @@ public async Task Update_ProviderRegistrationsCreateOrUpdate() { Properties = new ProviderRegistrationProperties { + Services = {new ResourceProviderService +{ +ServiceName = "tags", +Status = ResourceProviderServiceStatus.Inactive, +}}, + ServiceName = "root", ProviderVersion = "2.0", ProviderType = ResourceProviderType.Internal, Management = new ResourceProviderManagement @@ -101,8 +208,25 @@ public async Task Update_ProviderRegistrationsCreateOrUpdate() IncidentRoutingService = "Contoso Resource Provider", IncidentRoutingTeam = "Contoso Triage", IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + ExpeditedRolloutSubmitters = { "SPARTA-PlatformServiceOperator" }, + ServerFailureResponseMessageType = ServerFailureResponseMessageType.OutageReporting, + ExpeditedRolloutMetadata = new ExpeditedRolloutMetadata + { + IsEnabled = false, + ExpeditedRolloutIntent = ExpeditedRolloutIntent.Hotfix, + }, + CanaryManifestOwners = { "SPARTA-PlatformServiceAdmin" }, + ProfitCenterCode = "P1234", + ProfitCenterProgramId = "1234", }, Capabilities = { new ResourceProviderCapabilities("CSP_2015-05-01", ResourceProviderCapabilitiesEffect.Allow), new ResourceProviderCapabilities("CSP_MG_2017-12-01", ResourceProviderCapabilitiesEffect.Allow) }, + CrossTenantTokenValidation = CrossTenantTokenValidation.EnsureSecureValidation, }, }; ArmOperation lro = await providerRegistration.UpdateAsync(WaitUntil.Completed, data); @@ -119,7 +243,7 @@ public async Task Update_ProviderRegistrationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task GenerateManifest_GenerateManifest() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/GenerateManifest.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/GenerateManifest.json // this example is just showing the usage of "GenerateManifest" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +268,7 @@ public async Task GenerateManifest_GenerateManifest() [Ignore("Only validating compilation of examples")] public async Task CheckinManifest_CheckinManifest() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CheckinManifest.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CheckinManifest.json // this example is just showing the usage of "CheckinManifest" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,5 +289,98 @@ public async Task CheckinManifest_CheckinManifest() Console.WriteLine($"Succeeded: {result}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DeleteResourcesResourceAction_ResourceActionsDeleteResources() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceActions_DeleteResources.json + // this example is just showing the usage of "ResourceActions_DeleteResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // invoke the operation + string resourceActionName = "default"; + ResourceManagementAction properties = new ResourceManagementAction + { + Resources = {new ResourceManagementEntity(new ResourceIdentifier("/subscriptions/ab7a8701-f7ef-471a-a2f4-d0ebbf494f77/providers/Microsoft.Contoso/employee/test")) +{ +HomeTenantId = "11111111-f7ef-471a-a2f4-d0ebbf494f77", +Location = new AzureLocation("southeastasia"), +}}, + }; + await providerRegistration.DeleteResourcesResourceActionAsync(WaitUntil.Completed, resourceActionName, properties); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GenerateManifestNewRegionFrontloadRelease_NewRegionFrontloadReleaseGenerateManifest() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_GenerateManifest.json + // this example is just showing the usage of "NewRegionFrontloadRelease_GenerateManifest" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // invoke the operation + ProviderFrontloadPayload properties = new ProviderFrontloadPayload(new ProviderFrontloadPayloadProperties( + "Rollout", + "Microsoft.Contoso", + "Israel Central", + "eastus", + AvailableCheckInManifestEnvironment.Prod, + ServiceFeatureFlagAction.DoNotCreate, + new string[] { "servers" }, + new string[] { "monitors" }, + new ManifestLevelPropertyBag + { + ResourceHydrationAccounts = {new ResourceHydrationAccount +{ +AccountName = "classichydrationprodsn01", +SubscriptionId = "e4eae963-2d15-43e6-a097-98bd75b33edd", +}}, + }, + new ResourceTypeEndpointBase( + true, + new string[] { "2024-04-01-preview" }, + new Uri("https://resource-endpoint.com/"), + new string[] { "East US" }, + new string[] { "" }, + default, + XmlConvert.ToTimeSpan("PT20S"), + ProviderEndpointType.Production, + new ProviderDstsConfiguration("resourceprovider") + { + ServiceDnsName = "messaging.azure-ppe.net", + }, + "http://endpointuri/westus/skus", + "2024-04-01-preview", + new string[] { "zone1" }), + new string[] { "apiversion" })); + ResourceProviderManifest result = await providerRegistration.GenerateManifestNewRegionFrontloadReleaseAsync(properties); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_RegistrationNewRegionFrontloadReleaseCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_RegistrationNewRegionFrontloadReleaseCollection.cs new file mode 100644 index 000000000000..0f74869ecaf2 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_RegistrationNewRegionFrontloadReleaseCollection.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using System.Xml; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ProviderHub.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ProviderHub.Samples +{ + public partial class Sample_RegistrationNewRegionFrontloadReleaseCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_NewRegionFrontloadReleaseCreateOrUpdate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_CreateOrUpdate.json + // this example is just showing the usage of "NewRegionFrontloadRelease_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this RegistrationNewRegionFrontloadReleaseResource + RegistrationNewRegionFrontloadReleaseCollection collection = providerRegistration.GetRegistrationNewRegionFrontloadReleases(); + + // invoke the operation + string releaseName = "2020week10"; + ProviderFrontloadPayload properties = new ProviderFrontloadPayload(new ProviderFrontloadPayloadProperties( + "Rollout", + "Microsoft.Contoso", + "Israel Central", + "eastus", + AvailableCheckInManifestEnvironment.Prod, + ServiceFeatureFlagAction.DoNotCreate, + new string[] { "servers" }, + new string[] { "monitors" }, + new ManifestLevelPropertyBag + { + ResourceHydrationAccounts = {new ResourceHydrationAccount +{ +AccountName = "classichydrationprodsn01", +SubscriptionId = "e4eae963-2d15-43e6-a097-98bd75b33edd", +}}, + }, + new ResourceTypeEndpointBase( + true, + new string[] { "2024-04-01-preview" }, + new Uri("https://resource-endpoint.com/"), + new string[] { "East US" }, + new string[] { "" }, + default, + XmlConvert.ToTimeSpan("PT20S"), + ProviderEndpointType.Production, + new ProviderDstsConfiguration("resourceprovider") + { + ServiceDnsName = "messaging.azure-ppe.net", + }, + "http://endpointuri/westus/skus", + "2024-04-01-preview", + new string[] { "zone1" }), + new string[] { "apiversion" })); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, releaseName, properties); + RegistrationNewRegionFrontloadReleaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DefaultRolloutData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_NewRegionFrontloadReleaseGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_Get.json + // this example is just showing the usage of "NewRegionFrontloadRelease_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this RegistrationNewRegionFrontloadReleaseResource + RegistrationNewRegionFrontloadReleaseCollection collection = providerRegistration.GetRegistrationNewRegionFrontloadReleases(); + + // invoke the operation + string releaseName = "2020week10"; + RegistrationNewRegionFrontloadReleaseResource result = await collection.GetAsync(releaseName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DefaultRolloutData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_NewRegionFrontloadReleaseGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_Get.json + // this example is just showing the usage of "NewRegionFrontloadRelease_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this RegistrationNewRegionFrontloadReleaseResource + RegistrationNewRegionFrontloadReleaseCollection collection = providerRegistration.GetRegistrationNewRegionFrontloadReleases(); + + // invoke the operation + string releaseName = "2020week10"; + bool result = await collection.ExistsAsync(releaseName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_NewRegionFrontloadReleaseGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_Get.json + // this example is just showing the usage of "NewRegionFrontloadRelease_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this RegistrationNewRegionFrontloadReleaseResource + RegistrationNewRegionFrontloadReleaseCollection collection = providerRegistration.GetRegistrationNewRegionFrontloadReleases(); + + // invoke the operation + string releaseName = "2020week10"; + NullableResponse response = await collection.GetIfExistsAsync(releaseName); + RegistrationNewRegionFrontloadReleaseResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DefaultRolloutData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_RegistrationNewRegionFrontloadReleaseResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_RegistrationNewRegionFrontloadReleaseResource.cs new file mode 100644 index 000000000000..d9f8bfb80381 --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_RegistrationNewRegionFrontloadReleaseResource.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using System.Xml; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ProviderHub.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ProviderHub.Samples +{ + public partial class Sample_RegistrationNewRegionFrontloadReleaseResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_NewRegionFrontloadReleaseGet() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_Get.json + // this example is just showing the usage of "NewRegionFrontloadRelease_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RegistrationNewRegionFrontloadReleaseResource created on azure + // for more information of creating RegistrationNewRegionFrontloadReleaseResource, please refer to the document of RegistrationNewRegionFrontloadReleaseResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + string releaseName = "2020week10"; + ResourceIdentifier registrationNewRegionFrontloadReleaseResourceId = RegistrationNewRegionFrontloadReleaseResource.CreateResourceIdentifier(subscriptionId, providerNamespace, releaseName); + RegistrationNewRegionFrontloadReleaseResource registrationNewRegionFrontloadRelease = client.GetRegistrationNewRegionFrontloadReleaseResource(registrationNewRegionFrontloadReleaseResourceId); + + // invoke the operation + RegistrationNewRegionFrontloadReleaseResource result = await registrationNewRegionFrontloadRelease.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DefaultRolloutData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_NewRegionFrontloadReleaseCreateOrUpdate() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_CreateOrUpdate.json + // this example is just showing the usage of "NewRegionFrontloadRelease_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RegistrationNewRegionFrontloadReleaseResource created on azure + // for more information of creating RegistrationNewRegionFrontloadReleaseResource, please refer to the document of RegistrationNewRegionFrontloadReleaseResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + string releaseName = "2020week10"; + ResourceIdentifier registrationNewRegionFrontloadReleaseResourceId = RegistrationNewRegionFrontloadReleaseResource.CreateResourceIdentifier(subscriptionId, providerNamespace, releaseName); + RegistrationNewRegionFrontloadReleaseResource registrationNewRegionFrontloadRelease = client.GetRegistrationNewRegionFrontloadReleaseResource(registrationNewRegionFrontloadReleaseResourceId); + + // invoke the operation + ProviderFrontloadPayload properties = new ProviderFrontloadPayload(new ProviderFrontloadPayloadProperties( + "Rollout", + "Microsoft.Contoso", + "Israel Central", + "eastus", + AvailableCheckInManifestEnvironment.Prod, + ServiceFeatureFlagAction.DoNotCreate, + new string[] { "servers" }, + new string[] { "monitors" }, + new ManifestLevelPropertyBag + { + ResourceHydrationAccounts = {new ResourceHydrationAccount +{ +AccountName = "classichydrationprodsn01", +SubscriptionId = "e4eae963-2d15-43e6-a097-98bd75b33edd", +}}, + }, + new ResourceTypeEndpointBase( + true, + new string[] { "2024-04-01-preview" }, + new Uri("https://resource-endpoint.com/"), + new string[] { "East US" }, + new string[] { "" }, + default, + XmlConvert.ToTimeSpan("PT20S"), + ProviderEndpointType.Production, + new ProviderDstsConfiguration("resourceprovider") + { + ServiceDnsName = "messaging.azure-ppe.net", + }, + "http://endpointuri/westus/skus", + "2024-04-01-preview", + new string[] { "zone1" }), + new string[] { "apiversion" })); + ArmOperation lro = await registrationNewRegionFrontloadRelease.UpdateAsync(WaitUntil.Completed, properties); + RegistrationNewRegionFrontloadReleaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DefaultRolloutData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_NewRegionFrontloadReleaseStop() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/NewRegionFrontloadRelease_Stop.json + // this example is just showing the usage of "NewRegionFrontloadRelease_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RegistrationNewRegionFrontloadReleaseResource created on azure + // for more information of creating RegistrationNewRegionFrontloadReleaseResource, please refer to the document of RegistrationNewRegionFrontloadReleaseResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + string releaseName = "2020week10"; + ResourceIdentifier registrationNewRegionFrontloadReleaseResourceId = RegistrationNewRegionFrontloadReleaseResource.CreateResourceIdentifier(subscriptionId, providerNamespace, releaseName); + RegistrationNewRegionFrontloadReleaseResource registrationNewRegionFrontloadRelease = client.GetRegistrationNewRegionFrontloadReleaseResource(registrationNewRegionFrontloadReleaseResourceId); + + // invoke the operation + await registrationNewRegionFrontloadRelease.StopAsync(); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationCollection.cs index e062bc99ae64..a86492b009fe 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationCollection.cs @@ -16,11 +16,184 @@ namespace Azure.ResourceManager.ProviderHub.Samples { public partial class Sample_ResourceTypeRegistrationCollection { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DirectResourceTypeRegistrationsCreateOrUpdateJson() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DirectResourceTypeRegistrations_CreateOrUpdate.json + // this example is just showing the usage of "ResourceTypeRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProviderRegistrationResource created on azure + // for more information of creating ProviderRegistrationResource, please refer to the document of ProviderRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + ResourceIdentifier providerRegistrationResourceId = ProviderRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace); + ProviderRegistrationResource providerRegistration = client.GetProviderRegistrationResource(providerRegistrationResourceId); + + // get the collection of this ResourceTypeRegistrationResource + ResourceTypeRegistrationCollection collection = providerRegistration.GetResourceTypeRegistrations(); + + // invoke the operation + string resourceType = "employees"; + ResourceTypeRegistrationData data = new ResourceTypeRegistrationData + { + Properties = new ResourceTypeRegistrationProperties + { + RoutingType = ResourceRoutingType.Default, + AdditionalOptions = AdditionalOptionResourceTypeRegistration.ProtectedAsyncOperationPolling, + Regionality = ResourceTypeRegistrationRegionality.Regional, + Endpoints = {new ResourceTypeEndpoint +{ +ApiVersions = {"2020-06-01-preview"}, +Locations = {new AzureLocation("West US"), new AzureLocation("East US"), new AzureLocation("North Europe")}, +RequiredFeatures = {""}, +}}, + SwaggerSpecifications = {new SwaggerSpecification +{ +ApiVersions = {"2020-06-01-preview"}, +SwaggerSpecFolderUri = new Uri("https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"), +}}, + RequestHeaderOptions = new ProviderRequestHeaderOptions + { + OptOutHeaders = OptOutHeaderType.SystemDataCreatedByLastModifiedBy, + }, + ResourceConcurrencyControlOptions = +{ +["patch"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["post"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["put"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +} +}, + ResourceGraphConfiguration = new ResourceGraphConfiguration + { + IsEnabled = true, + ApiVersion = "2019-01-01", + }, + Management = new ResourceProviderManagement + { + ManifestOwners = { "SPARTA-PlatformServiceAdministrator" }, + AuthorizationOwners = { "RPAAS-PlatformServiceAdministrator" }, + IncidentRoutingService = "", + IncidentRoutingTeam = "", + IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + ResourceAccessPolicy = ResourceAccessPolicy.NotSpecified, + }, + IsNoncompliantCollectionResponseAllowed = true, + Metadata = { }, + Notifications = {new ProviderNotification +{ +NotificationType = ProviderNotificationType.SubscriptionNotification, +SkipNotifications = SkipNotification.Disabled, +}}, + TemplateDeploymentPolicy = new TemplateDeploymentPolicy(TemplateDeploymentCapability.Preflight, new TemplateDeploymentPreflightOption("ValidationRequests, DeploymentRequests")) + { + PreflightNotifications = TemplateDeploymentPreflightNotification.None, + }, + IsEmptyRoleAssignmentsAllowed = false, + PolicyExecutionType = PolicyExecutionType.BypassPolicies, + AvailabilityZonePolicy = AvailabilityZonePolicy.MultiZoned, + DstsConfiguration = new ProviderDstsConfiguration("prds-shim") + { + ServiceDnsName = "prds.sparta.azure.com", + }, + AsyncTimeoutRules = {new AsyncTimeoutRule +{ +ActionName = "Microsoft.ClassicCompute/domainNames/write", +Timeout = "PT12H", +}}, + CommonApiVersions = { "2021-01-01" }, + ApiProfiles = {new ResourceTypeRegistrationApiProfile +{ +ProfileVersion = "2018-03-01-hybrid", +ApiVersion = "2018-02-01", +}, new ResourceTypeRegistrationApiProfile +{ +ProfileVersion = "2019-03-01-hybrid", +ApiVersion = "2016-06-01", +}}, + LinkedOperationRules = { new LinkedOperationRule(LinkedOperation.CrossSubscriptionResourceMove, LinkedAction.Blocked), new LinkedOperationRule(LinkedOperation.CrossResourceGroupResourceMove, LinkedAction.Validate) }, + LegacyName = "legacyName", + LegacyNames = { "legacyName" }, + AllowedTemplateDeploymentReferenceActions = { "ListKeys", "ListSAS" }, + LegacyPolicy = new ResourceTypeRegistrationLegacyPolicy + { + DisallowedLegacyOperations = { ProviderLegacyOperation.Create }, + DisallowedConditions = {new LegacyDisallowedCondition +{ +DisallowedLegacyOperations = {ProviderLegacyOperation.Create, ProviderLegacyOperation.Delete}, +Feature = "Microsoft.RP/ArmOnlyJobCollections", +}}, + }, + ManifestLink = "https://azure.com", + CapacityRule = new ResourceTypeRegistrationCapacityRule + { + CapacityPolicy = ResourceTypeRegistrationCapacityPolicy.Restricted, + SkuAlias = "incorrectAlias", + }, + IsAddOnPlanConversionAllowed = true, + AllowedResourceNames = {new AllowedResourceName +{ +Name = "name1", +GetActionVerb = "list", +}, new AllowedResourceName +{ +Name = "name2", +}}, + ResourceCache = new ResourceTypeRegistrationResourceCache + { + IsResourceCacheEnabled = true, + ResourceCacheExpirationTimespan = "PT2M", + }, + ResourceQueryManagementFilterOption = ProviderResourceQueryFilterOption.EnableSubscriptionFilterOnTenant, + AreTagsSupported = true, + ResourceManagementOptions = new ResourceTypeRegistrationResourceManagementOptions + { + BatchProvisioningSupportSupportedOperations = new ResourceManagementSupportedOperation("Get, Delete"), + DeleteDependencies = {new ResourceTypeRegistrationDeleteDependency +{ +LinkedProperty = "properties.edgeProfile.subscription.id", +}}, + }, + GroupingTag = "groupingTag", + IsAddResourceListTargetLocationsAllowed = true, + CommonApiVersionsMergeMode = CommonApiVersionsMergeMode.Merge, + RoutingRuleHostResourceType = "servers/databases", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, resourceType, data); + ResourceTypeRegistrationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResourceTypeRegistrationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ResourceTypeRegistrationsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_CreateOrUpdate.json // this example is just showing the usage of "ResourceTypeRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,6 +218,7 @@ public async Task CreateOrUpdate_ResourceTypeRegistrationsCreateOrUpdate() Properties = new ResourceTypeRegistrationProperties { RoutingType = ResourceRoutingType.Default, + CrossTenantTokenValidation = CrossTenantTokenValidation.EnsureSecureValidation, Regionality = ResourceTypeRegistrationRegionality.Regional, Endpoints = {new ResourceTypeEndpoint { @@ -56,6 +230,52 @@ public async Task CreateOrUpdate_ResourceTypeRegistrationsCreateOrUpdate() { ApiVersions = {"2020-06-01-preview"}, SwaggerSpecFolderUri = new Uri("https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"), +}}, + RequestHeaderOptions = new ProviderRequestHeaderOptions + { + OptOutHeaders = OptOutHeaderType.SystemDataCreatedByLastModifiedBy, + }, + ResourceConcurrencyControlOptions = +{ +["patch"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["post"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["put"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +} +}, + ResourceGraphConfiguration = new ResourceGraphConfiguration + { + IsEnabled = true, + ApiVersion = "2019-01-01", + }, + Management = new ResourceProviderManagement + { + ManifestOwners = { "SPARTA-PlatformServiceAdministrator" }, + AuthorizationOwners = { "RPAAS-PlatformServiceAdministrator" }, + IncidentRoutingService = "", + IncidentRoutingTeam = "", + IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + ResourceAccessPolicy = ResourceAccessPolicy.NotSpecified, + }, + IsNoncompliantCollectionResponseAllowed = true, + Metadata = { }, + Notifications = {new ProviderNotification +{ +NotificationType = ProviderNotificationType.SubscriptionNotification, +SkipNotifications = SkipNotification.Disabled, }}, }, }; @@ -73,7 +293,7 @@ public async Task CreateOrUpdate_ResourceTypeRegistrationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ResourceTypeRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_Get.json // this example is just showing the usage of "ResourceTypeRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +326,7 @@ public async Task Get_ResourceTypeRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ResourceTypeRegistrationsListByProviderRegistration() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_ListByProviderRegistration.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_ListByProviderRegistration.json // this example is just showing the usage of "ResourceTypeRegistrations_ListByProviderRegistration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +361,7 @@ public async Task GetAll_ResourceTypeRegistrationsListByProviderRegistration() [Ignore("Only validating compilation of examples")] public async Task Exists_ResourceTypeRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_Get.json // this example is just showing the usage of "ResourceTypeRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +390,7 @@ public async Task Exists_ResourceTypeRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ResourceTypeRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_Get.json // this example is just showing the usage of "ResourceTypeRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationResource.cs index f4af002a9de7..0f95ce77c5a5 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeRegistrationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceTypeRegistrationResource [Ignore("Only validating compilation of examples")] public async Task Get_ResourceTypeRegistrationsGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_Get.json // this example is just showing the usage of "ResourceTypeRegistrations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_ResourceTypeRegistrationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ResourceTypeRegistrationsDelete() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_Delete.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_Delete.json // this example is just showing the usage of "ResourceTypeRegistrations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,11 +72,181 @@ public async Task Delete_ResourceTypeRegistrationsDelete() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DirectResourceTypeRegistrationsCreateOrUpdateJson() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DirectResourceTypeRegistrations_CreateOrUpdate.json + // this example is just showing the usage of "ResourceTypeRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceTypeRegistrationResource created on azure + // for more information of creating ResourceTypeRegistrationResource, please refer to the document of ResourceTypeRegistrationResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + string providerNamespace = "Microsoft.Contoso"; + string resourceType = "employees"; + ResourceIdentifier resourceTypeRegistrationResourceId = ResourceTypeRegistrationResource.CreateResourceIdentifier(subscriptionId, providerNamespace, resourceType); + ResourceTypeRegistrationResource resourceTypeRegistration = client.GetResourceTypeRegistrationResource(resourceTypeRegistrationResourceId); + + // invoke the operation + ResourceTypeRegistrationData data = new ResourceTypeRegistrationData + { + Properties = new ResourceTypeRegistrationProperties + { + RoutingType = ResourceRoutingType.Default, + AdditionalOptions = AdditionalOptionResourceTypeRegistration.ProtectedAsyncOperationPolling, + Regionality = ResourceTypeRegistrationRegionality.Regional, + Endpoints = {new ResourceTypeEndpoint +{ +ApiVersions = {"2020-06-01-preview"}, +Locations = {new AzureLocation("West US"), new AzureLocation("East US"), new AzureLocation("North Europe")}, +RequiredFeatures = {""}, +}}, + SwaggerSpecifications = {new SwaggerSpecification +{ +ApiVersions = {"2020-06-01-preview"}, +SwaggerSpecFolderUri = new Uri("https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"), +}}, + RequestHeaderOptions = new ProviderRequestHeaderOptions + { + OptOutHeaders = OptOutHeaderType.SystemDataCreatedByLastModifiedBy, + }, + ResourceConcurrencyControlOptions = +{ +["patch"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["post"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["put"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +} +}, + ResourceGraphConfiguration = new ResourceGraphConfiguration + { + IsEnabled = true, + ApiVersion = "2019-01-01", + }, + Management = new ResourceProviderManagement + { + ManifestOwners = { "SPARTA-PlatformServiceAdministrator" }, + AuthorizationOwners = { "RPAAS-PlatformServiceAdministrator" }, + IncidentRoutingService = "", + IncidentRoutingTeam = "", + IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + ResourceAccessPolicy = ResourceAccessPolicy.NotSpecified, + }, + IsNoncompliantCollectionResponseAllowed = true, + Metadata = { }, + Notifications = {new ProviderNotification +{ +NotificationType = ProviderNotificationType.SubscriptionNotification, +SkipNotifications = SkipNotification.Disabled, +}}, + TemplateDeploymentPolicy = new TemplateDeploymentPolicy(TemplateDeploymentCapability.Preflight, new TemplateDeploymentPreflightOption("ValidationRequests, DeploymentRequests")) + { + PreflightNotifications = TemplateDeploymentPreflightNotification.None, + }, + IsEmptyRoleAssignmentsAllowed = false, + PolicyExecutionType = PolicyExecutionType.BypassPolicies, + AvailabilityZonePolicy = AvailabilityZonePolicy.MultiZoned, + DstsConfiguration = new ProviderDstsConfiguration("prds-shim") + { + ServiceDnsName = "prds.sparta.azure.com", + }, + AsyncTimeoutRules = {new AsyncTimeoutRule +{ +ActionName = "Microsoft.ClassicCompute/domainNames/write", +Timeout = "PT12H", +}}, + CommonApiVersions = { "2021-01-01" }, + ApiProfiles = {new ResourceTypeRegistrationApiProfile +{ +ProfileVersion = "2018-03-01-hybrid", +ApiVersion = "2018-02-01", +}, new ResourceTypeRegistrationApiProfile +{ +ProfileVersion = "2019-03-01-hybrid", +ApiVersion = "2016-06-01", +}}, + LinkedOperationRules = { new LinkedOperationRule(LinkedOperation.CrossSubscriptionResourceMove, LinkedAction.Blocked), new LinkedOperationRule(LinkedOperation.CrossResourceGroupResourceMove, LinkedAction.Validate) }, + LegacyName = "legacyName", + LegacyNames = { "legacyName" }, + AllowedTemplateDeploymentReferenceActions = { "ListKeys", "ListSAS" }, + LegacyPolicy = new ResourceTypeRegistrationLegacyPolicy + { + DisallowedLegacyOperations = { ProviderLegacyOperation.Create }, + DisallowedConditions = {new LegacyDisallowedCondition +{ +DisallowedLegacyOperations = {ProviderLegacyOperation.Create, ProviderLegacyOperation.Delete}, +Feature = "Microsoft.RP/ArmOnlyJobCollections", +}}, + }, + ManifestLink = "https://azure.com", + CapacityRule = new ResourceTypeRegistrationCapacityRule + { + CapacityPolicy = ResourceTypeRegistrationCapacityPolicy.Restricted, + SkuAlias = "incorrectAlias", + }, + IsAddOnPlanConversionAllowed = true, + AllowedResourceNames = {new AllowedResourceName +{ +Name = "name1", +GetActionVerb = "list", +}, new AllowedResourceName +{ +Name = "name2", +}}, + ResourceCache = new ResourceTypeRegistrationResourceCache + { + IsResourceCacheEnabled = true, + ResourceCacheExpirationTimespan = "PT2M", + }, + ResourceQueryManagementFilterOption = ProviderResourceQueryFilterOption.EnableSubscriptionFilterOnTenant, + AreTagsSupported = true, + ResourceManagementOptions = new ResourceTypeRegistrationResourceManagementOptions + { + BatchProvisioningSupportSupportedOperations = new ResourceManagementSupportedOperation("Get, Delete"), + DeleteDependencies = {new ResourceTypeRegistrationDeleteDependency +{ +LinkedProperty = "properties.edgeProfile.subscription.id", +}}, + }, + GroupingTag = "groupingTag", + IsAddResourceListTargetLocationsAllowed = true, + CommonApiVersionsMergeMode = CommonApiVersionsMergeMode.Merge, + RoutingRuleHostResourceType = "servers/databases", + }, + }; + ArmOperation lro = await resourceTypeRegistration.UpdateAsync(WaitUntil.Completed, data); + ResourceTypeRegistrationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResourceTypeRegistrationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Update_ResourceTypeRegistrationsCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ResourceTypeRegistrations_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ResourceTypeRegistrations_CreateOrUpdate.json // this example is just showing the usage of "ResourceTypeRegistrations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,6 +268,7 @@ public async Task Update_ResourceTypeRegistrationsCreateOrUpdate() Properties = new ResourceTypeRegistrationProperties { RoutingType = ResourceRoutingType.Default, + CrossTenantTokenValidation = CrossTenantTokenValidation.EnsureSecureValidation, Regionality = ResourceTypeRegistrationRegionality.Regional, Endpoints = {new ResourceTypeEndpoint { @@ -109,6 +280,52 @@ public async Task Update_ResourceTypeRegistrationsCreateOrUpdate() { ApiVersions = {"2020-06-01-preview"}, SwaggerSpecFolderUri = new Uri("https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"), +}}, + RequestHeaderOptions = new ProviderRequestHeaderOptions + { + OptOutHeaders = OptOutHeaderType.SystemDataCreatedByLastModifiedBy, + }, + ResourceConcurrencyControlOptions = +{ +["patch"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["post"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +}, +["put"] = new ResourceConcurrencyControlOption +{ +Policy = ResourceConcurrencyPolicy.SynchronizeBeginExtension, +} +}, + ResourceGraphConfiguration = new ResourceGraphConfiguration + { + IsEnabled = true, + ApiVersion = "2019-01-01", + }, + Management = new ResourceProviderManagement + { + ManifestOwners = { "SPARTA-PlatformServiceAdministrator" }, + AuthorizationOwners = { "RPAAS-PlatformServiceAdministrator" }, + IncidentRoutingService = "", + IncidentRoutingTeam = "", + IncidentContactEmail = "helpme@contoso.com", + ServiceTreeInfos = {new ServiceTreeInfo +{ +ServiceId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +ComponentId = "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", +Readiness = ServiceTreeReadiness.InDevelopment, +}}, + ResourceAccessPolicy = ResourceAccessPolicy.NotSpecified, + }, + IsNoncompliantCollectionResponseAllowed = true, + Metadata = { }, + Notifications = {new ProviderNotification +{ +NotificationType = ProviderNotificationType.SubscriptionNotification, +SkipNotifications = SkipNotification.Disabled, }}, }, }; diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuCollection.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuCollection.cs index 0cd372c21ecf..0ff9c712736c 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuCollection.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceTypeSkuCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SkusCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdate.json // this example is just showing the usage of "Skus_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_SkusCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_SkusGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Get.json // this example is just showing the usage of "Skus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Get_SkusGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SkusListByResourceTypeRegistrations() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_ListByResourceTypeRegistrations.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_ListByResourceTypeRegistrations.json // this example is just showing the usage of "Skus_ListByResourceTypeRegistrations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task GetAll_SkusListByResourceTypeRegistrations() [Ignore("Only validating compilation of examples")] public async Task Exists_SkusGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Get.json // this example is just showing the usage of "Skus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task Exists_SkusGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SkusGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Get.json // this example is just showing the usage of "Skus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuResource.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuResource.cs index 44c40a425872..96b8f8494490 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuResource.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_ResourceTypeSkuResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceTypeSkuResource [Ignore("Only validating compilation of examples")] public async Task Get_SkusGet() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Get.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Get.json // this example is just showing the usage of "Skus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_SkusGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SkusDelete() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Delete.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Delete.json // this example is just showing the usage of "Skus_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_SkusDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SkusCreateOrUpdate() { - // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdate.json + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdate.json // this example is just showing the usage of "Skus_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..b2b1deb45d3e --- /dev/null +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ProviderHub.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetProviderMonitorSettings_ProviderMonitorSettingsListBySubscription() + { + // Generated from example definition: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ProviderMonitorSettings_ListBySubscription.json + // this example is just showing the usage of "ProviderMonitorSettings_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "ab7a8701-f7ef-471a-a2f4-d0ebbf494f77"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ProviderMonitorSettingResource item in subscriptionResource.GetProviderMonitorSettingsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProviderMonitorSettingData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +}