From 7733ffc36dd6a5ccaa9ce2b7170246b20287d49d Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Mon, 25 Nov 2024 18:00:59 +0800 Subject: [PATCH] Release 2023-03-01 for first stable release --- ...sourceManager.HybridConnectivity.net8.0.cs | 502 +---------- ...nager.HybridConnectivity.netstandard2.0.cs | 502 +---------- ...le_HybridConnectivityEndpointCollection.cs | 18 +- ...mple_HybridConnectivityEndpointResource.cs | 14 +- ...e_HybridConnectivityInventoryCollection.cs | 156 ---- ...ple_HybridConnectivityInventoryResource.cs | 48 - ...nectivityPublicCloudConnectorCollection.cs | 206 ----- ...onnectivityPublicCloudConnectorResource.cs | 174 ---- ...nectivityServiceConfigurationCollection.cs | 18 +- ...onnectivityServiceConfigurationResource.cs | 8 +- ...ectivitySolutionConfigurationCollection.cs | 190 ---- ...nnectivitySolutionConfigurationResource.cs | 138 --- ...ybridConnectivitySolutionTypeCollection.cs | 157 ---- ..._HybridConnectivitySolutionTypeResource.cs | 80 -- .../Sample_SubscriptionResourceExtensions.cs | 56 -- .../ArmHybridConnectivityModelFactory.cs | 224 ----- .../HybridConnectivityExtensions.cs | 582 +------------ .../MockableHybridConnectivityArmClient.cs | 124 +-- ...HybridConnectivityResourceGroupResource.cs | 174 ---- ...eHybridConnectivitySubscriptionResource.cs | 249 ------ .../HybridConnectivityEndpointCollection.cs | 20 +- .../HybridConnectivityEndpointResource.cs | 38 +- .../HybridConnectivityInventoryCollection.cs | 395 --------- ...ConnectivityInventoryData.Serialization.cs | 155 ---- .../HybridConnectivityInventoryData.cs | 75 -- ...ectivityInventoryResource.Serialization.cs | 26 - .../HybridConnectivityInventoryResource.cs | 170 ---- ...nectivityPublicCloudConnectorCollection.cs | 494 ----------- ...yPublicCloudConnectorData.Serialization.cs | 178 ---- ...ridConnectivityPublicCloudConnectorData.cs | 83 -- ...licCloudConnectorResource.Serialization.cs | 26 - ...onnectivityPublicCloudConnectorResource.cs | 787 ----------------- ...nectivityServiceConfigurationCollection.cs | 20 +- ...onnectivityServiceConfigurationResource.cs | 12 +- ...ectivitySolutionConfigurationCollection.cs | 487 ----------- ...SolutionConfigurationData.Serialization.cs | 155 ---- ...idConnectivitySolutionConfigurationData.cs | 75 -- ...tionConfigurationResource.Serialization.cs | 26 - ...nnectivitySolutionConfigurationResource.cs | 495 ----------- ...ybridConnectivitySolutionTypeCollection.cs | 396 --------- ...nectivitySolutionTypeData.Serialization.cs | 155 ---- .../HybridConnectivitySolutionTypeData.cs | 75 -- ...ivitySolutionTypeResource.Serialization.cs | 26 - .../HybridConnectivitySolutionTypeResource.cs | 171 ---- ...ityOperationStatusResultOperationSource.cs | 30 - ...vityPublicCloudConnectorOperationSource.cs | 38 - .../Models/AwsCloudProfile.Serialization.cs | 166 ---- .../src/Generated/Models/AwsCloudProfile.cs | 84 -- .../AwsCloudProfileUpdate.Serialization.cs | 143 --- .../Generated/Models/AwsCloudProfileUpdate.cs | 66 -- ...enerateAwsTemplateContent.Serialization.cs | 151 ---- .../Models/GenerateAwsTemplateContent.cs | 81 -- .../HybridConnectivityCloudNativeType.cs | 48 - .../Models/HybridConnectivityHostType.cs | 48 - ...tivityInventoryProperties.Serialization.cs | 207 ----- .../HybridConnectivityInventoryProperties.cs | 86 -- ...vityOperationStatusResult.Serialization.cs | 262 ------ ...HybridConnectivityOperationStatusResult.cs | 109 --- ...PublicCloudConnectorPatch.Serialization.cs | 181 ---- ...idConnectivityPublicCloudConnectorPatch.cs | 87 -- ...idConnectivityResourceProvisioningState.cs | 54 -- ...olutionConfigurationPatch.Serialization.cs | 154 ---- ...dConnectivitySolutionConfigurationPatch.cs | 71 -- ...itySolutionTypeProperties.Serialization.cs | 190 ---- ...ybridConnectivitySolutionTypeProperties.cs | 79 -- ...ventoryResourceListResult.Serialization.cs | 151 ---- .../Models/InventoryResourceListResult.cs | 80 -- ...GatewayCredentialsContent.Serialization.cs | 133 --- .../ListIngressGatewayCredentialsContent.cs | 65 -- ...cCloudConnectorListResult.Serialization.cs | 151 ---- .../Models/PublicCloudConnectorListResult.cs | 80 -- ...cCloudConnectorProperties.Serialization.cs | 164 ---- .../Models/PublicCloudConnectorProperties.cs | 89 -- ...ConnectorPropertiesUpdate.Serialization.cs | 133 --- .../PublicCloudConnectorPropertiesUpdate.cs | 75 -- ...onConfigurationListResult.Serialization.cs | 151 ---- .../Models/SolutionConfigurationListResult.cs | 80 -- ...onConfigurationProperties.Serialization.cs | 215 ----- .../Models/SolutionConfigurationProperties.cs | 96 -- ...igurationPropertiesUpdate.Serialization.cs | 155 ---- .../SolutionConfigurationPropertiesUpdate.cs | 70 -- .../Models/SolutionConfigurationStatus.cs | 57 -- ...ionTypeResourceListResult.Serialization.cs | 151 ---- .../Models/SolutionTypeResourceListResult.cs | 80 -- .../SolutionTypeSettings.Serialization.cs | 152 ---- .../Generated/Models/SolutionTypeSettings.cs | 80 -- ...ionTypeSettingsProperties.Serialization.cs | 183 ---- .../Models/SolutionTypeSettingsProperties.cs | 111 --- .../RestOperations/EndpointsRestOperations.cs | 23 +- .../GenerateAwsTemplateRestOperations.cs | 122 --- .../RestOperations/InventoryRestOperations.cs | 301 ------- .../PublicCloudConnectorsRestOperations.cs | 817 ------------------ .../ServiceConfigurationsRestOperations.cs | 2 +- .../SolutionConfigurationsRestOperations.cs | 617 ------------- .../SolutionTypesRestOperations.cs | 455 ---------- .../src/autorest.md | 30 +- .../HybridConnectivityManagementTestBase.cs | 23 +- ...ridConnectivityPublicCloudConnectorTest.cs | 165 ++-- 98 files changed, 199 insertions(+), 15553 deletions(-) delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityResourceGroupResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivitySubscriptionResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeCollection.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityOperationStatusResultOperationSource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityPublicCloudConnectorOperationSource.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityCloudNativeType.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityHostType.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityResourceProvisioningState.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationStatus.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.Serialization.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/GenerateAwsTemplateRestOperations.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/InventoryRestOperations.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/PublicCloudConnectorsRestOperations.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionConfigurationsRestOperations.cs delete mode 100644 sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionTypesRestOperations.cs diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.net8.0.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.net8.0.cs index 2381ca31ecc74..d264bf82bc00b 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.net8.0.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.net8.0.cs @@ -44,8 +44,8 @@ protected HybridConnectivityEndpointResource() { } public virtual Azure.Response GetHybridConnectivityServiceConfiguration(string serviceConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridConnectivityServiceConfigurationAsync(string serviceConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationCollection GetHybridConnectivityServiceConfigurations() { throw null; } - public virtual Azure.Response GetIngressGatewayCredentials(Azure.ResourceManager.HybridConnectivity.Models.ListIngressGatewayCredentialsContent content = null, long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIngressGatewayCredentialsAsync(Azure.ResourceManager.HybridConnectivity.Models.ListIngressGatewayCredentialsContent content = null, long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetIngressGatewayCredentials(long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIngressGatewayCredentialsAsync(long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedProxyDetails(Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedProxyDetailsAsync(Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -62,122 +62,7 @@ public static partial class HybridConnectivityExtensions public static System.Threading.Tasks.Task> GetHybridConnectivityEndpointAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointResource GetHybridConnectivityEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointCollection GetHybridConnectivityEndpoints(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryResource GetHybridConnectivityInventoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetHybridConnectivityPublicCloudConnector(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHybridConnectivityPublicCloudConnectorAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorResource GetHybridConnectivityPublicCloudConnectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorCollection GetHybridConnectivityPublicCloudConnectors(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetHybridConnectivityPublicCloudConnectors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetHybridConnectivityPublicCloudConnectorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationResource GetHybridConnectivityServiceConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetHybridConnectivitySolutionConfiguration(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHybridConnectivitySolutionConfigurationAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationResource GetHybridConnectivitySolutionConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationCollection GetHybridConnectivitySolutionConfigurations(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } - public static Azure.Response GetHybridConnectivitySolutionType(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHybridConnectivitySolutionTypeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeResource GetHybridConnectivitySolutionTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeCollection GetHybridConnectivitySolutionTypes(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetHybridConnectivitySolutionTypes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetHybridConnectivitySolutionTypesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response PostGenerateAwsTemplate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> PostGenerateAwsTemplateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HybridConnectivityInventoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivityInventoryCollection() { } - public virtual Azure.Response Exists(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string inventoryId, 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 inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string inventoryId, 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 HybridConnectivityInventoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityInventoryData() { } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryData 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.HybridConnectivity.HybridConnectivityInventoryData 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 HybridConnectivityInventoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivityInventoryResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string solutionConfiguration, string inventoryId) { 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.HybridConnectivity.HybridConnectivityInventoryData 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.HybridConnectivity.HybridConnectivityInventoryData 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 HybridConnectivityPublicCloudConnectorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivityPublicCloudConnectorCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string publicCloudConnector, Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string publicCloudConnector, Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string publicCloudConnector, 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 publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string publicCloudConnector, 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 HybridConnectivityPublicCloudConnectorData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityPublicCloudConnectorData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.HybridConnectivity.Models.PublicCloudConnectorProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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 HybridConnectivityPublicCloudConnectorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivityPublicCloudConnectorResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string publicCloudConnector) { 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 RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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 TestPermissions(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> TestPermissionsAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class HybridConnectivityServiceConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -229,99 +114,6 @@ protected HybridConnectivityServiceConfigurationResource() { } public virtual Azure.Response Update(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class HybridConnectivitySolutionConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivitySolutionConfigurationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionConfiguration, Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionConfiguration, Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string solutionConfiguration, 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 solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionConfiguration, 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 HybridConnectivitySolutionConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionConfigurationData() { } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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 HybridConnectivitySolutionConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivitySolutionConfigurationResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string solutionConfiguration) { 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.ResourceManager.HybridConnectivity.HybridConnectivityInventoryCollection GetHybridConnectivityInventories() { throw null; } - public virtual Azure.Response GetHybridConnectivityInventory(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivityInventoryAsync(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SyncNow(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SyncNowAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HybridConnectivitySolutionTypeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivitySolutionTypeCollection() { } - public virtual Azure.Response Exists(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string solutionType, 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 solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionType, 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 HybridConnectivitySolutionTypeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionTypeData() { } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeData 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.HybridConnectivity.HybridConnectivitySolutionTypeData 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 HybridConnectivitySolutionTypeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivitySolutionTypeResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionType) { 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.HybridConnectivity.HybridConnectivitySolutionTypeData 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.HybridConnectivity.HybridConnectivitySolutionTypeData 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; } - } } namespace Azure.ResourceManager.HybridConnectivity.Mocking { @@ -332,102 +124,21 @@ protected MockableHybridConnectivityArmClient() { } public virtual System.Threading.Tasks.Task> GetHybridConnectivityEndpointAsync(Azure.Core.ResourceIdentifier scope, string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointResource GetHybridConnectivityEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointCollection GetHybridConnectivityEndpoints(Azure.Core.ResourceIdentifier scope) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryResource GetHybridConnectivityInventoryResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorResource GetHybridConnectivityPublicCloudConnectorResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationResource GetHybridConnectivityServiceConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.Response GetHybridConnectivitySolutionConfiguration(Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivitySolutionConfigurationAsync(Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationResource GetHybridConnectivitySolutionConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationCollection GetHybridConnectivitySolutionConfigurations(Azure.Core.ResourceIdentifier scope) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeResource GetHybridConnectivitySolutionTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class MockableHybridConnectivityResourceGroupResource : Azure.ResourceManager.ArmResource - { - protected MockableHybridConnectivityResourceGroupResource() { } - public virtual Azure.Response GetHybridConnectivityPublicCloudConnector(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivityPublicCloudConnectorAsync(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorCollection GetHybridConnectivityPublicCloudConnectors() { throw null; } - public virtual Azure.Response GetHybridConnectivitySolutionType(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivitySolutionTypeAsync(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeCollection GetHybridConnectivitySolutionTypes() { throw null; } - } - public partial class MockableHybridConnectivitySubscriptionResource : Azure.ResourceManager.ArmResource - { - protected MockableHybridConnectivitySubscriptionResource() { } - public virtual Azure.Pageable GetHybridConnectivityPublicCloudConnectors(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetHybridConnectivityPublicCloudConnectorsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetHybridConnectivitySolutionTypes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetHybridConnectivitySolutionTypesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PostGenerateAwsTemplate(Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PostGenerateAwsTemplateAsync(Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.HybridConnectivity.Models { public static partial class ArmHybridConnectivityModelFactory { - public static Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent GenerateAwsTemplateContent(Azure.Core.ResourceIdentifier connectorId = null, System.Collections.Generic.IEnumerable solutionTypes = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointData HybridConnectivityEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointProperties HybridConnectivityEndpointProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointType endpointType = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointType), Azure.Core.ResourceIdentifier resourceId = null, string provisioningState = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryData HybridConnectivityInventoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties HybridConnectivityInventoryProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType? cloudNativeType = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType?), string cloudNativeResourceId = null, Azure.Core.ResourceIdentifier azureResourceId = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? status = default(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus?), string statusDetails = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityOperationStatusResult HybridConnectivityOperationStatusResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData HybridConnectivityPublicCloudConnectorData(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.HybridConnectivity.Models.PublicCloudConnectorProperties properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch HybridConnectivityPublicCloudConnectorPatch(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.IEnumerable awsCloudExcludedAccounts = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationData HybridConnectivityServiceConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName? serviceName = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName?), Azure.Core.ResourceIdentifier resourceId = null, long? port = default(long?), Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData HybridConnectivitySolutionConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch HybridConnectivitySolutionConfigurationPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeData HybridConnectivitySolutionTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.IngressGatewayAsset IngressGatewayAsset(string hostname = null, System.Guid? serverId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), string namespaceName = null, string namespaceNameSuffix = null, string hybridConnectionName = null, string accessKey = null, long? expiresOn = default(long?), string serviceConfigurationToken = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyAsset ManagedProxyAsset(string proxy = null, long expiresOn = (long)0) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyContent ManagedProxyContent(string service = null, string hostname = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName? serviceName = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.PublicCloudConnectorProperties PublicCloudConnectorProperties(Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile awsCloudProfile = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType hostType = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType), Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState?), System.Guid? connectorPrimaryIdentifier = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties SolutionConfigurationProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState?), string solutionType = null, System.Collections.Generic.IDictionary solutionSettings = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? status = default(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus?), string statusDetails = null, System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionTypeSettings SolutionTypeSettings(string solutionType = null, System.Collections.Generic.IDictionary solutionSettings = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.TargetResourceEndpointAccess TargetResourceEndpointAccess(string namespaceName = null, string namespaceNameSuffix = null, string hybridConnectionName = null, string accessKey = null, long? expiresOn = default(long?), string serviceConfigurationToken = null) { throw null; } } - public partial class AwsCloudProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AwsCloudProfile(string accountId) { } - public string AccountId { get { throw null; } set { } } - public System.Collections.Generic.IList ExcludedAccounts { get { throw null; } } - public bool? IsOrganizationalAccount { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile 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.HybridConnectivity.Models.AwsCloudProfile 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 GenerateAwsTemplateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public GenerateAwsTemplateContent(Azure.Core.ResourceIdentifier connectorId) { } - public Azure.Core.ResourceIdentifier ConnectorId { get { throw null; } } - public System.Collections.Generic.IList SolutionTypes { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent 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.HybridConnectivity.Models.GenerateAwsTemplateContent 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 HybridConnectivityCloudNativeType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridConnectivityCloudNativeType(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType Ec2 { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType 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.HybridConnectivity.Models.HybridConnectivityCloudNativeType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType right) { throw null; } - public override string ToString() { throw null; } - } public partial class HybridConnectivityEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridConnectivityEndpointProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointType endpointType) { } @@ -460,58 +171,6 @@ 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 HybridConnectivityHostType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridConnectivityHostType(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType AWS { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType 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.HybridConnectivity.Models.HybridConnectivityHostType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class HybridConnectivityInventoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityInventoryProperties() { } - public Azure.Core.ResourceIdentifier AzureResourceId { get { throw null; } set { } } - public string CloudNativeResourceId { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType? CloudNativeType { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? Status { get { throw null; } set { } } - public string StatusDetails { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties 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.HybridConnectivity.Models.HybridConnectivityInventoryProperties 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 HybridConnectivityOperationStatusResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal HybridConnectivityOperationStatusResult() { } - public System.DateTimeOffset? EndOn { get { throw null; } } - public Azure.ResponseError Error { get { throw null; } } - public Azure.Core.ResourceIdentifier Id { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Operations { get { throw null; } } - public float? PercentComplete { get { throw null; } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } - public System.DateTimeOffset? StartOn { 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.HybridConnectivity.Models.HybridConnectivityOperationStatusResult 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.HybridConnectivity.Models.HybridConnectivityOperationStatusResult 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 HybridConnectivityProvisioningState : System.IEquatable { private readonly object _dummy; @@ -532,37 +191,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class HybridConnectivityPublicCloudConnectorPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityPublicCloudConnectorPatch() { } - public System.Collections.Generic.IList AwsCloudExcludedAccounts { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch 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.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch 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 HybridConnectivityResourceProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridConnectivityResourceProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState 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.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } public partial class HybridConnectivityServiceConfigurationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridConnectivityServiceConfigurationPatch() { } @@ -592,31 +220,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName right) { throw null; } public override string ToString() { throw null; } } - public partial class HybridConnectivitySolutionConfigurationPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionConfigurationPatch() { } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch 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.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch 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 HybridConnectivitySolutionTypeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionTypeProperties() { } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IList SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } set { } } - public System.Collections.Generic.IList SupportedAzureRegions { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties 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.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties 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 IngressGatewayAsset : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal IngressGatewayAsset() { } @@ -647,17 +250,6 @@ 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 ListIngressGatewayCredentialsContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ListIngressGatewayCredentialsContent() { } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName? ServiceName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.ListIngressGatewayCredentialsContent 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.HybridConnectivity.Models.ListIngressGatewayCredentialsContent 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 ManagedProxyAsset : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ManagedProxyAsset() { } @@ -683,96 +275,6 @@ 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 PublicCloudConnectorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PublicCloudConnectorProperties(Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile awsCloudProfile, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType hostType) { } - public Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile AwsCloudProfile { get { throw null; } set { } } - public System.Guid? ConnectorPrimaryIdentifier { get { throw null; } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType HostType { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.PublicCloudConnectorProperties 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.HybridConnectivity.Models.PublicCloudConnectorProperties 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 SolutionConfigurationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionConfigurationProperties(string solutionType) { } - public System.DateTimeOffset? LastSyncOn { get { throw null; } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IDictionary SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? Status { get { throw null; } } - public string StatusDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties 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.HybridConnectivity.Models.SolutionConfigurationProperties 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 SolutionConfigurationPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionConfigurationPropertiesUpdate() { } - public System.Collections.Generic.IDictionary SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate 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.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate 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 SolutionConfigurationStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SolutionConfigurationStatus(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus Completed { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus Failed { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus InProgress { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus New { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus 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.HybridConnectivity.Models.SolutionConfigurationStatus left, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus left, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class SolutionTypeSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionTypeSettings(string solutionType) { } - public System.Collections.Generic.IDictionary SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionTypeSettings 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.HybridConnectivity.Models.SolutionTypeSettings 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 SolutionTypeSettingsProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionTypeSettingsProperties(string name, string displayName, string solutionTypeSettingsPropertiesType, string description, System.Collections.Generic.IEnumerable allowedValues, string defaultValue) { } - public System.Collections.Generic.IList AllowedValues { get { throw null; } } - public string DefaultValue { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string SolutionTypeSettingsPropertiesType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionTypeSettingsProperties 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.HybridConnectivity.Models.SolutionTypeSettingsProperties 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 TargetResourceEndpointAccess : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal TargetResourceEndpointAccess() { } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.netstandard2.0.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.netstandard2.0.cs index 2381ca31ecc74..d264bf82bc00b 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.netstandard2.0.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/api/Azure.ResourceManager.HybridConnectivity.netstandard2.0.cs @@ -44,8 +44,8 @@ protected HybridConnectivityEndpointResource() { } public virtual Azure.Response GetHybridConnectivityServiceConfiguration(string serviceConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridConnectivityServiceConfigurationAsync(string serviceConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationCollection GetHybridConnectivityServiceConfigurations() { throw null; } - public virtual Azure.Response GetIngressGatewayCredentials(Azure.ResourceManager.HybridConnectivity.Models.ListIngressGatewayCredentialsContent content = null, long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIngressGatewayCredentialsAsync(Azure.ResourceManager.HybridConnectivity.Models.ListIngressGatewayCredentialsContent content = null, long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetIngressGatewayCredentials(long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIngressGatewayCredentialsAsync(long? expiresin = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedProxyDetails(Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedProxyDetailsAsync(Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -62,122 +62,7 @@ public static partial class HybridConnectivityExtensions public static System.Threading.Tasks.Task> GetHybridConnectivityEndpointAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointResource GetHybridConnectivityEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointCollection GetHybridConnectivityEndpoints(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryResource GetHybridConnectivityInventoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetHybridConnectivityPublicCloudConnector(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHybridConnectivityPublicCloudConnectorAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorResource GetHybridConnectivityPublicCloudConnectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorCollection GetHybridConnectivityPublicCloudConnectors(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetHybridConnectivityPublicCloudConnectors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetHybridConnectivityPublicCloudConnectorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationResource GetHybridConnectivityServiceConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetHybridConnectivitySolutionConfiguration(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHybridConnectivitySolutionConfigurationAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationResource GetHybridConnectivitySolutionConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationCollection GetHybridConnectivitySolutionConfigurations(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } - public static Azure.Response GetHybridConnectivitySolutionType(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHybridConnectivitySolutionTypeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeResource GetHybridConnectivitySolutionTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeCollection GetHybridConnectivitySolutionTypes(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetHybridConnectivitySolutionTypes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetHybridConnectivitySolutionTypesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response PostGenerateAwsTemplate(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> PostGenerateAwsTemplateAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HybridConnectivityInventoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivityInventoryCollection() { } - public virtual Azure.Response Exists(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string inventoryId, 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 inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string inventoryId, 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 HybridConnectivityInventoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityInventoryData() { } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryData 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.HybridConnectivity.HybridConnectivityInventoryData 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 HybridConnectivityInventoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivityInventoryResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string solutionConfiguration, string inventoryId) { 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.HybridConnectivity.HybridConnectivityInventoryData 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.HybridConnectivity.HybridConnectivityInventoryData 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 HybridConnectivityPublicCloudConnectorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivityPublicCloudConnectorCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string publicCloudConnector, Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string publicCloudConnector, Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string publicCloudConnector, 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 publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string publicCloudConnector, 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 HybridConnectivityPublicCloudConnectorData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityPublicCloudConnectorData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.HybridConnectivity.Models.PublicCloudConnectorProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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 HybridConnectivityPublicCloudConnectorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivityPublicCloudConnectorResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string publicCloudConnector) { 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 RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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.HybridConnectivity.HybridConnectivityPublicCloudConnectorData 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 TestPermissions(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> TestPermissionsAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class HybridConnectivityServiceConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -229,99 +114,6 @@ protected HybridConnectivityServiceConfigurationResource() { } public virtual Azure.Response Update(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class HybridConnectivitySolutionConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivitySolutionConfigurationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionConfiguration, Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionConfiguration, Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string solutionConfiguration, 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 solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionConfiguration, 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 HybridConnectivitySolutionConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionConfigurationData() { } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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 HybridConnectivitySolutionConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivitySolutionConfigurationResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string resourceUri, string solutionConfiguration) { 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.ResourceManager.HybridConnectivity.HybridConnectivityInventoryCollection GetHybridConnectivityInventories() { throw null; } - public virtual Azure.Response GetHybridConnectivityInventory(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivityInventoryAsync(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SyncNow(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SyncNowAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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.HybridConnectivity.HybridConnectivitySolutionConfigurationData 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(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HybridConnectivitySolutionTypeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HybridConnectivitySolutionTypeCollection() { } - public virtual Azure.Response Exists(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string solutionType, 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 solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string solutionType, 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 HybridConnectivitySolutionTypeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionTypeData() { } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeData 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.HybridConnectivity.HybridConnectivitySolutionTypeData 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 HybridConnectivitySolutionTypeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HybridConnectivitySolutionTypeResource() { } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionType) { 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.HybridConnectivity.HybridConnectivitySolutionTypeData 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.HybridConnectivity.HybridConnectivitySolutionTypeData 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; } - } } namespace Azure.ResourceManager.HybridConnectivity.Mocking { @@ -332,102 +124,21 @@ protected MockableHybridConnectivityArmClient() { } public virtual System.Threading.Tasks.Task> GetHybridConnectivityEndpointAsync(Azure.Core.ResourceIdentifier scope, string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointResource GetHybridConnectivityEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointCollection GetHybridConnectivityEndpoints(Azure.Core.ResourceIdentifier scope) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryResource GetHybridConnectivityInventoryResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorResource GetHybridConnectivityPublicCloudConnectorResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationResource GetHybridConnectivityServiceConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.Response GetHybridConnectivitySolutionConfiguration(Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivitySolutionConfigurationAsync(Azure.Core.ResourceIdentifier scope, string solutionConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationResource GetHybridConnectivitySolutionConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationCollection GetHybridConnectivitySolutionConfigurations(Azure.Core.ResourceIdentifier scope) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeResource GetHybridConnectivitySolutionTypeResource(Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class MockableHybridConnectivityResourceGroupResource : Azure.ResourceManager.ArmResource - { - protected MockableHybridConnectivityResourceGroupResource() { } - public virtual Azure.Response GetHybridConnectivityPublicCloudConnector(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivityPublicCloudConnectorAsync(string publicCloudConnector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorCollection GetHybridConnectivityPublicCloudConnectors() { throw null; } - public virtual Azure.Response GetHybridConnectivitySolutionType(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHybridConnectivitySolutionTypeAsync(string solutionType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeCollection GetHybridConnectivitySolutionTypes() { throw null; } - } - public partial class MockableHybridConnectivitySubscriptionResource : Azure.ResourceManager.ArmResource - { - protected MockableHybridConnectivitySubscriptionResource() { } - public virtual Azure.Pageable GetHybridConnectivityPublicCloudConnectors(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetHybridConnectivityPublicCloudConnectorsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetHybridConnectivitySolutionTypes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetHybridConnectivitySolutionTypesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PostGenerateAwsTemplate(Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PostGenerateAwsTemplateAsync(Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.HybridConnectivity.Models { public static partial class ArmHybridConnectivityModelFactory { - public static Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent GenerateAwsTemplateContent(Azure.Core.ResourceIdentifier connectorId = null, System.Collections.Generic.IEnumerable solutionTypes = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityEndpointData HybridConnectivityEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointProperties HybridConnectivityEndpointProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointType endpointType = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointType), Azure.Core.ResourceIdentifier resourceId = null, string provisioningState = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityInventoryData HybridConnectivityInventoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties HybridConnectivityInventoryProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType? cloudNativeType = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType?), string cloudNativeResourceId = null, Azure.Core.ResourceIdentifier azureResourceId = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? status = default(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus?), string statusDetails = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityOperationStatusResult HybridConnectivityOperationStatusResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityPublicCloudConnectorData HybridConnectivityPublicCloudConnectorData(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.HybridConnectivity.Models.PublicCloudConnectorProperties properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch HybridConnectivityPublicCloudConnectorPatch(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.IEnumerable awsCloudExcludedAccounts = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.HybridConnectivityServiceConfigurationData HybridConnectivityServiceConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName? serviceName = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName?), Azure.Core.ResourceIdentifier resourceId = null, long? port = default(long?), Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionConfigurationData HybridConnectivitySolutionConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch HybridConnectivitySolutionConfigurationPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate properties = null) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.HybridConnectivitySolutionTypeData HybridConnectivitySolutionTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.IngressGatewayAsset IngressGatewayAsset(string hostname = null, System.Guid? serverId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), string namespaceName = null, string namespaceNameSuffix = null, string hybridConnectionName = null, string accessKey = null, long? expiresOn = default(long?), string serviceConfigurationToken = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyAsset ManagedProxyAsset(string proxy = null, long expiresOn = (long)0) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.ManagedProxyContent ManagedProxyContent(string service = null, string hostname = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName? serviceName = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.PublicCloudConnectorProperties PublicCloudConnectorProperties(Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile awsCloudProfile = null, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType hostType = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType), Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState?), System.Guid? connectorPrimaryIdentifier = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties SolutionConfigurationProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? provisioningState = default(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState?), string solutionType = null, System.Collections.Generic.IDictionary solutionSettings = null, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? status = default(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus?), string statusDetails = null, System.DateTimeOffset? lastSyncOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionTypeSettings SolutionTypeSettings(string solutionType = null, System.Collections.Generic.IDictionary solutionSettings = null) { throw null; } public static Azure.ResourceManager.HybridConnectivity.Models.TargetResourceEndpointAccess TargetResourceEndpointAccess(string namespaceName = null, string namespaceNameSuffix = null, string hybridConnectionName = null, string accessKey = null, long? expiresOn = default(long?), string serviceConfigurationToken = null) { throw null; } } - public partial class AwsCloudProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AwsCloudProfile(string accountId) { } - public string AccountId { get { throw null; } set { } } - public System.Collections.Generic.IList ExcludedAccounts { get { throw null; } } - public bool? IsOrganizationalAccount { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile 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.HybridConnectivity.Models.AwsCloudProfile 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 GenerateAwsTemplateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public GenerateAwsTemplateContent(Azure.Core.ResourceIdentifier connectorId) { } - public Azure.Core.ResourceIdentifier ConnectorId { get { throw null; } } - public System.Collections.Generic.IList SolutionTypes { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.GenerateAwsTemplateContent 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.HybridConnectivity.Models.GenerateAwsTemplateContent 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 HybridConnectivityCloudNativeType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridConnectivityCloudNativeType(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType Ec2 { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType 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.HybridConnectivity.Models.HybridConnectivityCloudNativeType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType right) { throw null; } - public override string ToString() { throw null; } - } public partial class HybridConnectivityEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridConnectivityEndpointProperties(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityEndpointType endpointType) { } @@ -460,58 +171,6 @@ 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 HybridConnectivityHostType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridConnectivityHostType(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType AWS { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType 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.HybridConnectivity.Models.HybridConnectivityHostType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class HybridConnectivityInventoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityInventoryProperties() { } - public Azure.Core.ResourceIdentifier AzureResourceId { get { throw null; } set { } } - public string CloudNativeResourceId { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityCloudNativeType? CloudNativeType { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? Status { get { throw null; } set { } } - public string StatusDetails { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityInventoryProperties 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.HybridConnectivity.Models.HybridConnectivityInventoryProperties 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 HybridConnectivityOperationStatusResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal HybridConnectivityOperationStatusResult() { } - public System.DateTimeOffset? EndOn { get { throw null; } } - public Azure.ResponseError Error { get { throw null; } } - public Azure.Core.ResourceIdentifier Id { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Operations { get { throw null; } } - public float? PercentComplete { get { throw null; } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } - public System.DateTimeOffset? StartOn { 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.HybridConnectivity.Models.HybridConnectivityOperationStatusResult 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.HybridConnectivity.Models.HybridConnectivityOperationStatusResult 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 HybridConnectivityProvisioningState : System.IEquatable { private readonly object _dummy; @@ -532,37 +191,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class HybridConnectivityPublicCloudConnectorPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivityPublicCloudConnectorPatch() { } - public System.Collections.Generic.IList AwsCloudExcludedAccounts { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch 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.HybridConnectivity.Models.HybridConnectivityPublicCloudConnectorPatch 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 HybridConnectivityResourceProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridConnectivityResourceProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState 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.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } public partial class HybridConnectivityServiceConfigurationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridConnectivityServiceConfigurationPatch() { } @@ -592,31 +220,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName left, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName right) { throw null; } public override string ToString() { throw null; } } - public partial class HybridConnectivitySolutionConfigurationPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionConfigurationPatch() { } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch 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.HybridConnectivity.Models.HybridConnectivitySolutionConfigurationPatch 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 HybridConnectivitySolutionTypeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public HybridConnectivitySolutionTypeProperties() { } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IList SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } set { } } - public System.Collections.Generic.IList SupportedAzureRegions { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties 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.HybridConnectivity.Models.HybridConnectivitySolutionTypeProperties 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 IngressGatewayAsset : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal IngressGatewayAsset() { } @@ -647,17 +250,6 @@ 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 ListIngressGatewayCredentialsContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ListIngressGatewayCredentialsContent() { } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityServiceName? ServiceName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.ListIngressGatewayCredentialsContent 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.HybridConnectivity.Models.ListIngressGatewayCredentialsContent 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 ManagedProxyAsset : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ManagedProxyAsset() { } @@ -683,96 +275,6 @@ 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 PublicCloudConnectorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PublicCloudConnectorProperties(Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile awsCloudProfile, Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType hostType) { } - public Azure.ResourceManager.HybridConnectivity.Models.AwsCloudProfile AwsCloudProfile { get { throw null; } set { } } - public System.Guid? ConnectorPrimaryIdentifier { get { throw null; } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityHostType HostType { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.PublicCloudConnectorProperties 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.HybridConnectivity.Models.PublicCloudConnectorProperties 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 SolutionConfigurationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionConfigurationProperties(string solutionType) { } - public System.DateTimeOffset? LastSyncOn { get { throw null; } } - public Azure.ResourceManager.HybridConnectivity.Models.HybridConnectivityResourceProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IDictionary SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } set { } } - public Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus? Status { get { throw null; } } - public string StatusDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationProperties 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.HybridConnectivity.Models.SolutionConfigurationProperties 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 SolutionConfigurationPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionConfigurationPropertiesUpdate() { } - public System.Collections.Generic.IDictionary SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate 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.HybridConnectivity.Models.SolutionConfigurationPropertiesUpdate 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 SolutionConfigurationStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SolutionConfigurationStatus(string value) { throw null; } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus Completed { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus Failed { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus InProgress { get { throw null; } } - public static Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus New { get { throw null; } } - public bool Equals(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus 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.HybridConnectivity.Models.SolutionConfigurationStatus left, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus left, Azure.ResourceManager.HybridConnectivity.Models.SolutionConfigurationStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class SolutionTypeSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionTypeSettings(string solutionType) { } - public System.Collections.Generic.IDictionary SolutionSettings { get { throw null; } } - public string SolutionType { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionTypeSettings 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.HybridConnectivity.Models.SolutionTypeSettings 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 SolutionTypeSettingsProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SolutionTypeSettingsProperties(string name, string displayName, string solutionTypeSettingsPropertiesType, string description, System.Collections.Generic.IEnumerable allowedValues, string defaultValue) { } - public System.Collections.Generic.IList AllowedValues { get { throw null; } } - public string DefaultValue { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string SolutionTypeSettingsPropertiesType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.HybridConnectivity.Models.SolutionTypeSettingsProperties 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.HybridConnectivity.Models.SolutionTypeSettingsProperties 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 TargetResourceEndpointAccess : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal TargetResourceEndpointAccess() { } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs index b9d640cba4d98..5072a9763fdc4 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridConnectivityEndpointCollection [Ignore("Only validating compilation of examples")] public async Task GetAll_HybridConnectivityEndpointsGet() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsList.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsList.json // this example is just showing the usage of "Endpoints_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 @@ -53,7 +53,7 @@ public async Task GetAll_HybridConnectivityEndpointsGet() [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsGetCustom() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetCustom.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetCustom.json // this example is just showing the usage of "Endpoints_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 @@ -84,7 +84,7 @@ public async Task Get_HybridConnectivityEndpointsGetCustom() [Ignore("Only validating compilation of examples")] public async Task Exists_HybridConnectivityEndpointsGetCustom() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetCustom.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetCustom.json // this example is just showing the usage of "Endpoints_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 @@ -111,7 +111,7 @@ public async Task Exists_HybridConnectivityEndpointsGetCustom() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_HybridConnectivityEndpointsGetCustom() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetCustom.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetCustom.json // this example is just showing the usage of "Endpoints_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 @@ -150,7 +150,7 @@ public async Task GetIfExists_HybridConnectivityEndpointsGetCustom() [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsGetDefault() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetDefault.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetDefault.json // this example is just showing the usage of "Endpoints_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 @@ -181,7 +181,7 @@ public async Task Get_HybridConnectivityEndpointsGetDefault() [Ignore("Only validating compilation of examples")] public async Task Exists_HybridConnectivityEndpointsGetDefault() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetDefault.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetDefault.json // this example is just showing the usage of "Endpoints_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 @@ -208,7 +208,7 @@ public async Task Exists_HybridConnectivityEndpointsGetDefault() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_HybridConnectivityEndpointsGetDefault() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetDefault.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetDefault.json // this example is just showing the usage of "Endpoints_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 @@ -247,7 +247,7 @@ public async Task GetIfExists_HybridConnectivityEndpointsGetDefault() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_HybridConnectivityEndpointsPutCustom() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsPutCustom.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPutCustom.json // this example is just showing the usage of "Endpoints_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 @@ -286,7 +286,7 @@ public async Task CreateOrUpdate_HybridConnectivityEndpointsPutCustom() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_HybridConnectivityEndpointsPutDefault() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsPutDefault.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPutDefault.json // this example is just showing the usage of "Endpoints_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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs index de563a34bf244..f6b82819bd574 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityEndpointResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridConnectivityEndpointResource [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsGetCustom() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetCustom.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetCustom.json // this example is just showing the usage of "Endpoints_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 +49,7 @@ public async Task Get_HybridConnectivityEndpointsGetCustom() [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsGetDefault() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsGetDefault.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsGetDefault.json // this example is just showing the usage of "Endpoints_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 @@ -78,7 +78,7 @@ public async Task Get_HybridConnectivityEndpointsGetDefault() [Ignore("Only validating compilation of examples")] public async Task Update_HybridConnectivityEndpointsPatchDefault() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsPatchDefault.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPatchDefault.json // this example is just showing the usage of "Endpoints_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 @@ -111,7 +111,7 @@ public async Task Update_HybridConnectivityEndpointsPatchDefault() [Ignore("Only validating compilation of examples")] public async Task Delete_HybridConnectivityEndpointsDeleteDefault() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsDeleteDefault.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsDeleteDefault.json // this example is just showing the usage of "Endpoints_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 @@ -136,7 +136,7 @@ public async Task Delete_HybridConnectivityEndpointsDeleteDefault() [Ignore("Only validating compilation of examples")] public async Task GetCredentials_HybridConnectivityEndpointsPostListCredentials() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsPostListCredentials.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPostListCredentials.json // this example is just showing the usage of "Endpoints_ListCredentials" 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 @@ -166,7 +166,7 @@ public async Task GetCredentials_HybridConnectivityEndpointsPostListCredentials( [Ignore("Only validating compilation of examples")] public async Task GetIngressGatewayCredentials_HybridConnectivityEndpointsPostListIngressGatewayCredentials() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsPostListIngressGatewayCredentials.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPostListIngressGatewayCredentials.json // this example is just showing the usage of "Endpoints_ListIngressGatewayCredentials" 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 @@ -192,7 +192,7 @@ public async Task GetIngressGatewayCredentials_HybridConnectivityEndpointsPostLi [Ignore("Only validating compilation of examples")] public async Task GetManagedProxyDetails_HybridConnectivityEndpointsPostListManagedProxyDetails() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/EndpointsPostListManagedProxyDetails.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/EndpointsPostListManagedProxyDetails.json // this example is just showing the usage of "Endpoints_ListManagedProxyDetails" 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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryCollection.cs deleted file mode 100644 index 73e1ed6de3689..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryCollection.cs +++ /dev/null @@ -1,156 +0,0 @@ -// 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.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivityInventoryCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_InventoryListBySolutionConfiguration() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/Inventory_ListBySolutionConfiguration.json - // this example is just showing the usage of "Inventory_ListBySolutionConfiguration" 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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "wsxt"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // get the collection of this HybridConnectivityInventoryResource - HybridConnectivityInventoryCollection collection = hybridConnectivitySolutionConfiguration.GetHybridConnectivityInventories(); - - // invoke the operation and iterate over the result - await foreach (HybridConnectivityInventoryResource 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 - HybridConnectivityInventoryData 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 Get_InventoryGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/Inventory_Get.json - // this example is just showing the usage of "Inventory_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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "zarfsraogroxlaqjjnwixtn"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // get the collection of this HybridConnectivityInventoryResource - HybridConnectivityInventoryCollection collection = hybridConnectivitySolutionConfiguration.GetHybridConnectivityInventories(); - - // invoke the operation - string inventoryId = "xofprmcboosrbd"; - HybridConnectivityInventoryResource result = await collection.GetAsync(inventoryId); - - // 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 - HybridConnectivityInventoryData 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_InventoryGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/Inventory_Get.json - // this example is just showing the usage of "Inventory_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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "zarfsraogroxlaqjjnwixtn"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // get the collection of this HybridConnectivityInventoryResource - HybridConnectivityInventoryCollection collection = hybridConnectivitySolutionConfiguration.GetHybridConnectivityInventories(); - - // invoke the operation - string inventoryId = "xofprmcboosrbd"; - bool result = await collection.ExistsAsync(inventoryId); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_InventoryGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/Inventory_Get.json - // this example is just showing the usage of "Inventory_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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "zarfsraogroxlaqjjnwixtn"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // get the collection of this HybridConnectivityInventoryResource - HybridConnectivityInventoryCollection collection = hybridConnectivitySolutionConfiguration.GetHybridConnectivityInventories(); - - // invoke the operation - string inventoryId = "xofprmcboosrbd"; - NullableResponse response = await collection.GetIfExistsAsync(inventoryId); - HybridConnectivityInventoryResource 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 - HybridConnectivityInventoryData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryResource.cs deleted file mode 100644 index 56128948655b9..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityInventoryResource.cs +++ /dev/null @@ -1,48 +0,0 @@ -// 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.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivityInventoryResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_InventoryGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/Inventory_Get.json - // this example is just showing the usage of "Inventory_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 HybridConnectivityInventoryResource created on azure - // for more information of creating HybridConnectivityInventoryResource, please refer to the document of HybridConnectivityInventoryResource - string resourceUri = "ymuj"; - string solutionConfiguration = "zarfsraogroxlaqjjnwixtn"; - string inventoryId = "xofprmcboosrbd"; - ResourceIdentifier hybridConnectivityInventoryResourceId = HybridConnectivityInventoryResource.CreateResourceIdentifier(resourceUri, solutionConfiguration, inventoryId); - HybridConnectivityInventoryResource hybridConnectivityInventory = client.GetHybridConnectivityInventoryResource(hybridConnectivityInventoryResourceId); - - // invoke the operation - HybridConnectivityInventoryResource result = await hybridConnectivityInventory.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 - HybridConnectivityInventoryData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorCollection.cs deleted file mode 100644 index b90a72f83250e..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorCollection.cs +++ /dev/null @@ -1,206 +0,0 @@ -// 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.HybridConnectivity.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivityPublicCloudConnectorCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_PublicCloudConnectorsListByResourceGroup() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_ListByResourceGroup.json - // this example is just showing the usage of "PublicCloudConnectors_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivityPublicCloudConnectorResource - HybridConnectivityPublicCloudConnectorCollection collection = resourceGroupResource.GetHybridConnectivityPublicCloudConnectors(); - - // invoke the operation and iterate over the result - await foreach (HybridConnectivityPublicCloudConnectorResource 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 - HybridConnectivityPublicCloudConnectorData 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 Get_PublicCloudConnectorsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_Get.json - // this example is just showing the usage of "PublicCloudConnectors_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivityPublicCloudConnectorResource - HybridConnectivityPublicCloudConnectorCollection collection = resourceGroupResource.GetHybridConnectivityPublicCloudConnectors(); - - // invoke the operation - string publicCloudConnector = "rzygvnpsnrdylwzdbsscjazvamyxmh"; - HybridConnectivityPublicCloudConnectorResource result = await collection.GetAsync(publicCloudConnector); - - // 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 - HybridConnectivityPublicCloudConnectorData 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_PublicCloudConnectorsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_Get.json - // this example is just showing the usage of "PublicCloudConnectors_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivityPublicCloudConnectorResource - HybridConnectivityPublicCloudConnectorCollection collection = resourceGroupResource.GetHybridConnectivityPublicCloudConnectors(); - - // invoke the operation - string publicCloudConnector = "rzygvnpsnrdylwzdbsscjazvamyxmh"; - bool result = await collection.ExistsAsync(publicCloudConnector); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_PublicCloudConnectorsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_Get.json - // this example is just showing the usage of "PublicCloudConnectors_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivityPublicCloudConnectorResource - HybridConnectivityPublicCloudConnectorCollection collection = resourceGroupResource.GetHybridConnectivityPublicCloudConnectors(); - - // invoke the operation - string publicCloudConnector = "rzygvnpsnrdylwzdbsscjazvamyxmh"; - NullableResponse response = await collection.GetIfExistsAsync(publicCloudConnector); - HybridConnectivityPublicCloudConnectorResource 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 - HybridConnectivityPublicCloudConnectorData 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_PublicCloudConnectorsCreateOrUpdate() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_CreateOrUpdate.json - // this example is just showing the usage of "PublicCloudConnectors_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 ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivityPublicCloudConnectorResource - HybridConnectivityPublicCloudConnectorCollection collection = resourceGroupResource.GetHybridConnectivityPublicCloudConnectors(); - - // invoke the operation - string publicCloudConnector = "advjwoakdusalamomg"; - HybridConnectivityPublicCloudConnectorData data = new HybridConnectivityPublicCloudConnectorData(new AzureLocation("jpiglusfxynfcewcjwvvnn")) - { - Properties = new PublicCloudConnectorProperties(new AwsCloudProfile("snbnuxckevyqpm") - { - ExcludedAccounts = -{ -"rwgqpukglvbqmogqcliqolucp" -}, - IsOrganizationalAccount = true, - }, HybridConnectivityHostType.AWS), - Tags = -{ -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, publicCloudConnector, data); - HybridConnectivityPublicCloudConnectorResource 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 - HybridConnectivityPublicCloudConnectorData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorResource.cs deleted file mode 100644 index b0170056845e1..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityPublicCloudConnectorResource.cs +++ /dev/null @@ -1,174 +0,0 @@ -// 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.HybridConnectivity.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivityPublicCloudConnectorResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetHybridConnectivityPublicCloudConnectors_PublicCloudConnectorsListBySubscription() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_ListBySubscription.json - // this example is just showing the usage of "PublicCloudConnectors_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (HybridConnectivityPublicCloudConnectorResource item in subscriptionResource.GetHybridConnectivityPublicCloudConnectorsAsync()) - { - // 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 - HybridConnectivityPublicCloudConnectorData 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 Get_PublicCloudConnectorsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_Get.json - // this example is just showing the usage of "PublicCloudConnectors_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 HybridConnectivityPublicCloudConnectorResource created on azure - // for more information of creating HybridConnectivityPublicCloudConnectorResource, please refer to the document of HybridConnectivityPublicCloudConnectorResource - string subscriptionId = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - string publicCloudConnector = "rzygvnpsnrdylwzdbsscjazvamyxmh"; - ResourceIdentifier hybridConnectivityPublicCloudConnectorResourceId = HybridConnectivityPublicCloudConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, publicCloudConnector); - HybridConnectivityPublicCloudConnectorResource hybridConnectivityPublicCloudConnector = client.GetHybridConnectivityPublicCloudConnectorResource(hybridConnectivityPublicCloudConnectorResourceId); - - // invoke the operation - HybridConnectivityPublicCloudConnectorResource result = await hybridConnectivityPublicCloudConnector.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 - HybridConnectivityPublicCloudConnectorData 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_PublicCloudConnectorsUpdate() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_Update.json - // this example is just showing the usage of "PublicCloudConnectors_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 HybridConnectivityPublicCloudConnectorResource created on azure - // for more information of creating HybridConnectivityPublicCloudConnectorResource, please refer to the document of HybridConnectivityPublicCloudConnectorResource - string subscriptionId = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - string publicCloudConnector = "svtirlbyqpepbzyessjenlueeznhg"; - ResourceIdentifier hybridConnectivityPublicCloudConnectorResourceId = HybridConnectivityPublicCloudConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, publicCloudConnector); - HybridConnectivityPublicCloudConnectorResource hybridConnectivityPublicCloudConnector = client.GetHybridConnectivityPublicCloudConnectorResource(hybridConnectivityPublicCloudConnectorResourceId); - - // invoke the operation - HybridConnectivityPublicCloudConnectorPatch patch = new HybridConnectivityPublicCloudConnectorPatch() - { - AwsCloudExcludedAccounts = -{ -"zrbtd" -}, - Tags = -{ -}, - }; - HybridConnectivityPublicCloudConnectorResource result = await hybridConnectivityPublicCloudConnector.UpdateAsync(patch); - - // 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 - HybridConnectivityPublicCloudConnectorData 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_PublicCloudConnectorsDelete() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_Delete.json - // this example is just showing the usage of "PublicCloudConnectors_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 HybridConnectivityPublicCloudConnectorResource created on azure - // for more information of creating HybridConnectivityPublicCloudConnectorResource, please refer to the document of HybridConnectivityPublicCloudConnectorResource - string subscriptionId = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - string publicCloudConnector = "skcfyjvflkhibdywjay"; - ResourceIdentifier hybridConnectivityPublicCloudConnectorResourceId = HybridConnectivityPublicCloudConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, publicCloudConnector); - HybridConnectivityPublicCloudConnectorResource hybridConnectivityPublicCloudConnector = client.GetHybridConnectivityPublicCloudConnectorResource(hybridConnectivityPublicCloudConnectorResourceId); - - // invoke the operation - await hybridConnectivityPublicCloudConnector.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task TestPermissions_PublicCloudConnectorsTestPermissions() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/PublicCloudConnectors_TestPermissions.json - // this example is just showing the usage of "PublicCloudConnectors_TestPermissions" 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 HybridConnectivityPublicCloudConnectorResource created on azure - // for more information of creating HybridConnectivityPublicCloudConnectorResource, please refer to the document of HybridConnectivityPublicCloudConnectorResource - string subscriptionId = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - string publicCloudConnector = "rzygvnpsnrdylwzdbsscjazvamyxmh"; - ResourceIdentifier hybridConnectivityPublicCloudConnectorResourceId = HybridConnectivityPublicCloudConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, publicCloudConnector); - HybridConnectivityPublicCloudConnectorResource hybridConnectivityPublicCloudConnector = client.GetHybridConnectivityPublicCloudConnectorResource(hybridConnectivityPublicCloudConnectorResourceId); - - // invoke the operation - ArmOperation lro = await hybridConnectivityPublicCloudConnector.TestPermissionsAsync(WaitUntil.Completed); - HybridConnectivityOperationStatusResult result = lro.Value; - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs index c962b3b68daeb..ead64b2b19b74 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridConnectivityServiceConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task GetAll_GetClustersExample() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsList.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsList.json // this example is just showing the usage of "ServiceConfigurations_ListByEndpointResource" 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 @@ -55,7 +55,7 @@ public async Task GetAll_GetClustersExample() [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsServiceconfigurationsGetSSH() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetSSH.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetSSH.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -88,7 +88,7 @@ public async Task Get_HybridConnectivityEndpointsServiceconfigurationsGetSSH() [Ignore("Only validating compilation of examples")] public async Task Exists_HybridConnectivityEndpointsServiceconfigurationsGetSSH() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetSSH.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetSSH.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -117,7 +117,7 @@ public async Task Exists_HybridConnectivityEndpointsServiceconfigurationsGetSSH( [Ignore("Only validating compilation of examples")] public async Task GetIfExists_HybridConnectivityEndpointsServiceconfigurationsGetSSH() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetSSH.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetSSH.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -158,7 +158,7 @@ public async Task GetIfExists_HybridConnectivityEndpointsServiceconfigurationsGe [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsServiceconfigurationsGetWAC() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetWAC.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetWAC.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -191,7 +191,7 @@ public async Task Get_HybridConnectivityEndpointsServiceconfigurationsGetWAC() [Ignore("Only validating compilation of examples")] public async Task Exists_HybridConnectivityEndpointsServiceconfigurationsGetWAC() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetWAC.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetWAC.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -220,7 +220,7 @@ public async Task Exists_HybridConnectivityEndpointsServiceconfigurationsGetWAC( [Ignore("Only validating compilation of examples")] public async Task GetIfExists_HybridConnectivityEndpointsServiceconfigurationsGetWAC() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetWAC.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetWAC.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -261,7 +261,7 @@ public async Task GetIfExists_HybridConnectivityEndpointsServiceconfigurationsGe [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ServiceConfigurationsPutSSH() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsPutSSH.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsPutSSH.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -300,7 +300,7 @@ public async Task CreateOrUpdate_ServiceConfigurationsPutSSH() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ServiceConfigurationsPutWAC() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsPutWAC.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsPutWAC.json // this example is just showing the usage of "ServiceConfigurations_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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs index 9181ebfe65b49..cd18134d61ec4 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivityServiceConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridConnectivityServiceConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsServiceconfigurationsGetSSH() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetSSH.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetSSH.json // this example is just showing the usage of "ServiceConfigurations_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_HybridConnectivityEndpointsServiceconfigurationsGetSSH() [Ignore("Only validating compilation of examples")] public async Task Get_HybridConnectivityEndpointsServiceconfigurationsGetWAC() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsGetWAC.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsGetWAC.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -80,7 +80,7 @@ public async Task Get_HybridConnectivityEndpointsServiceconfigurationsGetWAC() [Ignore("Only validating compilation of examples")] public async Task Update_ServiceConfigurationsPatchSSH() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsPatchSSH.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsPatchSSH.json // this example is just showing the usage of "ServiceConfigurations_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 @@ -114,7 +114,7 @@ public async Task Update_ServiceConfigurationsPatchSSH() [Ignore("Only validating compilation of examples")] public async Task Delete_ServiceConfigurationsDeleteSSH() { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/examples/ServiceConfigurationsDeleteSSH.json + // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2023-03-15/examples/ServiceConfigurationsDeleteSSH.json // this example is just showing the usage of "ServiceConfigurations_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 diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationCollection.cs deleted file mode 100644 index acdc3bdd8e93b..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationCollection.cs +++ /dev/null @@ -1,190 +0,0 @@ -// 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.HybridConnectivity.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivitySolutionConfigurationCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_SolutionConfigurationsList() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_List.json - // this example is just showing the usage of "SolutionConfigurations_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 ArmResource created on azure - // for more information of creating ArmResource, please refer to the document of ArmResource - - // get the collection of this HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); - HybridConnectivitySolutionConfigurationCollection collection = client.GetHybridConnectivitySolutionConfigurations(scopeId); - - // invoke the operation and iterate over the result - await foreach (HybridConnectivitySolutionConfigurationResource 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 - HybridConnectivitySolutionConfigurationData 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 Get_SolutionConfigurationsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_Get.json - // this example is just showing the usage of "SolutionConfigurations_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 ArmResource created on azure - // for more information of creating ArmResource, please refer to the document of ArmResource - - // get the collection of this HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); - HybridConnectivitySolutionConfigurationCollection collection = client.GetHybridConnectivitySolutionConfigurations(scopeId); - - // invoke the operation - string solutionConfiguration = "tks"; - HybridConnectivitySolutionConfigurationResource result = await collection.GetAsync(solutionConfiguration); - - // 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 - HybridConnectivitySolutionConfigurationData 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_SolutionConfigurationsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_Get.json - // this example is just showing the usage of "SolutionConfigurations_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 ArmResource created on azure - // for more information of creating ArmResource, please refer to the document of ArmResource - - // get the collection of this HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); - HybridConnectivitySolutionConfigurationCollection collection = client.GetHybridConnectivitySolutionConfigurations(scopeId); - - // invoke the operation - string solutionConfiguration = "tks"; - bool result = await collection.ExistsAsync(solutionConfiguration); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_SolutionConfigurationsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_Get.json - // this example is just showing the usage of "SolutionConfigurations_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 ArmResource created on azure - // for more information of creating ArmResource, please refer to the document of ArmResource - - // get the collection of this HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); - HybridConnectivitySolutionConfigurationCollection collection = client.GetHybridConnectivitySolutionConfigurations(scopeId); - - // invoke the operation - string solutionConfiguration = "tks"; - NullableResponse response = await collection.GetIfExistsAsync(solutionConfiguration); - HybridConnectivitySolutionConfigurationResource 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 - HybridConnectivitySolutionConfigurationData 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_SolutionConfigurationsCreateOrUpdate() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_CreateOrUpdate.json - // this example is just showing the usage of "SolutionConfigurations_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 ArmResource created on azure - // for more information of creating ArmResource, please refer to the document of ArmResource - - // get the collection of this HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri)); - HybridConnectivitySolutionConfigurationCollection collection = client.GetHybridConnectivitySolutionConfigurations(scopeId); - - // invoke the operation - string solutionConfiguration = "keebwujt"; - HybridConnectivitySolutionConfigurationData data = new HybridConnectivitySolutionConfigurationData() - { - Properties = new SolutionConfigurationProperties("nmtqllkyohwtsthxaimsye") - { - SolutionSettings = -{ -}, - }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, solutionConfiguration, data); - HybridConnectivitySolutionConfigurationResource 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 - HybridConnectivitySolutionConfigurationData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationResource.cs deleted file mode 100644 index 801c9c51abf6a..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionConfigurationResource.cs +++ /dev/null @@ -1,138 +0,0 @@ -// 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.HybridConnectivity.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivitySolutionConfigurationResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_SolutionConfigurationsGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_Get.json - // this example is just showing the usage of "SolutionConfigurations_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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "tks"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // invoke the operation - HybridConnectivitySolutionConfigurationResource result = await hybridConnectivitySolutionConfiguration.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 - HybridConnectivitySolutionConfigurationData 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_SolutionConfigurationsUpdate() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_Update.json - // this example is just showing the usage of "SolutionConfigurations_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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "dxt"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // invoke the operation - HybridConnectivitySolutionConfigurationPatch patch = new HybridConnectivitySolutionConfigurationPatch() - { - Properties = new SolutionConfigurationPropertiesUpdate() - { - SolutionType = "myzljlstvmgkp", - SolutionSettings = -{ -}, - }, - }; - HybridConnectivitySolutionConfigurationResource result = await hybridConnectivitySolutionConfiguration.UpdateAsync(patch); - - // 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 - HybridConnectivitySolutionConfigurationData 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_SolutionConfigurationsDelete() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_Delete.json - // this example is just showing the usage of "SolutionConfigurations_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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "stu"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // invoke the operation - await hybridConnectivitySolutionConfiguration.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task SyncNow_SolutionConfigurationsSyncNow() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionConfigurations_SyncNow.json - // this example is just showing the usage of "SolutionConfigurations_SyncNow" 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 HybridConnectivitySolutionConfigurationResource created on azure - // for more information of creating HybridConnectivitySolutionConfigurationResource, please refer to the document of HybridConnectivitySolutionConfigurationResource - string resourceUri = "ymuj"; - string solutionConfiguration = "tks"; - ResourceIdentifier hybridConnectivitySolutionConfigurationResourceId = HybridConnectivitySolutionConfigurationResource.CreateResourceIdentifier(resourceUri, solutionConfiguration); - HybridConnectivitySolutionConfigurationResource hybridConnectivitySolutionConfiguration = client.GetHybridConnectivitySolutionConfigurationResource(hybridConnectivitySolutionConfigurationResourceId); - - // invoke the operation - ArmOperation lro = await hybridConnectivitySolutionConfiguration.SyncNowAsync(WaitUntil.Completed); - HybridConnectivityOperationStatusResult result = lro.Value; - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeCollection.cs deleted file mode 100644 index 26c01196484f9..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeCollection.cs +++ /dev/null @@ -1,157 +0,0 @@ -// 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.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivitySolutionTypeCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_SolutionTypesListByResourceGroup() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionTypes_ListByResourceGroup.json - // this example is just showing the usage of "SolutionTypes_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivitySolutionTypeResource - HybridConnectivitySolutionTypeCollection collection = resourceGroupResource.GetHybridConnectivitySolutionTypes(); - - // invoke the operation and iterate over the result - await foreach (HybridConnectivitySolutionTypeResource 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 - HybridConnectivitySolutionTypeData 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 Get_SolutionTypesGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionTypes_Get.json - // this example is just showing the usage of "SolutionTypes_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivitySolutionTypeResource - HybridConnectivitySolutionTypeCollection collection = resourceGroupResource.GetHybridConnectivitySolutionTypes(); - - // invoke the operation - string solutionType = "lulzqllpu"; - HybridConnectivitySolutionTypeResource result = await collection.GetAsync(solutionType); - - // 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 - HybridConnectivitySolutionTypeData 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_SolutionTypesGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionTypes_Get.json - // this example is just showing the usage of "SolutionTypes_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivitySolutionTypeResource - HybridConnectivitySolutionTypeCollection collection = resourceGroupResource.GetHybridConnectivitySolutionTypes(); - - // invoke the operation - string solutionType = "lulzqllpu"; - bool result = await collection.ExistsAsync(solutionType); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_SolutionTypesGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionTypes_Get.json - // this example is just showing the usage of "SolutionTypes_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this HybridConnectivitySolutionTypeResource - HybridConnectivitySolutionTypeCollection collection = resourceGroupResource.GetHybridConnectivitySolutionTypes(); - - // invoke the operation - string solutionType = "lulzqllpu"; - NullableResponse response = await collection.GetIfExistsAsync(solutionType); - HybridConnectivitySolutionTypeResource 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 - HybridConnectivitySolutionTypeData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeResource.cs deleted file mode 100644 index 4a6d750fd940d..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_HybridConnectivitySolutionTypeResource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// 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.HybridConnectivity.Samples -{ - public partial class Sample_HybridConnectivitySolutionTypeResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetHybridConnectivitySolutionTypes_SolutionTypesListBySubscription() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionTypes_ListBySubscription.json - // this example is just showing the usage of "SolutionTypes_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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (HybridConnectivitySolutionTypeResource item in subscriptionResource.GetHybridConnectivitySolutionTypesAsync()) - { - // 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 - HybridConnectivitySolutionTypeData 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 Get_SolutionTypesGet() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/SolutionTypes_Get.json - // this example is just showing the usage of "SolutionTypes_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 HybridConnectivitySolutionTypeResource created on azure - // for more information of creating HybridConnectivitySolutionTypeResource, please refer to the document of HybridConnectivitySolutionTypeResource - string subscriptionId = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - string resourceGroupName = "rgpublicCloud"; - string solutionType = "lulzqllpu"; - ResourceIdentifier hybridConnectivitySolutionTypeResourceId = HybridConnectivitySolutionTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionType); - HybridConnectivitySolutionTypeResource hybridConnectivitySolutionType = client.GetHybridConnectivitySolutionTypeResource(hybridConnectivitySolutionTypeResourceId); - - // invoke the operation - HybridConnectivitySolutionTypeResource result = await hybridConnectivitySolutionType.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 - HybridConnectivitySolutionTypeData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs deleted file mode 100644 index 0b6d561e9e2bc..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ /dev/null @@ -1,56 +0,0 @@ -// 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.HybridConnectivity.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.HybridConnectivity.Samples -{ - public partial class Sample_SubscriptionResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task PostGenerateAwsTemplate_GenerateAwsTemplatePost() - { - // Generated from example definition: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/PublicCloud/stable/2024-12-01/examples/GenerateAwsTemplate_Post.json - // this example is just showing the usage of "GenerateAwsTemplate_Post" 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 = "5ACC4579-DB34-4C2F-8F8C-25061168F342"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation - GenerateAwsTemplateContent content = new GenerateAwsTemplateContent(new ResourceIdentifier("pnxcfjidglabnwxit")) - { - SolutionTypes = -{ -new SolutionTypeSettings("hjyownzpfxwiufmd") -{ -SolutionSettings = -{ -}, -} -}, - }; - BinaryData result = await subscriptionResource.PostGenerateAwsTemplateAsync(content); - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/ArmHybridConnectivityModelFactory.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/ArmHybridConnectivityModelFactory.cs index a30daffbf20b6..42ebc84ac854d 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/ArmHybridConnectivityModelFactory.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/ArmHybridConnectivityModelFactory.cs @@ -6,8 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; -using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -16,228 +14,6 @@ namespace Azure.ResourceManager.HybridConnectivity.Models /// Model factory for models. public static partial class ArmHybridConnectivityModelFactory { - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static HybridConnectivitySolutionConfigurationData HybridConnectivitySolutionConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SolutionConfigurationProperties properties = null) - { - return new HybridConnectivitySolutionConfigurationData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The resource provisioning state. - /// The type of the solution. - /// Solution settings. - /// The status of solution configurations. - /// The detailed message of status details. - /// The last time resources were inventoried. - /// A new instance for mocking. - public static SolutionConfigurationProperties SolutionConfigurationProperties(HybridConnectivityResourceProvisioningState? provisioningState = null, string solutionType = null, IDictionary solutionSettings = null, SolutionConfigurationStatus? status = null, string statusDetails = null, DateTimeOffset? lastSyncOn = null) - { - solutionSettings ??= new Dictionary(); - - return new SolutionConfigurationProperties( - provisioningState, - solutionType, - solutionSettings, - status, - statusDetails, - lastSyncOn, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static HybridConnectivitySolutionConfigurationPatch HybridConnectivitySolutionConfigurationPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SolutionConfigurationPropertiesUpdate properties = null) - { - return new HybridConnectivitySolutionConfigurationPatch( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static HybridConnectivityInventoryData HybridConnectivityInventoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HybridConnectivityInventoryProperties properties = null) - { - return new HybridConnectivityInventoryData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Gets or sets the cloud native resource type. - /// Gets or sets the cloud native resource name. - /// Gets or sets the mapped azure resource id. - /// Gets or sets the status of the inventory. - /// Gets or sets the status details. - /// The resource provisioning state. - /// A new instance for mocking. - public static HybridConnectivityInventoryProperties HybridConnectivityInventoryProperties(HybridConnectivityCloudNativeType? cloudNativeType = null, string cloudNativeResourceId = null, ResourceIdentifier azureResourceId = null, SolutionConfigurationStatus? status = null, string statusDetails = null, HybridConnectivityResourceProvisioningState? provisioningState = null) - { - return new HybridConnectivityInventoryProperties( - cloudNativeType, - cloudNativeResourceId, - azureResourceId, - status, - statusDetails, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Fully qualified ID for the async operation. - /// Fully qualified ID of the resource against which the original async operation was started. - /// Name of the async operation. - /// Operation status. - /// Percent of the operation that is complete. - /// The start time of the operation. - /// The end time of the operation. - /// The operations list. - /// If present, details of the operation error. - /// A new instance for mocking. - public static HybridConnectivityOperationStatusResult HybridConnectivityOperationStatusResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null) - { - operations ??= new List(); - - return new HybridConnectivityOperationStatusResult( - id, - resourceId, - name, - status, - percentComplete, - startOn, - endOn, - operations?.ToList(), - error, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The name of public cloud connector. - /// The list of solution types and their settings. - /// A new instance for mocking. - public static GenerateAwsTemplateContent GenerateAwsTemplateContent(ResourceIdentifier connectorId = null, IEnumerable solutionTypes = null) - { - solutionTypes ??= new List(); - - return new GenerateAwsTemplateContent(connectorId, solutionTypes?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The type of the solution. - /// Solution settings. - /// A new instance for mocking. - public static SolutionTypeSettings SolutionTypeSettings(string solutionType = null, IDictionary solutionSettings = null) - { - solutionSettings ??= new Dictionary(); - - return new SolutionTypeSettings(solutionType, solutionSettings, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static HybridConnectivityPublicCloudConnectorData HybridConnectivityPublicCloudConnectorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PublicCloudConnectorProperties properties = null) - { - tags ??= new Dictionary(); - - return new HybridConnectivityPublicCloudConnectorData( - id, - name, - resourceType, - systemData, - tags, - location, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Cloud profile for AWS. - /// Host cloud the public cloud connector. - /// The resource provisioning state. - /// Connector primary identifier. - /// A new instance for mocking. - public static PublicCloudConnectorProperties PublicCloudConnectorProperties(AwsCloudProfile awsCloudProfile = null, HybridConnectivityHostType hostType = default, HybridConnectivityResourceProvisioningState? provisioningState = null, Guid? connectorPrimaryIdentifier = null) - { - return new PublicCloudConnectorProperties(awsCloudProfile, hostType, provisioningState, connectorPrimaryIdentifier, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static HybridConnectivitySolutionTypeData HybridConnectivitySolutionTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HybridConnectivitySolutionTypeProperties properties = null) - { - return new HybridConnectivitySolutionTypeData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Resource tags. - /// A new instance for mocking. - public static HybridConnectivityPublicCloudConnectorPatch HybridConnectivityPublicCloudConnectorPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable awsCloudExcludedAccounts = null, IDictionary tags = null) - { - awsCloudExcludedAccounts ??= new List(); - tags ??= new Dictionary(); - - return new HybridConnectivityPublicCloudConnectorPatch( - id, - name, - resourceType, - systemData, - awsCloudExcludedAccounts != null ? new PublicCloudConnectorPropertiesUpdate(new AwsCloudProfileUpdate(awsCloudExcludedAccounts?.ToList(), serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, - tags, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/HybridConnectivityExtensions.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/HybridConnectivityExtensions.cs index 6ad32f973a0c9..89a74d4e8acc4 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/HybridConnectivityExtensions.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/HybridConnectivityExtensions.cs @@ -10,8 +10,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.ResourceManager.HybridConnectivity.Mocking; -using Azure.ResourceManager.HybridConnectivity.Models; -using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.HybridConnectivity { @@ -23,112 +21,6 @@ private static MockableHybridConnectivityArmClient GetMockableHybridConnectivity return client.GetCachedClient(client0 => new MockableHybridConnectivityArmClient(client0)); } - private static MockableHybridConnectivityResourceGroupResource GetMockableHybridConnectivityResourceGroupResource(ArmResource resource) - { - return resource.GetCachedClient(client => new MockableHybridConnectivityResourceGroupResource(client, resource.Id)); - } - - private static MockableHybridConnectivitySubscriptionResource GetMockableHybridConnectivitySubscriptionResource(ArmResource resource) - { - return resource.GetCachedClient(client => new MockableHybridConnectivitySubscriptionResource(client, resource.Id)); - } - - /// - /// Gets a collection of HybridConnectivitySolutionConfigurationResources in the ArmClient. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The scope that the resource will apply against. - /// is null. - /// An object representing collection of HybridConnectivitySolutionConfigurationResources and their operations over a HybridConnectivitySolutionConfigurationResource. - public static HybridConnectivitySolutionConfigurationCollection GetHybridConnectivitySolutionConfigurations(this ArmClient client, ResourceIdentifier scope) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivitySolutionConfigurations(scope); - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The scope that the resource will apply against. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetHybridConnectivitySolutionConfigurationAsync(this ArmClient client, ResourceIdentifier scope, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(client, nameof(client)); - - return await GetMockableHybridConnectivityArmClient(client).GetHybridConnectivitySolutionConfigurationAsync(scope, solutionConfiguration, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The scope that the resource will apply against. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetHybridConnectivitySolutionConfiguration(this ArmClient client, ResourceIdentifier scope, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivitySolutionConfiguration(scope, solutionConfiguration, cancellationToken); - } - /// /// Gets a collection of HybridConnectivityEndpointResources in the ArmClient. /// @@ -160,7 +52,7 @@ public static HybridConnectivityEndpointCollection GetHybridConnectivityEndpoint /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -198,7 +90,7 @@ public static async Task> GetHybrid /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -223,82 +115,6 @@ public static Response GetHybridConnectivity return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivityEndpoint(scope, endpointName, cancellationToken); } - /// - /// 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 HybridConnectivitySolutionConfigurationResource GetHybridConnectivitySolutionConfigurationResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivitySolutionConfigurationResource(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 HybridConnectivityInventoryResource GetHybridConnectivityInventoryResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivityInventoryResource(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 HybridConnectivityPublicCloudConnectorResource GetHybridConnectivityPublicCloudConnectorResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivityPublicCloudConnectorResource(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 HybridConnectivitySolutionTypeResource GetHybridConnectivitySolutionTypeResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivitySolutionTypeResource(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. @@ -336,399 +152,5 @@ public static HybridConnectivityServiceConfigurationResource GetHybridConnectivi return GetMockableHybridConnectivityArmClient(client).GetHybridConnectivityServiceConfigurationResource(id); } - - /// - /// Gets a collection of HybridConnectivityPublicCloudConnectorResources 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 HybridConnectivityPublicCloudConnectorResources and their operations over a HybridConnectivityPublicCloudConnectorResource. - public static HybridConnectivityPublicCloudConnectorCollection GetHybridConnectivityPublicCloudConnectors(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableHybridConnectivityResourceGroupResource(resourceGroupResource).GetHybridConnectivityPublicCloudConnectors(); - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetHybridConnectivityPublicCloudConnectorAsync(this ResourceGroupResource resourceGroupResource, string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableHybridConnectivityResourceGroupResource(resourceGroupResource).GetHybridConnectivityPublicCloudConnectorAsync(publicCloudConnector, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetHybridConnectivityPublicCloudConnector(this ResourceGroupResource resourceGroupResource, string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableHybridConnectivityResourceGroupResource(resourceGroupResource).GetHybridConnectivityPublicCloudConnector(publicCloudConnector, cancellationToken); - } - - /// - /// Gets a collection of HybridConnectivitySolutionTypeResources 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 HybridConnectivitySolutionTypeResources and their operations over a HybridConnectivitySolutionTypeResource. - public static HybridConnectivitySolutionTypeCollection GetHybridConnectivitySolutionTypes(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableHybridConnectivityResourceGroupResource(resourceGroupResource).GetHybridConnectivitySolutionTypes(); - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Solution Type resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetHybridConnectivitySolutionTypeAsync(this ResourceGroupResource resourceGroupResource, string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableHybridConnectivityResourceGroupResource(resourceGroupResource).GetHybridConnectivitySolutionTypeAsync(solutionType, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Solution Type resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetHybridConnectivitySolutionType(this ResourceGroupResource resourceGroupResource, string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableHybridConnectivityResourceGroupResource(resourceGroupResource).GetHybridConnectivitySolutionType(solutionType, cancellationToken); - } - - /// - /// Retrieve AWS Cloud Formation template - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/generateAwsTemplate - /// - /// - /// Operation Id - /// GenerateAwsTemplate_Post - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. - /// The cancellation token to use. - /// or is null. - public static async Task> PostGenerateAwsTemplateAsync(this SubscriptionResource subscriptionResource, GenerateAwsTemplateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return await GetMockableHybridConnectivitySubscriptionResource(subscriptionResource).PostGenerateAwsTemplateAsync(content, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieve AWS Cloud Formation template - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/generateAwsTemplate - /// - /// - /// Operation Id - /// GenerateAwsTemplate_Post - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. - /// The cancellation token to use. - /// or is null. - public static Response PostGenerateAwsTemplate(this SubscriptionResource subscriptionResource, GenerateAwsTemplateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableHybridConnectivitySubscriptionResource(subscriptionResource).PostGenerateAwsTemplate(content, cancellationToken); - } - - /// - /// List PublicCloudConnector resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/publicCloudConnectors - /// - /// - /// Operation Id - /// PublicCloudConnectors_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-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 GetHybridConnectivityPublicCloudConnectorsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableHybridConnectivitySubscriptionResource(subscriptionResource).GetHybridConnectivityPublicCloudConnectorsAsync(cancellationToken); - } - - /// - /// List PublicCloudConnector resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/publicCloudConnectors - /// - /// - /// Operation Id - /// PublicCloudConnectors_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-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 GetHybridConnectivityPublicCloudConnectors(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableHybridConnectivitySubscriptionResource(subscriptionResource).GetHybridConnectivityPublicCloudConnectors(cancellationToken); - } - - /// - /// List SolutionTypeResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/solutionTypes - /// - /// - /// Operation Id - /// SolutionTypes_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-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 GetHybridConnectivitySolutionTypesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableHybridConnectivitySubscriptionResource(subscriptionResource).GetHybridConnectivitySolutionTypesAsync(cancellationToken); - } - - /// - /// List SolutionTypeResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/solutionTypes - /// - /// - /// Operation Id - /// SolutionTypes_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-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 GetHybridConnectivitySolutionTypes(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableHybridConnectivitySubscriptionResource(subscriptionResource).GetHybridConnectivitySolutionTypes(cancellationToken); - } } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityArmClient.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityArmClient.cs index 3053afafcc5cf..cbeecfad657af 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityArmClient.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityArmClient.cs @@ -37,78 +37,6 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of HybridConnectivitySolutionConfigurationResources in the ArmClient. - /// The scope that the resource will apply against. - /// An object representing collection of HybridConnectivitySolutionConfigurationResources and their operations over a HybridConnectivitySolutionConfigurationResource. - public virtual HybridConnectivitySolutionConfigurationCollection GetHybridConnectivitySolutionConfigurations(ResourceIdentifier scope) - { - return new HybridConnectivitySolutionConfigurationCollection(Client, scope); - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The scope that the resource will apply against. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetHybridConnectivitySolutionConfigurationAsync(ResourceIdentifier scope, string solutionConfiguration, CancellationToken cancellationToken = default) - { - return await GetHybridConnectivitySolutionConfigurations(scope).GetAsync(solutionConfiguration, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The scope that the resource will apply against. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetHybridConnectivitySolutionConfiguration(ResourceIdentifier scope, string solutionConfiguration, CancellationToken cancellationToken = default) - { - return GetHybridConnectivitySolutionConfigurations(scope).Get(solutionConfiguration, cancellationToken); - } - /// Gets a collection of HybridConnectivityEndpointResources in the ArmClient. /// The scope that the resource will apply against. /// An object representing collection of HybridConnectivityEndpointResources and their operations over a HybridConnectivityEndpointResource. @@ -130,7 +58,7 @@ public virtual HybridConnectivityEndpointCollection GetHybridConnectivityEndpoin /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -161,7 +89,7 @@ public virtual async Task> GetHybri /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -179,54 +107,6 @@ public virtual Response GetHybridConnectivit return GetHybridConnectivityEndpoints(scope).Get(endpointName, cancellationToken); } - /// - /// 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 HybridConnectivitySolutionConfigurationResource GetHybridConnectivitySolutionConfigurationResource(ResourceIdentifier id) - { - HybridConnectivitySolutionConfigurationResource.ValidateResourceId(id); - return new HybridConnectivitySolutionConfigurationResource(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 HybridConnectivityInventoryResource GetHybridConnectivityInventoryResource(ResourceIdentifier id) - { - HybridConnectivityInventoryResource.ValidateResourceId(id); - return new HybridConnectivityInventoryResource(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 HybridConnectivityPublicCloudConnectorResource GetHybridConnectivityPublicCloudConnectorResource(ResourceIdentifier id) - { - HybridConnectivityPublicCloudConnectorResource.ValidateResourceId(id); - return new HybridConnectivityPublicCloudConnectorResource(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 HybridConnectivitySolutionTypeResource GetHybridConnectivitySolutionTypeResource(ResourceIdentifier id) - { - HybridConnectivitySolutionTypeResource.ValidateResourceId(id); - return new HybridConnectivitySolutionTypeResource(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. diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityResourceGroupResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityResourceGroupResource.cs deleted file mode 100644 index 2dbb229b0a091..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivityResourceGroupResource.cs +++ /dev/null @@ -1,174 +0,0 @@ -// 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.HybridConnectivity.Mocking -{ - /// A class to add extension methods to ResourceGroupResource. - public partial class MockableHybridConnectivityResourceGroupResource : ArmResource - { - /// Initializes a new instance of the class for mocking. - protected MockableHybridConnectivityResourceGroupResource() - { - } - - /// 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 MockableHybridConnectivityResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of HybridConnectivityPublicCloudConnectorResources in the ResourceGroupResource. - /// An object representing collection of HybridConnectivityPublicCloudConnectorResources and their operations over a HybridConnectivityPublicCloudConnectorResource. - public virtual HybridConnectivityPublicCloudConnectorCollection GetHybridConnectivityPublicCloudConnectors() - { - return GetCachedClient(client => new HybridConnectivityPublicCloudConnectorCollection(client, Id)); - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetHybridConnectivityPublicCloudConnectorAsync(string publicCloudConnector, CancellationToken cancellationToken = default) - { - return await GetHybridConnectivityPublicCloudConnectors().GetAsync(publicCloudConnector, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetHybridConnectivityPublicCloudConnector(string publicCloudConnector, CancellationToken cancellationToken = default) - { - return GetHybridConnectivityPublicCloudConnectors().Get(publicCloudConnector, cancellationToken); - } - - /// Gets a collection of HybridConnectivitySolutionTypeResources in the ResourceGroupResource. - /// An object representing collection of HybridConnectivitySolutionTypeResources and their operations over a HybridConnectivitySolutionTypeResource. - public virtual HybridConnectivitySolutionTypeCollection GetHybridConnectivitySolutionTypes() - { - return GetCachedClient(client => new HybridConnectivitySolutionTypeCollection(client, Id)); - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetHybridConnectivitySolutionTypeAsync(string solutionType, CancellationToken cancellationToken = default) - { - return await GetHybridConnectivitySolutionTypes().GetAsync(solutionType, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetHybridConnectivitySolutionType(string solutionType, CancellationToken cancellationToken = default) - { - return GetHybridConnectivitySolutionTypes().Get(solutionType, cancellationToken); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivitySubscriptionResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivitySubscriptionResource.cs deleted file mode 100644 index e256239a92de9..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Extensions/MockableHybridConnectivitySubscriptionResource.cs +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity.Mocking -{ - /// A class to add extension methods to SubscriptionResource. - public partial class MockableHybridConnectivitySubscriptionResource : ArmResource - { - private ClientDiagnostics _generateAwsTemplateClientDiagnostics; - private GenerateAwsTemplateRestOperations _generateAwsTemplateRestClient; - private ClientDiagnostics _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics; - private PublicCloudConnectorsRestOperations _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient; - private ClientDiagnostics _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics; - private SolutionTypesRestOperations _hybridConnectivitySolutionTypeSolutionTypesRestClient; - - /// Initializes a new instance of the class for mocking. - protected MockableHybridConnectivitySubscriptionResource() - { - } - - /// 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 MockableHybridConnectivitySubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private ClientDiagnostics GenerateAwsTemplateClientDiagnostics => _generateAwsTemplateClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private GenerateAwsTemplateRestOperations GenerateAwsTemplateRestClient => _generateAwsTemplateRestClient ??= new GenerateAwsTemplateRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics HybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics => _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", HybridConnectivityPublicCloudConnectorResource.ResourceType.Namespace, Diagnostics); - private PublicCloudConnectorsRestOperations HybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient => _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient ??= new PublicCloudConnectorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridConnectivityPublicCloudConnectorResource.ResourceType)); - private ClientDiagnostics HybridConnectivitySolutionTypeSolutionTypesClientDiagnostics => _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", HybridConnectivitySolutionTypeResource.ResourceType.Namespace, Diagnostics); - private SolutionTypesRestOperations HybridConnectivitySolutionTypeSolutionTypesRestClient => _hybridConnectivitySolutionTypeSolutionTypesRestClient ??= new SolutionTypesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridConnectivitySolutionTypeResource.ResourceType)); - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// - /// Retrieve AWS Cloud Formation template - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/generateAwsTemplate - /// - /// - /// Operation Id - /// GenerateAwsTemplate_Post - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// - /// ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. - /// The cancellation token to use. - /// is null. - public virtual async Task> PostGenerateAwsTemplateAsync(GenerateAwsTemplateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = GenerateAwsTemplateClientDiagnostics.CreateScope("MockableHybridConnectivitySubscriptionResource.PostGenerateAwsTemplate"); - scope.Start(); - try - { - var response = await GenerateAwsTemplateRestClient.PostAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve AWS Cloud Formation template - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/generateAwsTemplate - /// - /// - /// Operation Id - /// GenerateAwsTemplate_Post - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// - /// ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. - /// The cancellation token to use. - /// is null. - public virtual Response PostGenerateAwsTemplate(GenerateAwsTemplateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = GenerateAwsTemplateClientDiagnostics.CreateScope("MockableHybridConnectivitySubscriptionResource.PostGenerateAwsTemplate"); - scope.Start(); - try - { - var response = GenerateAwsTemplateRestClient.Post(Id.SubscriptionId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List PublicCloudConnector resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/publicCloudConnectors - /// - /// - /// Operation Id - /// PublicCloudConnectors_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHybridConnectivityPublicCloudConnectorsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivityPublicCloudConnectorResource(Client, HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(e)), HybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, "MockableHybridConnectivitySubscriptionResource.GetHybridConnectivityPublicCloudConnectors", "value", "nextLink", cancellationToken); - } - - /// - /// List PublicCloudConnector resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/publicCloudConnectors - /// - /// - /// Operation Id - /// PublicCloudConnectors_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHybridConnectivityPublicCloudConnectors(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivityPublicCloudConnectorResource(Client, HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(e)), HybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, "MockableHybridConnectivitySubscriptionResource.GetHybridConnectivityPublicCloudConnectors", "value", "nextLink", cancellationToken); - } - - /// - /// List SolutionTypeResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/solutionTypes - /// - /// - /// Operation Id - /// SolutionTypes_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHybridConnectivitySolutionTypesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivitySolutionTypeResource(Client, HybridConnectivitySolutionTypeData.DeserializeHybridConnectivitySolutionTypeData(e)), HybridConnectivitySolutionTypeSolutionTypesClientDiagnostics, Pipeline, "MockableHybridConnectivitySubscriptionResource.GetHybridConnectivitySolutionTypes", "value", "nextLink", cancellationToken); - } - - /// - /// List SolutionTypeResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/solutionTypes - /// - /// - /// Operation Id - /// SolutionTypes_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHybridConnectivitySolutionTypes(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => HybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivitySolutionTypeResource(Client, HybridConnectivitySolutionTypeData.DeserializeHybridConnectivitySolutionTypeData(e)), HybridConnectivitySolutionTypeSolutionTypesClientDiagnostics, Pipeline, "MockableHybridConnectivitySubscriptionResource.GetHybridConnectivitySolutionTypes", "value", "nextLink", cancellationToken); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointCollection.cs index 611693c2f36c2..b882619313d09 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointCollection.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointCollection.cs @@ -54,7 +54,7 @@ internal HybridConnectivityEndpointCollection(ArmClient client, ResourceIdentifi /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -104,7 +104,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Get(string endpointN /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(string endpointName, Cance /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual Response Exists(string endpointName, CancellationToken canc /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -430,7 +430,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.cs index a4c0caaa84d7a..7889cdff170a8 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.cs @@ -107,7 +107,7 @@ public virtual HybridConnectivityServiceConfigurationCollection GetHybridConnect /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -137,7 +137,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual Response GetHybri /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -335,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -377,7 +377,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual Response Update(HybridConnect /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> GetCredentials /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response GetCredentials(ListCredent /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -507,16 +507,15 @@ public virtual Response GetCredentials(ListCredent /// /// /// - /// Object of type ListIngressGatewayCredentialsRequest. /// The is how long the endpoint access token is valid (in seconds). /// The cancellation token to use. - public virtual async Task> GetIngressGatewayCredentialsAsync(ListIngressGatewayCredentialsContent content = null, long? expiresin = null, CancellationToken cancellationToken = default) + public virtual async Task> GetIngressGatewayCredentialsAsync(long? expiresin = null, CancellationToken cancellationToken = default) { using var scope = _hybridConnectivityEndpointEndpointsClientDiagnostics.CreateScope("HybridConnectivityEndpointResource.GetIngressGatewayCredentials"); scope.Start(); try { - var response = await _hybridConnectivityEndpointEndpointsRestClient.ListIngressGatewayCredentialsAsync(Id.Parent, Id.Name, content, expiresin, cancellationToken).ConfigureAwait(false); + var response = await _hybridConnectivityEndpointEndpointsRestClient.ListIngressGatewayCredentialsAsync(Id.Parent, Id.Name, expiresin, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -539,7 +538,7 @@ public virtual async Task> GetIngressGatewayCreden /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -547,16 +546,15 @@ public virtual async Task> GetIngressGatewayCreden /// /// /// - /// Object of type ListIngressGatewayCredentialsRequest. /// The is how long the endpoint access token is valid (in seconds). /// The cancellation token to use. - public virtual Response GetIngressGatewayCredentials(ListIngressGatewayCredentialsContent content = null, long? expiresin = null, CancellationToken cancellationToken = default) + public virtual Response GetIngressGatewayCredentials(long? expiresin = null, CancellationToken cancellationToken = default) { using var scope = _hybridConnectivityEndpointEndpointsClientDiagnostics.CreateScope("HybridConnectivityEndpointResource.GetIngressGatewayCredentials"); scope.Start(); try { - var response = _hybridConnectivityEndpointEndpointsRestClient.ListIngressGatewayCredentials(Id.Parent, Id.Name, content, expiresin, cancellationToken); + var response = _hybridConnectivityEndpointEndpointsRestClient.ListIngressGatewayCredentials(Id.Parent, Id.Name, expiresin, cancellationToken); return response; } catch (Exception e) @@ -579,7 +577,7 @@ public virtual Response GetIngressGatewayCredentials(ListIn /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -621,7 +619,7 @@ public virtual async Task> GetManagedProxyDetailsAsy /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryCollection.cs deleted file mode 100644 index 22a1c5122b9ca..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryCollection.cs +++ /dev/null @@ -1,395 +0,0 @@ -// 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.HybridConnectivity -{ - /// - /// 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 GetHybridConnectivityInventories method from an instance of . - /// - public partial class HybridConnectivityInventoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hybridConnectivityInventoryInventoryClientDiagnostics; - private readonly InventoryRestOperations _hybridConnectivityInventoryInventoryRestClient; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivityInventoryCollection() - { - } - - /// 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 HybridConnectivityInventoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivityInventoryInventoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", HybridConnectivityInventoryResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HybridConnectivityInventoryResource.ResourceType, out string hybridConnectivityInventoryInventoryApiVersion); - _hybridConnectivityInventoryInventoryRestClient = new InventoryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivityInventoryInventoryApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != HybridConnectivitySolutionConfigurationResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, HybridConnectivitySolutionConfigurationResource.ResourceType), nameof(id)); - } - - /// - /// Get a InventoryResource - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryCollection.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivityInventoryInventoryRestClient.GetAsync(Id.Parent, Id.Name, inventoryId, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityInventoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a InventoryResource - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryCollection.Get"); - scope.Start(); - try - { - var response = _hybridConnectivityInventoryInventoryRestClient.Get(Id.Parent, Id.Name, inventoryId, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityInventoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List InventoryResource resources by SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory - /// - /// - /// Operation Id - /// Inventory_ListBySolutionConfiguration - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivityInventoryInventoryRestClient.CreateListBySolutionConfigurationRequest(Id.Parent, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivityInventoryInventoryRestClient.CreateListBySolutionConfigurationNextPageRequest(nextLink, Id.Parent, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivityInventoryResource(Client, HybridConnectivityInventoryData.DeserializeHybridConnectivityInventoryData(e)), _hybridConnectivityInventoryInventoryClientDiagnostics, Pipeline, "HybridConnectivityInventoryCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List InventoryResource resources by SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory - /// - /// - /// Operation Id - /// Inventory_ListBySolutionConfiguration - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivityInventoryInventoryRestClient.CreateListBySolutionConfigurationRequest(Id.Parent, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivityInventoryInventoryRestClient.CreateListBySolutionConfigurationNextPageRequest(nextLink, Id.Parent, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivityInventoryResource(Client, HybridConnectivityInventoryData.DeserializeHybridConnectivityInventoryData(e)), _hybridConnectivityInventoryInventoryClientDiagnostics, Pipeline, "HybridConnectivityInventoryCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryCollection.Exists"); - scope.Start(); - try - { - var response = await _hybridConnectivityInventoryInventoryRestClient.GetAsync(Id.Parent, Id.Name, inventoryId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryCollection.Exists"); - scope.Start(); - try - { - var response = _hybridConnectivityInventoryInventoryRestClient.Get(Id.Parent, Id.Name, inventoryId, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _hybridConnectivityInventoryInventoryRestClient.GetAsync(Id.Parent, Id.Name, inventoryId, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityInventoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryCollection.GetIfExists"); - scope.Start(); - try - { - var response = _hybridConnectivityInventoryInventoryRestClient.Get(Id.Parent, Id.Name, inventoryId, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityInventoryResource(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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.Serialization.cs deleted file mode 100644 index cbe684a9c2d92..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - public partial class HybridConnectivityInventoryData : 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(HybridConnectivityInventoryData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - HybridConnectivityInventoryData 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(HybridConnectivityInventoryData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivityInventoryData(document.RootElement, options); - } - - internal static HybridConnectivityInventoryData DeserializeHybridConnectivityInventoryData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HybridConnectivityInventoryProperties 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 = HybridConnectivityInventoryProperties.DeserializeHybridConnectivityInventoryProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivityInventoryData( - 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); - default: - throw new FormatException($"The model {nameof(HybridConnectivityInventoryData)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivityInventoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivityInventoryData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivityInventoryData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.cs deleted file mode 100644 index 9cb9150fc748f..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryData.cs +++ /dev/null @@ -1,75 +0,0 @@ -// 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.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - /// - /// A class representing the HybridConnectivityInventory data model. - /// Concrete proxy resource types can be created by aliasing this type using a specific property type. - /// - public partial class HybridConnectivityInventoryData : 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 HybridConnectivityInventoryData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivityInventoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, HybridConnectivityInventoryProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public HybridConnectivityInventoryProperties Properties { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.Serialization.cs deleted file mode 100644 index 96bf61102e182..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.HybridConnectivity -{ - public partial class HybridConnectivityInventoryResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - HybridConnectivityInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - HybridConnectivityInventoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.cs deleted file mode 100644 index d3f6d2213c49f..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityInventoryResource.cs +++ /dev/null @@ -1,170 +0,0 @@ -// 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.HybridConnectivity -{ - /// - /// A Class representing a HybridConnectivityInventory 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 GetHybridConnectivityInventoryResource method. - /// Otherwise you can get one from its parent resource using the GetHybridConnectivityInventory method. - /// - public partial class HybridConnectivityInventoryResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The resourceUri. - /// The solutionConfiguration. - /// The inventoryId. - public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string solutionConfiguration, string inventoryId) - { - var resourceId = $"{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _hybridConnectivityInventoryInventoryClientDiagnostics; - private readonly InventoryRestOperations _hybridConnectivityInventoryInventoryRestClient; - private readonly HybridConnectivityInventoryData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HybridConnectivity/solutionConfigurations/inventory"; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivityInventoryResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal HybridConnectivityInventoryResource(ArmClient client, HybridConnectivityInventoryData 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 HybridConnectivityInventoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivityInventoryInventoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hybridConnectivityInventoryInventoryApiVersion); - _hybridConnectivityInventoryInventoryRestClient = new InventoryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivityInventoryInventoryApiVersion); -#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 HybridConnectivityInventoryData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get a InventoryResource - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryResource.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivityInventoryInventoryRestClient.GetAsync(Id.Parent.Parent, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityInventoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a InventoryResource - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivityInventoryInventoryClientDiagnostics.CreateScope("HybridConnectivityInventoryResource.Get"); - scope.Start(); - try - { - var response = _hybridConnectivityInventoryInventoryRestClient.Get(Id.Parent.Parent, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityInventoryResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorCollection.cs deleted file mode 100644 index 1cf07bd60f040..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorCollection.cs +++ /dev/null @@ -1,494 +0,0 @@ -// 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.HybridConnectivity -{ - /// - /// 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 GetHybridConnectivityPublicCloudConnectors method from an instance of . - /// - public partial class HybridConnectivityPublicCloudConnectorCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics; - private readonly PublicCloudConnectorsRestOperations _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivityPublicCloudConnectorCollection() - { - } - - /// 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 HybridConnectivityPublicCloudConnectorCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", HybridConnectivityPublicCloudConnectorResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HybridConnectivityPublicCloudConnectorResource.ResourceType, out string hybridConnectivityPublicCloudConnectorPublicCloudConnectorsApiVersion); - _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient = new PublicCloudConnectorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivityPublicCloudConnectorPublicCloudConnectorsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Create a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-12-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. - /// Represent public cloud connectors resource. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string publicCloudConnector, HybridConnectivityPublicCloudConnectorData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, data, cancellationToken).ConfigureAwait(false); - var operation = new HybridConnectivityArmOperation(new HybridConnectivityPublicCloudConnectorOperationSource(Client), _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-12-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. - /// Represent public cloud connectors resource. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string publicCloudConnector, HybridConnectivityPublicCloudConnectorData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, data, cancellationToken); - var operation = new HybridConnectivityArmOperation(new HybridConnectivityPublicCloudConnectorOperationSource(Client), _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.Get"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List PublicCloudConnector resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors - /// - /// - /// Operation Id - /// PublicCloudConnectors_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivityPublicCloudConnectorResource(Client, HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(e)), _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, "HybridConnectivityPublicCloudConnectorCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List PublicCloudConnector resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors - /// - /// - /// Operation Id - /// PublicCloudConnectors_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivityPublicCloudConnectorResource(Client, HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(e)), _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, "HybridConnectivityPublicCloudConnectorCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.Exists"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, 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.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.Exists"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, 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.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(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.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorCollection.GetIfExists"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, publicCloudConnector, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.Serialization.cs deleted file mode 100644 index 0425acd585a90..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.Serialization.cs +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - public partial class HybridConnectivityPublicCloudConnectorData : 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(HybridConnectivityPublicCloudConnectorData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - HybridConnectivityPublicCloudConnectorData 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(HybridConnectivityPublicCloudConnectorData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement, options); - } - - internal static HybridConnectivityPublicCloudConnectorData DeserializeHybridConnectivityPublicCloudConnectorData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PublicCloudConnectorProperties 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 = PublicCloudConnectorProperties.DeserializePublicCloudConnectorProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivityPublicCloudConnectorData( - 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); - default: - throw new FormatException($"The model {nameof(HybridConnectivityPublicCloudConnectorData)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivityPublicCloudConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivityPublicCloudConnectorData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.cs deleted file mode 100644 index 1f322a57f6a0d..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorData.cs +++ /dev/null @@ -1,83 +0,0 @@ -// 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.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - /// - /// A class representing the HybridConnectivityPublicCloudConnector data model. - /// Public Cloud Connector - /// - public partial class HybridConnectivityPublicCloudConnectorData : 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 HybridConnectivityPublicCloudConnectorData(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivityPublicCloudConnectorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, PublicCloudConnectorProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal HybridConnectivityPublicCloudConnectorData() - { - } - - /// The resource-specific properties for this resource. - public PublicCloudConnectorProperties Properties { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.Serialization.cs deleted file mode 100644 index 58ab75e645bc2..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.HybridConnectivity -{ - public partial class HybridConnectivityPublicCloudConnectorResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - HybridConnectivityPublicCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - HybridConnectivityPublicCloudConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.cs deleted file mode 100644 index 569ea86c2e023..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityPublicCloudConnectorResource.cs +++ /dev/null @@ -1,787 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HybridConnectivity.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.HybridConnectivity -{ - /// - /// A Class representing a HybridConnectivityPublicCloudConnector 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 GetHybridConnectivityPublicCloudConnectorResource method. - /// Otherwise you can get one from its parent resource using the GetHybridConnectivityPublicCloudConnector method. - /// - public partial class HybridConnectivityPublicCloudConnectorResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The publicCloudConnector. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string publicCloudConnector) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics; - private readonly PublicCloudConnectorsRestOperations _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient; - private readonly HybridConnectivityPublicCloudConnectorData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HybridConnectivity/publicCloudConnectors"; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivityPublicCloudConnectorResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal HybridConnectivityPublicCloudConnectorResource(ArmClient client, HybridConnectivityPublicCloudConnectorData 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 HybridConnectivityPublicCloudConnectorResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hybridConnectivityPublicCloudConnectorPublicCloudConnectorsApiVersion); - _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient = new PublicCloudConnectorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivityPublicCloudConnectorPublicCloudConnectorsApiVersion); -#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 HybridConnectivityPublicCloudConnectorData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.Get"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Delete - /// - /// - /// Default Api Version - /// 2024-12-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 = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.Delete"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.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 HybridConnectivityArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Delete - /// - /// - /// Default Api Version - /// 2024-12-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 = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.Delete"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var uri = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.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 HybridConnectivityArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Update - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(HybridConnectivityPublicCloudConnectorPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.Update"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a PublicCloudConnector - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Update - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual Response Update(HybridConnectivityPublicCloudConnectorPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.Update"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// A long-running resource action. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}/testPermissions - /// - /// - /// Operation Id - /// PublicCloudConnectors_TestPermissions - /// - /// - /// Default Api Version - /// 2024-12-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> TestPermissionsAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.TestPermissions"); - scope.Start(); - try - { - var response = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.TestPermissionsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HybridConnectivityArmOperation(new HybridConnectivityOperationStatusResultOperationSource(), _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateTestPermissionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// A long-running resource action. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}/testPermissions - /// - /// - /// Operation Id - /// PublicCloudConnectors_TestPermissions - /// - /// - /// Default Api Version - /// 2024-12-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 TestPermissions(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.TestPermissions"); - scope.Start(); - try - { - var response = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.TestPermissions(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new HybridConnectivityArmOperation(new HybridConnectivityOperationStatusResultOperationSource(), _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics, Pipeline, _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.CreateTestPermissionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HybridConnectivityPublicCloudConnectorPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new HybridConnectivityPublicCloudConnectorPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HybridConnectivityPublicCloudConnectorPatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new HybridConnectivityPublicCloudConnectorPatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HybridConnectivityPublicCloudConnectorPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector} - /// - /// - /// Operation Id - /// PublicCloudConnectors_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsClientDiagnostics.CreateScope("HybridConnectivityPublicCloudConnectorResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hybridConnectivityPublicCloudConnectorPublicCloudConnectorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new HybridConnectivityPublicCloudConnectorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new HybridConnectivityPublicCloudConnectorPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationCollection.cs index 753c5672e0416..00b8dd42fd5de 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationCollection.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string serviceConfiguratio /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string serviceConfigurationName, Cancellati /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -440,7 +440,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.cs index 60beb228d68a1..b203f414f8677 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-12-01 + /// 2023-03-15 /// /// /// Resource diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationCollection.cs deleted file mode 100644 index e7520453000be..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationCollection.cs +++ /dev/null @@ -1,487 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.HybridConnectivity -{ - /// - /// 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 GetHybridConnectivitySolutionConfigurations method from an instance of . - /// - public partial class HybridConnectivitySolutionConfigurationCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics; - private readonly SolutionConfigurationsRestOperations _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivitySolutionConfigurationCollection() - { - } - - /// 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 HybridConnectivitySolutionConfigurationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", HybridConnectivitySolutionConfigurationResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HybridConnectivitySolutionConfigurationResource.ResourceType, out string hybridConnectivitySolutionConfigurationSolutionConfigurationsApiVersion); - _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient = new SolutionConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivitySolutionConfigurationSolutionConfigurationsApiVersion); - } - - /// - /// Create a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-12-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. - /// Represent Solution Configuration Resource. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string solutionConfiguration, HybridConnectivitySolutionConfigurationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateOrUpdateAsync(Id, solutionConfiguration, data, cancellationToken).ConfigureAwait(false); - var uri = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateCreateOrUpdateRequestUri(Id, solutionConfiguration, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new HybridConnectivityArmOperation(Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-12-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. - /// Represent Solution Configuration Resource. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string solutionConfiguration, HybridConnectivitySolutionConfigurationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateOrUpdate(Id, solutionConfiguration, data, cancellationToken); - var uri = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateCreateOrUpdateRequestUri(Id, solutionConfiguration, data); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new HybridConnectivityArmOperation(Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.GetAsync(Id, solutionConfiguration, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.Get"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.Get(Id, solutionConfiguration, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List SolutionConfiguration resources by parent - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations - /// - /// - /// Operation Id - /// SolutionConfigurations_List - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateListRequest(Id); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateListNextPageRequest(nextLink, Id); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivitySolutionConfigurationResource(Client, HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(e)), _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics, Pipeline, "HybridConnectivitySolutionConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List SolutionConfiguration resources by parent - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations - /// - /// - /// Operation Id - /// SolutionConfigurations_List - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateListRequest(Id); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateListNextPageRequest(nextLink, Id); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivitySolutionConfigurationResource(Client, HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(e)), _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics, Pipeline, "HybridConnectivitySolutionConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.Exists"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.GetAsync(Id, solutionConfiguration, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.Exists"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.Get(Id, solutionConfiguration, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.GetAsync(Id, solutionConfiguration, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationCollection.GetIfExists"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.Get(Id, solutionConfiguration, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.Serialization.cs deleted file mode 100644 index 0dbb088992769..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - public partial class HybridConnectivitySolutionConfigurationData : 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(HybridConnectivitySolutionConfigurationData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - HybridConnectivitySolutionConfigurationData 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(HybridConnectivitySolutionConfigurationData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement, options); - } - - internal static HybridConnectivitySolutionConfigurationData DeserializeHybridConnectivitySolutionConfigurationData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SolutionConfigurationProperties 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 = SolutionConfigurationProperties.DeserializeSolutionConfigurationProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivitySolutionConfigurationData( - 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); - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionConfigurationData)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivitySolutionConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionConfigurationData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.cs deleted file mode 100644 index 5fc723ce2b4e2..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationData.cs +++ /dev/null @@ -1,75 +0,0 @@ -// 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.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - /// - /// A class representing the HybridConnectivitySolutionConfiguration data model. - /// Solution Configuration - /// - public partial class HybridConnectivitySolutionConfigurationData : 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 HybridConnectivitySolutionConfigurationData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivitySolutionConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SolutionConfigurationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public SolutionConfigurationProperties Properties { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.Serialization.cs deleted file mode 100644 index acd639346d26c..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.HybridConnectivity -{ - public partial class HybridConnectivitySolutionConfigurationResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - HybridConnectivitySolutionConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - HybridConnectivitySolutionConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.cs deleted file mode 100644 index 2deaa2af1f110..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionConfigurationResource.cs +++ /dev/null @@ -1,495 +0,0 @@ -// 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.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - /// - /// A Class representing a HybridConnectivitySolutionConfiguration 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 GetHybridConnectivitySolutionConfigurationResource method. - /// Otherwise you can get one from its parent resource using the GetHybridConnectivitySolutionConfiguration method. - /// - public partial class HybridConnectivitySolutionConfigurationResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The resourceUri. - /// The solutionConfiguration. - public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string solutionConfiguration) - { - var resourceId = $"{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics; - private readonly SolutionConfigurationsRestOperations _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient; - private readonly HybridConnectivitySolutionConfigurationData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HybridConnectivity/solutionConfigurations"; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivitySolutionConfigurationResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal HybridConnectivitySolutionConfigurationResource(ArmClient client, HybridConnectivitySolutionConfigurationData 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 HybridConnectivitySolutionConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hybridConnectivitySolutionConfigurationSolutionConfigurationsApiVersion); - _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient = new SolutionConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivitySolutionConfigurationSolutionConfigurationsApiVersion); -#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 HybridConnectivitySolutionConfigurationData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of HybridConnectivityInventoryResources in the HybridConnectivitySolutionConfiguration. - /// An object representing collection of HybridConnectivityInventoryResources and their operations over a HybridConnectivityInventoryResource. - public virtual HybridConnectivityInventoryCollection GetHybridConnectivityInventories() - { - return GetCachedClient(client => new HybridConnectivityInventoryCollection(client, Id)); - } - - /// - /// Get a InventoryResource - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetHybridConnectivityInventoryAsync(string inventoryId, CancellationToken cancellationToken = default) - { - return await GetHybridConnectivityInventories().GetAsync(inventoryId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a InventoryResource - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/inventory/{inventoryId} - /// - /// - /// Operation Id - /// Inventory_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Inventory resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetHybridConnectivityInventory(string inventoryId, CancellationToken cancellationToken = default) - { - return GetHybridConnectivityInventories().Get(inventoryId, cancellationToken); - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.Get"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.Get(Id.Parent, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Delete - /// - /// - /// Default Api Version - /// 2024-12-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 = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.Delete"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); - var uri = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new HybridConnectivityArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Delete - /// - /// - /// Default Api Version - /// 2024-12-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 = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.Delete"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.Delete(Id.Parent, Id.Name, cancellationToken); - var uri = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new HybridConnectivityArmOperation(response, rehydrationToken); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Update - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(HybridConnectivitySolutionConfigurationPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.Update"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.UpdateAsync(Id.Parent, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a SolutionConfiguration - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration} - /// - /// - /// Operation Id - /// SolutionConfigurations_Update - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual Response Update(HybridConnectivitySolutionConfigurationPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.Update"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.Update(Id.Parent, Id.Name, patch, cancellationToken); - return Response.FromValue(new HybridConnectivitySolutionConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Trigger immediate sync with source cloud - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/syncNow - /// - /// - /// Operation Id - /// SolutionConfigurations_SyncNow - /// - /// - /// Default Api Version - /// 2024-12-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> SyncNowAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.SyncNow"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.SyncNowAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HybridConnectivityArmOperation(new HybridConnectivityOperationStatusResultOperationSource(), _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics, Pipeline, _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateSyncNowRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Trigger immediate sync with source cloud - /// - /// - /// Request Path - /// /{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/syncNow - /// - /// - /// Operation Id - /// SolutionConfigurations_SyncNow - /// - /// - /// Default Api Version - /// 2024-12-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 SyncNow(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics.CreateScope("HybridConnectivitySolutionConfigurationResource.SyncNow"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.SyncNow(Id.Parent, Id.Name, cancellationToken); - var operation = new HybridConnectivityArmOperation(new HybridConnectivityOperationStatusResultOperationSource(), _hybridConnectivitySolutionConfigurationSolutionConfigurationsClientDiagnostics, Pipeline, _hybridConnectivitySolutionConfigurationSolutionConfigurationsRestClient.CreateSyncNowRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeCollection.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeCollection.cs deleted file mode 100644 index 7196d3fe923d3..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeCollection.cs +++ /dev/null @@ -1,396 +0,0 @@ -// 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.HybridConnectivity -{ - /// - /// 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 GetHybridConnectivitySolutionTypes method from an instance of . - /// - public partial class HybridConnectivitySolutionTypeCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics; - private readonly SolutionTypesRestOperations _hybridConnectivitySolutionTypeSolutionTypesRestClient; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivitySolutionTypeCollection() - { - } - - /// 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 HybridConnectivitySolutionTypeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", HybridConnectivitySolutionTypeResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HybridConnectivitySolutionTypeResource.ResourceType, out string hybridConnectivitySolutionTypeSolutionTypesApiVersion); - _hybridConnectivitySolutionTypeSolutionTypesRestClient = new SolutionTypesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivitySolutionTypeSolutionTypesApiVersion); -#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)); - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeCollection.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionTypeSolutionTypesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, solutionType, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionTypeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeCollection.Get"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionTypeSolutionTypesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, solutionType, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionTypeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List SolutionTypeResource resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes - /// - /// - /// Operation Id - /// SolutionTypes_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivitySolutionTypeResource(Client, HybridConnectivitySolutionTypeData.DeserializeHybridConnectivitySolutionTypeData(e)), _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics, Pipeline, "HybridConnectivitySolutionTypeCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List SolutionTypeResource resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes - /// - /// - /// Operation Id - /// SolutionTypes_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2024-12-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) => _hybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridConnectivitySolutionTypeSolutionTypesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridConnectivitySolutionTypeResource(Client, HybridConnectivitySolutionTypeData.DeserializeHybridConnectivitySolutionTypeData(e)), _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics, Pipeline, "HybridConnectivitySolutionTypeCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeCollection.Exists"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionTypeSolutionTypesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, solutionType, 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.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeCollection.Exists"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionTypeSolutionTypesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, solutionType, 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.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionTypeSolutionTypesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, solutionType, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionTypeResource(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.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Solution Type resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeCollection.GetIfExists"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionTypeSolutionTypesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, solutionType, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionTypeResource(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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.Serialization.cs deleted file mode 100644 index cfb56c8801737..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - public partial class HybridConnectivitySolutionTypeData : 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(HybridConnectivitySolutionTypeData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - HybridConnectivitySolutionTypeData 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(HybridConnectivitySolutionTypeData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivitySolutionTypeData(document.RootElement, options); - } - - internal static HybridConnectivitySolutionTypeData DeserializeHybridConnectivitySolutionTypeData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HybridConnectivitySolutionTypeProperties 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 = HybridConnectivitySolutionTypeProperties.DeserializeHybridConnectivitySolutionTypeProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivitySolutionTypeData( - 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); - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionTypeData)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivitySolutionTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivitySolutionTypeData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionTypeData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.cs deleted file mode 100644 index 9f67bc2a90f7e..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeData.cs +++ /dev/null @@ -1,75 +0,0 @@ -// 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.HybridConnectivity.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - /// - /// A class representing the HybridConnectivitySolutionType data model. - /// Concrete proxy resource types can be created by aliasing this type using a specific property type. - /// - public partial class HybridConnectivitySolutionTypeData : 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 HybridConnectivitySolutionTypeData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivitySolutionTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, HybridConnectivitySolutionTypeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public HybridConnectivitySolutionTypeProperties Properties { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.Serialization.cs deleted file mode 100644 index f1d714daefc73..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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.HybridConnectivity -{ - public partial class HybridConnectivitySolutionTypeResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - HybridConnectivitySolutionTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - HybridConnectivitySolutionTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.cs deleted file mode 100644 index 3e3b126229b84..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivitySolutionTypeResource.cs +++ /dev/null @@ -1,171 +0,0 @@ -// 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.HybridConnectivity -{ - /// - /// A Class representing a HybridConnectivitySolutionType 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 GetHybridConnectivitySolutionTypeResource method. - /// Otherwise you can get one from its parent resource using the GetHybridConnectivitySolutionType method. - /// - public partial class HybridConnectivitySolutionTypeResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The solutionType. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string solutionType) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics; - private readonly SolutionTypesRestOperations _hybridConnectivitySolutionTypeSolutionTypesRestClient; - private readonly HybridConnectivitySolutionTypeData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HybridConnectivity/solutionTypes"; - - /// Initializes a new instance of the class for mocking. - protected HybridConnectivitySolutionTypeResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal HybridConnectivitySolutionTypeResource(ArmClient client, HybridConnectivitySolutionTypeData 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 HybridConnectivitySolutionTypeResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridConnectivity", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hybridConnectivitySolutionTypeSolutionTypesApiVersion); - _hybridConnectivitySolutionTypeSolutionTypesRestClient = new SolutionTypesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridConnectivitySolutionTypeSolutionTypesApiVersion); -#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 HybridConnectivitySolutionTypeData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeResource.Get"); - scope.Start(); - try - { - var response = await _hybridConnectivitySolutionTypeSolutionTypesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionTypeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a SolutionTypeResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/solutionTypes/{solutionType} - /// - /// - /// Operation Id - /// SolutionTypes_Get - /// - /// - /// Default Api Version - /// 2024-12-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _hybridConnectivitySolutionTypeSolutionTypesClientDiagnostics.CreateScope("HybridConnectivitySolutionTypeResource.Get"); - scope.Start(); - try - { - var response = _hybridConnectivitySolutionTypeSolutionTypesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HybridConnectivitySolutionTypeResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityOperationStatusResultOperationSource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityOperationStatusResultOperationSource.cs deleted file mode 100644 index 50cc72b8a2377..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityOperationStatusResultOperationSource.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.ResourceManager.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - internal class HybridConnectivityOperationStatusResultOperationSource : IOperationSource - { - HybridConnectivityOperationStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return HybridConnectivityOperationStatusResult.DeserializeHybridConnectivityOperationStatusResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return HybridConnectivityOperationStatusResult.DeserializeHybridConnectivityOperationStatusResult(document.RootElement); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityPublicCloudConnectorOperationSource.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityPublicCloudConnectorOperationSource.cs deleted file mode 100644 index f545fb3a61228..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/LongRunningOperation/HybridConnectivityPublicCloudConnectorOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.HybridConnectivity -{ - internal class HybridConnectivityPublicCloudConnectorOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal HybridConnectivityPublicCloudConnectorOperationSource(ArmClient client) - { - _client = client; - } - - HybridConnectivityPublicCloudConnectorResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement); - return new HybridConnectivityPublicCloudConnectorResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement); - return new HybridConnectivityPublicCloudConnectorResource(_client, data); - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.Serialization.cs deleted file mode 100644 index 3151234a58146..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class AwsCloudProfile : 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(AwsCloudProfile)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("accountId"u8); - writer.WriteStringValue(AccountId); - if (Optional.IsCollectionDefined(ExcludedAccounts)) - { - writer.WritePropertyName("excludedAccounts"u8); - writer.WriteStartArray(); - foreach (var item in ExcludedAccounts) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsOrganizationalAccount)) - { - writer.WritePropertyName("isOrganizationalAccount"u8); - writer.WriteBooleanValue(IsOrganizationalAccount.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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - AwsCloudProfile 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(AwsCloudProfile)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAwsCloudProfile(document.RootElement, options); - } - - internal static AwsCloudProfile DeserializeAwsCloudProfile(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string accountId = default; - IList excludedAccounts = default; - bool? isOrganizationalAccount = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accountId"u8)) - { - accountId = property.Value.GetString(); - continue; - } - if (property.NameEquals("excludedAccounts"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - excludedAccounts = array; - continue; - } - if (property.NameEquals("isOrganizationalAccount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isOrganizationalAccount = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AwsCloudProfile(accountId, excludedAccounts ?? new ChangeTrackingList(), isOrganizationalAccount, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AwsCloudProfile)} does not support writing '{options.Format}' format."); - } - } - - AwsCloudProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAwsCloudProfile(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AwsCloudProfile)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.cs deleted file mode 100644 index e5e95b6b58f75..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfile.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// cloud profile for AWS. - public partial class AwsCloudProfile - { - /// - /// 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 . - /// Account id for the AWS account. - /// is null. - public AwsCloudProfile(string accountId) - { - Argument.AssertNotNull(accountId, nameof(accountId)); - - AccountId = accountId; - ExcludedAccounts = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Account id for the AWS account. - /// List of AWS accounts which need to be excluded. - /// Boolean value that indicates whether the account is organizational or not. True represents organization account, whereas false represents a single account. - /// Keeps track of any properties unknown to the library. - internal AwsCloudProfile(string accountId, IList excludedAccounts, bool? isOrganizationalAccount, IDictionary serializedAdditionalRawData) - { - AccountId = accountId; - ExcludedAccounts = excludedAccounts; - IsOrganizationalAccount = isOrganizationalAccount; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AwsCloudProfile() - { - } - - /// Account id for the AWS account. - public string AccountId { get; set; } - /// List of AWS accounts which need to be excluded. - public IList ExcludedAccounts { get; } - /// Boolean value that indicates whether the account is organizational or not. True represents organization account, whereas false represents a single account. - public bool? IsOrganizationalAccount { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.Serialization.cs deleted file mode 100644 index 60e1541e77a09..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.Serialization.cs +++ /dev/null @@ -1,143 +0,0 @@ -// 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.HybridConnectivity.Models -{ - internal partial class AwsCloudProfileUpdate : 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(AwsCloudProfileUpdate)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(ExcludedAccounts)) - { - writer.WritePropertyName("excludedAccounts"u8); - writer.WriteStartArray(); - foreach (var item in ExcludedAccounts) - { - 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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - AwsCloudProfileUpdate 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(AwsCloudProfileUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAwsCloudProfileUpdate(document.RootElement, options); - } - - internal static AwsCloudProfileUpdate DeserializeAwsCloudProfileUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList excludedAccounts = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("excludedAccounts"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - excludedAccounts = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AwsCloudProfileUpdate(excludedAccounts ?? 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); - default: - throw new FormatException($"The model {nameof(AwsCloudProfileUpdate)} does not support writing '{options.Format}' format."); - } - } - - AwsCloudProfileUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAwsCloudProfileUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AwsCloudProfileUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.cs deleted file mode 100644 index 70271adb5514a..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/AwsCloudProfileUpdate.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// cloud profile for AWS. - internal partial class AwsCloudProfileUpdate - { - /// - /// 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 AwsCloudProfileUpdate() - { - ExcludedAccounts = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// List of AWS accounts which need to be excluded. - /// Keeps track of any properties unknown to the library. - internal AwsCloudProfileUpdate(IList excludedAccounts, IDictionary serializedAdditionalRawData) - { - ExcludedAccounts = excludedAccounts; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// List of AWS accounts which need to be excluded. - public IList ExcludedAccounts { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.Serialization.cs deleted file mode 100644 index 0a408de6387be..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class GenerateAwsTemplateContent : 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(GenerateAwsTemplateContent)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("connectorId"u8); - writer.WriteStringValue(ConnectorId); - if (Optional.IsCollectionDefined(SolutionTypes)) - { - writer.WritePropertyName("solutionTypes"u8); - writer.WriteStartArray(); - foreach (var item in SolutionTypes) - { - 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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - GenerateAwsTemplateContent 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(GenerateAwsTemplateContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeGenerateAwsTemplateContent(document.RootElement, options); - } - - internal static GenerateAwsTemplateContent DeserializeGenerateAwsTemplateContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier connectorId = default; - IList solutionTypes = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connectorId"u8)) - { - connectorId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("solutionTypes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SolutionTypeSettings.DeserializeSolutionTypeSettings(item, options)); - } - solutionTypes = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new GenerateAwsTemplateContent(connectorId, solutionTypes ?? 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); - default: - throw new FormatException($"The model {nameof(GenerateAwsTemplateContent)} does not support writing '{options.Format}' format."); - } - } - - GenerateAwsTemplateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeGenerateAwsTemplateContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(GenerateAwsTemplateContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.cs deleted file mode 100644 index e0b110ab2d549..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/GenerateAwsTemplateContent.cs +++ /dev/null @@ -1,81 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. - public partial class GenerateAwsTemplateContent - { - /// - /// 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 name of public cloud connector. - /// is null. - public GenerateAwsTemplateContent(ResourceIdentifier connectorId) - { - Argument.AssertNotNull(connectorId, nameof(connectorId)); - - ConnectorId = connectorId; - SolutionTypes = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The name of public cloud connector. - /// The list of solution types and their settings. - /// Keeps track of any properties unknown to the library. - internal GenerateAwsTemplateContent(ResourceIdentifier connectorId, IList solutionTypes, IDictionary serializedAdditionalRawData) - { - ConnectorId = connectorId; - SolutionTypes = solutionTypes; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal GenerateAwsTemplateContent() - { - } - - /// The name of public cloud connector. - public ResourceIdentifier ConnectorId { get; } - /// The list of solution types and their settings. - public IList SolutionTypes { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityCloudNativeType.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityCloudNativeType.cs deleted file mode 100644 index bba4a3ea15744..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityCloudNativeType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Cloud Native Type enum. - public readonly partial struct HybridConnectivityCloudNativeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HybridConnectivityCloudNativeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Ec2Value = "ec2"; - - /// ec2 enum. - public static HybridConnectivityCloudNativeType Ec2 { get; } = new HybridConnectivityCloudNativeType(Ec2Value); - /// Determines if two values are the same. - public static bool operator ==(HybridConnectivityCloudNativeType left, HybridConnectivityCloudNativeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HybridConnectivityCloudNativeType left, HybridConnectivityCloudNativeType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator HybridConnectivityCloudNativeType(string value) => new HybridConnectivityCloudNativeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HybridConnectivityCloudNativeType other && Equals(other); - /// - public bool Equals(HybridConnectivityCloudNativeType 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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityHostType.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityHostType.cs deleted file mode 100644 index 0dc254d69489f..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityHostType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Enum of host cloud the public cloud connector is referencing. - public readonly partial struct HybridConnectivityHostType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HybridConnectivityHostType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AWSValue = "AWS"; - - /// AWS state. - public static HybridConnectivityHostType AWS { get; } = new HybridConnectivityHostType(AWSValue); - /// Determines if two values are the same. - public static bool operator ==(HybridConnectivityHostType left, HybridConnectivityHostType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HybridConnectivityHostType left, HybridConnectivityHostType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator HybridConnectivityHostType(string value) => new HybridConnectivityHostType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HybridConnectivityHostType other && Equals(other); - /// - public bool Equals(HybridConnectivityHostType 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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.Serialization.cs deleted file mode 100644 index a1866e7612038..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class HybridConnectivityInventoryProperties : 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(HybridConnectivityInventoryProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(CloudNativeType)) - { - writer.WritePropertyName("cloudNativeType"u8); - writer.WriteStringValue(CloudNativeType.Value.ToString()); - } - if (Optional.IsDefined(CloudNativeResourceId)) - { - writer.WritePropertyName("cloudNativeResourceId"u8); - writer.WriteStringValue(CloudNativeResourceId); - } - if (Optional.IsDefined(AzureResourceId)) - { - writer.WritePropertyName("azureResourceId"u8); - writer.WriteStringValue(AzureResourceId); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (Optional.IsDefined(StatusDetails)) - { - writer.WritePropertyName("statusDetails"u8); - writer.WriteStringValue(StatusDetails); - } - 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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - HybridConnectivityInventoryProperties 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(HybridConnectivityInventoryProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivityInventoryProperties(document.RootElement, options); - } - - internal static HybridConnectivityInventoryProperties DeserializeHybridConnectivityInventoryProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HybridConnectivityCloudNativeType? cloudNativeType = default; - string cloudNativeResourceId = default; - ResourceIdentifier azureResourceId = default; - SolutionConfigurationStatus? status = default; - string statusDetails = default; - HybridConnectivityResourceProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("cloudNativeType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cloudNativeType = new HybridConnectivityCloudNativeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("cloudNativeResourceId"u8)) - { - cloudNativeResourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("azureResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new SolutionConfigurationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("statusDetails"u8)) - { - statusDetails = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new HybridConnectivityResourceProvisioningState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivityInventoryProperties( - cloudNativeType, - cloudNativeResourceId, - azureResourceId, - status, - statusDetails, - 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); - default: - throw new FormatException($"The model {nameof(HybridConnectivityInventoryProperties)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivityInventoryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivityInventoryProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivityInventoryProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.cs deleted file mode 100644 index 6f6b1253e19b6..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityInventoryProperties.cs +++ /dev/null @@ -1,86 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// Definition of inventory. - public partial class HybridConnectivityInventoryProperties - { - /// - /// 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 HybridConnectivityInventoryProperties() - { - } - - /// Initializes a new instance of . - /// Gets or sets the cloud native resource type. - /// Gets or sets the cloud native resource name. - /// Gets or sets the mapped azure resource id. - /// Gets or sets the status of the inventory. - /// Gets or sets the status details. - /// The resource provisioning state. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivityInventoryProperties(HybridConnectivityCloudNativeType? cloudNativeType, string cloudNativeResourceId, ResourceIdentifier azureResourceId, SolutionConfigurationStatus? status, string statusDetails, HybridConnectivityResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) - { - CloudNativeType = cloudNativeType; - CloudNativeResourceId = cloudNativeResourceId; - AzureResourceId = azureResourceId; - Status = status; - StatusDetails = statusDetails; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the cloud native resource type. - public HybridConnectivityCloudNativeType? CloudNativeType { get; set; } - /// Gets or sets the cloud native resource name. - public string CloudNativeResourceId { get; set; } - /// Gets or sets the mapped azure resource id. - public ResourceIdentifier AzureResourceId { get; set; } - /// Gets or sets the status of the inventory. - public SolutionConfigurationStatus? Status { get; set; } - /// Gets or sets the status details. - public string StatusDetails { get; set; } - /// The resource provisioning state. - public HybridConnectivityResourceProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.Serialization.cs deleted file mode 100644 index 312f1480e6284..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.Serialization.cs +++ /dev/null @@ -1,262 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class HybridConnectivityOperationStatusResult : 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(HybridConnectivityOperationStatusResult)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - if (Optional.IsDefined(PercentComplete)) - { - writer.WritePropertyName("percentComplete"u8); - writer.WriteNumberValue(PercentComplete.Value); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsCollectionDefined(Operations)) - { - writer.WritePropertyName("operations"u8); - writer.WriteStartArray(); - foreach (var item in Operations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - JsonSerializer.Serialize(writer, Error); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - HybridConnectivityOperationStatusResult 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(HybridConnectivityOperationStatusResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivityOperationStatusResult(document.RootElement, options); - } - - internal static HybridConnectivityOperationStatusResult DeserializeHybridConnectivityOperationStatusResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - ResourceIdentifier resourceId = default; - string name = default; - string status = default; - float? percentComplete = default; - DateTimeOffset? startTime = default; - DateTimeOffset? endTime = default; - IReadOnlyList operations = default; - ResponseError error = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("percentComplete"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - percentComplete = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("operations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DeserializeHybridConnectivityOperationStatusResult(item, options)); - } - operations = array; - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivityOperationStatusResult( - id, - resourceId, - name, - status, - percentComplete, - startTime, - endTime, - operations ?? new ChangeTrackingList(), - error, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(HybridConnectivityOperationStatusResult)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivityOperationStatusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivityOperationStatusResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivityOperationStatusResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.cs deleted file mode 100644 index 849155e12e103..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityOperationStatusResult.cs +++ /dev/null @@ -1,109 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// The current status of an async operation. - public partial class HybridConnectivityOperationStatusResult - { - /// - /// 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 . - /// Operation status. - /// is null. - internal HybridConnectivityOperationStatusResult(string status) - { - Argument.AssertNotNull(status, nameof(status)); - - Status = status; - Operations = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Fully qualified ID for the async operation. - /// Fully qualified ID of the resource against which the original async operation was started. - /// Name of the async operation. - /// Operation status. - /// Percent of the operation that is complete. - /// The start time of the operation. - /// The end time of the operation. - /// The operations list. - /// If present, details of the operation error. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivityOperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, IDictionary serializedAdditionalRawData) - { - Id = id; - ResourceId = resourceId; - Name = name; - Status = status; - PercentComplete = percentComplete; - StartOn = startOn; - EndOn = endOn; - Operations = operations; - Error = error; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal HybridConnectivityOperationStatusResult() - { - } - - /// Fully qualified ID for the async operation. - public ResourceIdentifier Id { get; } - /// Fully qualified ID of the resource against which the original async operation was started. - public ResourceIdentifier ResourceId { get; } - /// Name of the async operation. - public string Name { get; } - /// Operation status. - public string Status { get; } - /// Percent of the operation that is complete. - public float? PercentComplete { get; } - /// The start time of the operation. - public DateTimeOffset? StartOn { get; } - /// The end time of the operation. - public DateTimeOffset? EndOn { get; } - /// The operations list. - public IReadOnlyList Operations { get; } - /// If present, details of the operation error. - public ResponseError Error { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.Serialization.cs deleted file mode 100644 index 3e763817ed94e..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.Serialization.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - public partial class HybridConnectivityPublicCloudConnectorPatch : 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(HybridConnectivityPublicCloudConnectorPatch)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - } - - HybridConnectivityPublicCloudConnectorPatch 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(HybridConnectivityPublicCloudConnectorPatch)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivityPublicCloudConnectorPatch(document.RootElement, options); - } - - internal static HybridConnectivityPublicCloudConnectorPatch DeserializeHybridConnectivityPublicCloudConnectorPatch(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PublicCloudConnectorPropertiesUpdate properties = default; - IDictionary tags = 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 = PublicCloudConnectorPropertiesUpdate.DeserializePublicCloudConnectorPropertiesUpdate(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("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivityPublicCloudConnectorPatch( - id, - name, - type, - systemData, - properties, - tags ?? new ChangeTrackingDictionary(), - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(HybridConnectivityPublicCloudConnectorPatch)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivityPublicCloudConnectorPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivityPublicCloudConnectorPatch(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivityPublicCloudConnectorPatch)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.cs deleted file mode 100644 index 0b1b6313571de..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityPublicCloudConnectorPatch.cs +++ /dev/null @@ -1,87 +0,0 @@ -// 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; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Public Cloud Connector. - public partial class HybridConnectivityPublicCloudConnectorPatch : 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 HybridConnectivityPublicCloudConnectorPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Resource tags. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivityPublicCloudConnectorPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PublicCloudConnectorPropertiesUpdate properties, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - Tags = tags; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - internal PublicCloudConnectorPropertiesUpdate Properties { get; set; } - /// List of AWS accounts which need to be excluded. - public IList AwsCloudExcludedAccounts - { - get - { - if (Properties is null) - Properties = new PublicCloudConnectorPropertiesUpdate(); - return Properties.AwsCloudExcludedAccounts; - } - } - - /// Resource tags. - public IDictionary Tags { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityResourceProvisioningState.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityResourceProvisioningState.cs deleted file mode 100644 index cf8059cb153b4..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivityResourceProvisioningState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// The provisioning state of a resource type. - public readonly partial struct HybridConnectivityResourceProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HybridConnectivityResourceProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - - /// Resource has been created. - public static HybridConnectivityResourceProvisioningState Succeeded { get; } = new HybridConnectivityResourceProvisioningState(SucceededValue); - /// Resource creation failed. - public static HybridConnectivityResourceProvisioningState Failed { get; } = new HybridConnectivityResourceProvisioningState(FailedValue); - /// Resource creation was canceled. - public static HybridConnectivityResourceProvisioningState Canceled { get; } = new HybridConnectivityResourceProvisioningState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(HybridConnectivityResourceProvisioningState left, HybridConnectivityResourceProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HybridConnectivityResourceProvisioningState left, HybridConnectivityResourceProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator HybridConnectivityResourceProvisioningState(string value) => new HybridConnectivityResourceProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HybridConnectivityResourceProvisioningState other && Equals(other); - /// - public bool Equals(HybridConnectivityResourceProvisioningState 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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.Serialization.cs deleted file mode 100644 index 3958a70010ddc..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - public partial class HybridConnectivitySolutionConfigurationPatch : 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(HybridConnectivitySolutionConfigurationPatch)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - HybridConnectivitySolutionConfigurationPatch 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(HybridConnectivitySolutionConfigurationPatch)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivitySolutionConfigurationPatch(document.RootElement, options); - } - - internal static HybridConnectivitySolutionConfigurationPatch DeserializeHybridConnectivitySolutionConfigurationPatch(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SolutionConfigurationPropertiesUpdate 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 = SolutionConfigurationPropertiesUpdate.DeserializeSolutionConfigurationPropertiesUpdate(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivitySolutionConfigurationPatch( - 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); - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionConfigurationPatch)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivitySolutionConfigurationPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivitySolutionConfigurationPatch(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionConfigurationPatch)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.cs deleted file mode 100644 index d0fe59052e6a1..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionConfigurationPatch.cs +++ /dev/null @@ -1,71 +0,0 @@ -// 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; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Solution Configuration. - public partial class HybridConnectivitySolutionConfigurationPatch : 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 HybridConnectivitySolutionConfigurationPatch() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivitySolutionConfigurationPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SolutionConfigurationPropertiesUpdate properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public SolutionConfigurationPropertiesUpdate Properties { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.Serialization.cs deleted file mode 100644 index 977de90b54d3e..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.Serialization.cs +++ /dev/null @@ -1,190 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class HybridConnectivitySolutionTypeProperties : 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(HybridConnectivitySolutionTypeProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(SolutionType)) - { - writer.WritePropertyName("solutionType"u8); - writer.WriteStringValue(SolutionType); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(SupportedAzureRegions)) - { - writer.WritePropertyName("supportedAzureRegions"u8); - writer.WriteStartArray(); - foreach (var item in SupportedAzureRegions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(SolutionSettings)) - { - writer.WritePropertyName("solutionSettings"u8); - writer.WriteStartArray(); - foreach (var item in SolutionSettings) - { - 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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - HybridConnectivitySolutionTypeProperties 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(HybridConnectivitySolutionTypeProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeHybridConnectivitySolutionTypeProperties(document.RootElement, options); - } - - internal static HybridConnectivitySolutionTypeProperties DeserializeHybridConnectivitySolutionTypeProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string solutionType = default; - string description = default; - IList supportedAzureRegions = default; - IList solutionSettings = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("solutionType"u8)) - { - solutionType = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("supportedAzureRegions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - supportedAzureRegions = array; - continue; - } - if (property.NameEquals("solutionSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SolutionTypeSettingsProperties.DeserializeSolutionTypeSettingsProperties(item, options)); - } - solutionSettings = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new HybridConnectivitySolutionTypeProperties(solutionType, description, supportedAzureRegions ?? new ChangeTrackingList(), solutionSettings ?? 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); - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionTypeProperties)} does not support writing '{options.Format}' format."); - } - } - - HybridConnectivitySolutionTypeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeHybridConnectivitySolutionTypeProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(HybridConnectivitySolutionTypeProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.cs deleted file mode 100644 index 499383e6809f3..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/HybridConnectivitySolutionTypeProperties.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Definition of Solution type resource. - public partial class HybridConnectivitySolutionTypeProperties - { - /// - /// 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 HybridConnectivitySolutionTypeProperties() - { - SupportedAzureRegions = new ChangeTrackingList(); - SolutionSettings = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The name of the solution type. - /// Short description of solution type. - /// The locations this solution is supported in. - /// Array of solution settings and its description. - /// Keeps track of any properties unknown to the library. - internal HybridConnectivitySolutionTypeProperties(string solutionType, string description, IList supportedAzureRegions, IList solutionSettings, IDictionary serializedAdditionalRawData) - { - SolutionType = solutionType; - Description = description; - SupportedAzureRegions = supportedAzureRegions; - SolutionSettings = solutionSettings; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the solution type. - public string SolutionType { get; set; } - /// Short description of solution type. - public string Description { get; set; } - /// The locations this solution is supported in. - public IList SupportedAzureRegions { get; } - /// Array of solution settings and its description. - public IList SolutionSettings { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.Serialization.cs deleted file mode 100644 index 478a5e4d8f776..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// 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.HybridConnectivity.Models -{ - internal partial class InventoryResourceListResult : 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(InventoryResourceListResult)} does not support writing '{format}' format."); - } - - 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.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - InventoryResourceListResult 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(InventoryResourceListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInventoryResourceListResult(document.RootElement, options); - } - - internal static InventoryResourceListResult DeserializeInventoryResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HybridConnectivityInventoryData.DeserializeHybridConnectivityInventoryData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InventoryResourceListResult(value, 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); - default: - throw new FormatException($"The model {nameof(InventoryResourceListResult)} does not support writing '{options.Format}' format."); - } - } - - InventoryResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInventoryResourceListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InventoryResourceListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.cs deleted file mode 100644 index 662d770455b10..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/InventoryResourceListResult.cs +++ /dev/null @@ -1,80 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// The response of a InventoryResource list operation. - internal partial class InventoryResourceListResult - { - /// - /// 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 InventoryResource items on this page. - /// is null. - internal InventoryResourceListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The InventoryResource items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal InventoryResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InventoryResourceListResult() - { - } - - /// The InventoryResource items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.Serialization.cs deleted file mode 100644 index a182a5bd5d10b..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class ListIngressGatewayCredentialsContent : 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(ListIngressGatewayCredentialsContent)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ServiceName)) - { - writer.WritePropertyName("serviceName"u8); - writer.WriteStringValue(ServiceName.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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ListIngressGatewayCredentialsContent 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(ListIngressGatewayCredentialsContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeListIngressGatewayCredentialsContent(document.RootElement, options); - } - - internal static ListIngressGatewayCredentialsContent DeserializeListIngressGatewayCredentialsContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HybridConnectivityServiceName? serviceName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("serviceName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceName = new HybridConnectivityServiceName(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ListIngressGatewayCredentialsContent(serviceName, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ListIngressGatewayCredentialsContent)} does not support writing '{options.Format}' format."); - } - } - - ListIngressGatewayCredentialsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeListIngressGatewayCredentialsContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ListIngressGatewayCredentialsContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.cs deleted file mode 100644 index 86b90d6cdce42..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/ListIngressGatewayCredentialsContent.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Represent ListIngressGatewayCredentials Request object. - public partial class ListIngressGatewayCredentialsContent - { - /// - /// 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 ListIngressGatewayCredentialsContent() - { - } - - /// Initializes a new instance of . - /// The name of the service. - /// Keeps track of any properties unknown to the library. - internal ListIngressGatewayCredentialsContent(HybridConnectivityServiceName? serviceName, IDictionary serializedAdditionalRawData) - { - ServiceName = serviceName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the service. - public HybridConnectivityServiceName? ServiceName { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.Serialization.cs deleted file mode 100644 index 78ba2cc28dcaa..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// 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.HybridConnectivity.Models -{ - internal partial class PublicCloudConnectorListResult : 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(PublicCloudConnectorListResult)} does not support writing '{format}' format."); - } - - 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.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PublicCloudConnectorListResult 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(PublicCloudConnectorListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePublicCloudConnectorListResult(document.RootElement, options); - } - - internal static PublicCloudConnectorListResult DeserializePublicCloudConnectorListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PublicCloudConnectorListResult(value, 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); - default: - throw new FormatException($"The model {nameof(PublicCloudConnectorListResult)} does not support writing '{options.Format}' format."); - } - } - - PublicCloudConnectorListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializePublicCloudConnectorListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PublicCloudConnectorListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.cs deleted file mode 100644 index 072374769512f..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorListResult.cs +++ /dev/null @@ -1,80 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// The response of a PublicCloudConnector list operation. - internal partial class PublicCloudConnectorListResult - { - /// - /// 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 PublicCloudConnector items on this page. - /// is null. - internal PublicCloudConnectorListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The PublicCloudConnector items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal PublicCloudConnectorListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal PublicCloudConnectorListResult() - { - } - - /// The PublicCloudConnector items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.Serialization.cs deleted file mode 100644 index 8e38632ba183f..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.Serialization.cs +++ /dev/null @@ -1,164 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class PublicCloudConnectorProperties : 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(PublicCloudConnectorProperties)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("awsCloudProfile"u8); - writer.WriteObjectValue(AwsCloudProfile, options); - writer.WritePropertyName("hostType"u8); - writer.WriteStringValue(HostType.ToString()); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ConnectorPrimaryIdentifier)) - { - writer.WritePropertyName("connectorPrimaryIdentifier"u8); - writer.WriteStringValue(ConnectorPrimaryIdentifier.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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PublicCloudConnectorProperties 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(PublicCloudConnectorProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePublicCloudConnectorProperties(document.RootElement, options); - } - - internal static PublicCloudConnectorProperties DeserializePublicCloudConnectorProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AwsCloudProfile awsCloudProfile = default; - HybridConnectivityHostType hostType = default; - HybridConnectivityResourceProvisioningState? provisioningState = default; - Guid? connectorPrimaryIdentifier = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("awsCloudProfile"u8)) - { - awsCloudProfile = AwsCloudProfile.DeserializeAwsCloudProfile(property.Value, options); - continue; - } - if (property.NameEquals("hostType"u8)) - { - hostType = new HybridConnectivityHostType(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new HybridConnectivityResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("connectorPrimaryIdentifier"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - connectorPrimaryIdentifier = property.Value.GetGuid(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PublicCloudConnectorProperties(awsCloudProfile, hostType, provisioningState, connectorPrimaryIdentifier, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(PublicCloudConnectorProperties)} does not support writing '{options.Format}' format."); - } - } - - PublicCloudConnectorProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializePublicCloudConnectorProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PublicCloudConnectorProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.cs deleted file mode 100644 index 4a9877a077ad7..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorProperties.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Properties of public cloud connectors. - public partial class PublicCloudConnectorProperties - { - /// - /// 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 . - /// Cloud profile for AWS. - /// Host cloud the public cloud connector. - /// is null. - public PublicCloudConnectorProperties(AwsCloudProfile awsCloudProfile, HybridConnectivityHostType hostType) - { - Argument.AssertNotNull(awsCloudProfile, nameof(awsCloudProfile)); - - AwsCloudProfile = awsCloudProfile; - HostType = hostType; - } - - /// Initializes a new instance of . - /// Cloud profile for AWS. - /// Host cloud the public cloud connector. - /// The resource provisioning state. - /// Connector primary identifier. - /// Keeps track of any properties unknown to the library. - internal PublicCloudConnectorProperties(AwsCloudProfile awsCloudProfile, HybridConnectivityHostType hostType, HybridConnectivityResourceProvisioningState? provisioningState, Guid? connectorPrimaryIdentifier, IDictionary serializedAdditionalRawData) - { - AwsCloudProfile = awsCloudProfile; - HostType = hostType; - ProvisioningState = provisioningState; - ConnectorPrimaryIdentifier = connectorPrimaryIdentifier; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal PublicCloudConnectorProperties() - { - } - - /// Cloud profile for AWS. - public AwsCloudProfile AwsCloudProfile { get; set; } - /// Host cloud the public cloud connector. - public HybridConnectivityHostType HostType { get; set; } - /// The resource provisioning state. - public HybridConnectivityResourceProvisioningState? ProvisioningState { get; } - /// Connector primary identifier. - public Guid? ConnectorPrimaryIdentifier { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.Serialization.cs deleted file mode 100644 index 8f1f39406e2eb..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// 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.HybridConnectivity.Models -{ - internal partial class PublicCloudConnectorPropertiesUpdate : 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(PublicCloudConnectorPropertiesUpdate)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(AwsCloudProfile)) - { - writer.WritePropertyName("awsCloudProfile"u8); - writer.WriteObjectValue(AwsCloudProfile, 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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - PublicCloudConnectorPropertiesUpdate 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(PublicCloudConnectorPropertiesUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePublicCloudConnectorPropertiesUpdate(document.RootElement, options); - } - - internal static PublicCloudConnectorPropertiesUpdate DeserializePublicCloudConnectorPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AwsCloudProfileUpdate awsCloudProfile = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("awsCloudProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - awsCloudProfile = AwsCloudProfileUpdate.DeserializeAwsCloudProfileUpdate(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new PublicCloudConnectorPropertiesUpdate(awsCloudProfile, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(PublicCloudConnectorPropertiesUpdate)} does not support writing '{options.Format}' format."); - } - } - - PublicCloudConnectorPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializePublicCloudConnectorPropertiesUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(PublicCloudConnectorPropertiesUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.cs deleted file mode 100644 index 016e9d94d76e6..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/PublicCloudConnectorPropertiesUpdate.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Properties of public cloud connectors. - internal partial class PublicCloudConnectorPropertiesUpdate - { - /// - /// 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 PublicCloudConnectorPropertiesUpdate() - { - } - - /// Initializes a new instance of . - /// Cloud profile for AWS. - /// Keeps track of any properties unknown to the library. - internal PublicCloudConnectorPropertiesUpdate(AwsCloudProfileUpdate awsCloudProfile, IDictionary serializedAdditionalRawData) - { - AwsCloudProfile = awsCloudProfile; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Cloud profile for AWS. - internal AwsCloudProfileUpdate AwsCloudProfile { get; set; } - /// List of AWS accounts which need to be excluded. - public IList AwsCloudExcludedAccounts - { - get - { - if (AwsCloudProfile is null) - AwsCloudProfile = new AwsCloudProfileUpdate(); - return AwsCloudProfile.ExcludedAccounts; - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.Serialization.cs deleted file mode 100644 index 7c30ec615405f..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// 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.HybridConnectivity.Models -{ - internal partial class SolutionConfigurationListResult : 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(SolutionConfigurationListResult)} does not support writing '{format}' format."); - } - - 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.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SolutionConfigurationListResult 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(SolutionConfigurationListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSolutionConfigurationListResult(document.RootElement, options); - } - - internal static SolutionConfigurationListResult DeserializeSolutionConfigurationListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SolutionConfigurationListResult(value, 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); - default: - throw new FormatException($"The model {nameof(SolutionConfigurationListResult)} does not support writing '{options.Format}' format."); - } - } - - SolutionConfigurationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSolutionConfigurationListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SolutionConfigurationListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.cs deleted file mode 100644 index dd983b4821e27..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationListResult.cs +++ /dev/null @@ -1,80 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// The response of a SolutionConfiguration list operation. - internal partial class SolutionConfigurationListResult - { - /// - /// 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 SolutionConfiguration items on this page. - /// is null. - internal SolutionConfigurationListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The SolutionConfiguration items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal SolutionConfigurationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SolutionConfigurationListResult() - { - } - - /// The SolutionConfiguration items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.Serialization.cs deleted file mode 100644 index 070c00e7c3f52..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.Serialization.cs +++ /dev/null @@ -1,215 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class SolutionConfigurationProperties : 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(SolutionConfigurationProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WritePropertyName("solutionType"u8); - writer.WriteStringValue(SolutionType); - if (Optional.IsCollectionDefined(SolutionSettings)) - { - writer.WritePropertyName("solutionSettings"u8); - writer.WriteStartObject(); - foreach (var item in SolutionSettings) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(StatusDetails)) - { - writer.WritePropertyName("statusDetails"u8); - writer.WriteStringValue(StatusDetails); - } - if (options.Format != "W" && Optional.IsDefined(LastSyncOn)) - { - writer.WritePropertyName("lastSyncTime"u8); - writer.WriteStringValue(LastSyncOn.Value, "O"); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SolutionConfigurationProperties 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(SolutionConfigurationProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSolutionConfigurationProperties(document.RootElement, options); - } - - internal static SolutionConfigurationProperties DeserializeSolutionConfigurationProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HybridConnectivityResourceProvisioningState? provisioningState = default; - string solutionType = default; - IDictionary solutionSettings = default; - SolutionConfigurationStatus? status = default; - string statusDetails = default; - DateTimeOffset? lastSyncTime = 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 HybridConnectivityResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("solutionType"u8)) - { - solutionType = property.Value.GetString(); - continue; - } - if (property.NameEquals("solutionSettings"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()); - } - solutionSettings = dictionary; - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new SolutionConfigurationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("statusDetails"u8)) - { - statusDetails = property.Value.GetString(); - continue; - } - if (property.NameEquals("lastSyncTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastSyncTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SolutionConfigurationProperties( - provisioningState, - solutionType, - solutionSettings ?? new ChangeTrackingDictionary(), - status, - statusDetails, - lastSyncTime, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SolutionConfigurationProperties)} does not support writing '{options.Format}' format."); - } - } - - SolutionConfigurationProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSolutionConfigurationProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SolutionConfigurationProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.cs deleted file mode 100644 index 880f5bda6a0bb..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationProperties.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Solution configuration resource. - public partial class SolutionConfigurationProperties - { - /// - /// 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 type of the solution. - /// is null. - public SolutionConfigurationProperties(string solutionType) - { - Argument.AssertNotNull(solutionType, nameof(solutionType)); - - SolutionType = solutionType; - SolutionSettings = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The resource provisioning state. - /// The type of the solution. - /// Solution settings. - /// The status of solution configurations. - /// The detailed message of status details. - /// The last time resources were inventoried. - /// Keeps track of any properties unknown to the library. - internal SolutionConfigurationProperties(HybridConnectivityResourceProvisioningState? provisioningState, string solutionType, IDictionary solutionSettings, SolutionConfigurationStatus? status, string statusDetails, DateTimeOffset? lastSyncOn, IDictionary serializedAdditionalRawData) - { - ProvisioningState = provisioningState; - SolutionType = solutionType; - SolutionSettings = solutionSettings; - Status = status; - StatusDetails = statusDetails; - LastSyncOn = lastSyncOn; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SolutionConfigurationProperties() - { - } - - /// The resource provisioning state. - public HybridConnectivityResourceProvisioningState? ProvisioningState { get; } - /// The type of the solution. - public string SolutionType { get; set; } - /// Solution settings. - public IDictionary SolutionSettings { get; } - /// The status of solution configurations. - public SolutionConfigurationStatus? Status { get; } - /// The detailed message of status details. - public string StatusDetails { get; } - /// The last time resources were inventoried. - public DateTimeOffset? LastSyncOn { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.Serialization.cs deleted file mode 100644 index 51d4a68ba0b11..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class SolutionConfigurationPropertiesUpdate : 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(SolutionConfigurationPropertiesUpdate)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(SolutionType)) - { - writer.WritePropertyName("solutionType"u8); - writer.WriteStringValue(SolutionType); - } - if (Optional.IsCollectionDefined(SolutionSettings)) - { - writer.WritePropertyName("solutionSettings"u8); - writer.WriteStartObject(); - foreach (var item in SolutionSettings) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SolutionConfigurationPropertiesUpdate 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(SolutionConfigurationPropertiesUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSolutionConfigurationPropertiesUpdate(document.RootElement, options); - } - - internal static SolutionConfigurationPropertiesUpdate DeserializeSolutionConfigurationPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string solutionType = default; - IDictionary solutionSettings = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("solutionType"u8)) - { - solutionType = property.Value.GetString(); - continue; - } - if (property.NameEquals("solutionSettings"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()); - } - solutionSettings = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SolutionConfigurationPropertiesUpdate(solutionType, solutionSettings ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SolutionConfigurationPropertiesUpdate)} does not support writing '{options.Format}' format."); - } - } - - SolutionConfigurationPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSolutionConfigurationPropertiesUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SolutionConfigurationPropertiesUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.cs deleted file mode 100644 index c7e22de5b6fe3..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationPropertiesUpdate.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Solution configuration resource. - public partial class SolutionConfigurationPropertiesUpdate - { - /// - /// 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 SolutionConfigurationPropertiesUpdate() - { - SolutionSettings = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The type of the solution. - /// Solution settings. - /// Keeps track of any properties unknown to the library. - internal SolutionConfigurationPropertiesUpdate(string solutionType, IDictionary solutionSettings, IDictionary serializedAdditionalRawData) - { - SolutionType = solutionType; - SolutionSettings = solutionSettings; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The type of the solution. - public string SolutionType { get; set; } - /// Solution settings. - public IDictionary SolutionSettings { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationStatus.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationStatus.cs deleted file mode 100644 index b9ab234a1721c..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionConfigurationStatus.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// Solution Configuration Status. - public readonly partial struct SolutionConfigurationStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SolutionConfigurationStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NewValue = "New"; - private const string InProgressValue = "InProgress"; - private const string CompletedValue = "Completed"; - private const string FailedValue = "Failed"; - - /// New status. - public static SolutionConfigurationStatus New { get; } = new SolutionConfigurationStatus(NewValue); - /// InProgress status. - public static SolutionConfigurationStatus InProgress { get; } = new SolutionConfigurationStatus(InProgressValue); - /// Canceled status. - public static SolutionConfigurationStatus Completed { get; } = new SolutionConfigurationStatus(CompletedValue); - /// Failed status. - public static SolutionConfigurationStatus Failed { get; } = new SolutionConfigurationStatus(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(SolutionConfigurationStatus left, SolutionConfigurationStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SolutionConfigurationStatus left, SolutionConfigurationStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SolutionConfigurationStatus(string value) => new SolutionConfigurationStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SolutionConfigurationStatus other && Equals(other); - /// - public bool Equals(SolutionConfigurationStatus 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/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.Serialization.cs deleted file mode 100644 index 3b5c791c11e0b..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// 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.HybridConnectivity.Models -{ - internal partial class SolutionTypeResourceListResult : 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(SolutionTypeResourceListResult)} does not support writing '{format}' format."); - } - - 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.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SolutionTypeResourceListResult 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(SolutionTypeResourceListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSolutionTypeResourceListResult(document.RootElement, options); - } - - internal static SolutionTypeResourceListResult DeserializeSolutionTypeResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HybridConnectivitySolutionTypeData.DeserializeHybridConnectivitySolutionTypeData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SolutionTypeResourceListResult(value, 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); - default: - throw new FormatException($"The model {nameof(SolutionTypeResourceListResult)} does not support writing '{options.Format}' format."); - } - } - - SolutionTypeResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSolutionTypeResourceListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SolutionTypeResourceListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.cs deleted file mode 100644 index cea4f8ab32bf8..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeResourceListResult.cs +++ /dev/null @@ -1,80 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// The response of a SolutionTypeResource list operation. - internal partial class SolutionTypeResourceListResult - { - /// - /// 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 SolutionTypeResource items on this page. - /// is null. - internal SolutionTypeResourceListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The SolutionTypeResource items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal SolutionTypeResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SolutionTypeResourceListResult() - { - } - - /// The SolutionTypeResource items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.Serialization.cs deleted file mode 100644 index 3a97aff138a42..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class SolutionTypeSettings : 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(SolutionTypeSettings)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("solutionType"u8); - writer.WriteStringValue(SolutionType); - if (Optional.IsCollectionDefined(SolutionSettings)) - { - writer.WritePropertyName("solutionSettings"u8); - writer.WriteStartObject(); - foreach (var item in SolutionSettings) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SolutionTypeSettings 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(SolutionTypeSettings)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSolutionTypeSettings(document.RootElement, options); - } - - internal static SolutionTypeSettings DeserializeSolutionTypeSettings(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string solutionType = default; - IDictionary solutionSettings = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("solutionType"u8)) - { - solutionType = property.Value.GetString(); - continue; - } - if (property.NameEquals("solutionSettings"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()); - } - solutionSettings = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SolutionTypeSettings(solutionType, solutionSettings ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SolutionTypeSettings)} does not support writing '{options.Format}' format."); - } - } - - SolutionTypeSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSolutionTypeSettings(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SolutionTypeSettings)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.cs deleted file mode 100644 index fe99504126716..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettings.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.HybridConnectivity.Models -{ - /// The properties of Solution Type. - public partial class SolutionTypeSettings - { - /// - /// 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 type of the solution. - /// is null. - public SolutionTypeSettings(string solutionType) - { - Argument.AssertNotNull(solutionType, nameof(solutionType)); - - SolutionType = solutionType; - SolutionSettings = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The type of the solution. - /// Solution settings. - /// Keeps track of any properties unknown to the library. - internal SolutionTypeSettings(string solutionType, IDictionary solutionSettings, IDictionary serializedAdditionalRawData) - { - SolutionType = solutionType; - SolutionSettings = solutionSettings; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SolutionTypeSettings() - { - } - - /// The type of the solution. - public string SolutionType { get; } - /// Solution settings. - public IDictionary SolutionSettings { get; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.Serialization.cs deleted file mode 100644 index 5ed72fee100d2..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// 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.HybridConnectivity.Models -{ - public partial class SolutionTypeSettingsProperties : 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(SolutionTypeSettingsProperties)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(SolutionTypeSettingsPropertiesType); - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - writer.WritePropertyName("allowedValues"u8); - writer.WriteStartArray(); - foreach (var item in AllowedValues) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("defaultValue"u8); - writer.WriteStringValue(DefaultValue); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SolutionTypeSettingsProperties 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(SolutionTypeSettingsProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSolutionTypeSettingsProperties(document.RootElement, options); - } - - internal static SolutionTypeSettingsProperties DeserializeSolutionTypeSettingsProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string displayName = default; - string type = default; - string description = default; - IList allowedValues = default; - string defaultValue = 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("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("allowedValues"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - allowedValues = array; - continue; - } - if (property.NameEquals("defaultValue"u8)) - { - defaultValue = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SolutionTypeSettingsProperties( - name, - displayName, - type, - description, - allowedValues, - defaultValue, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SolutionTypeSettingsProperties)} does not support writing '{options.Format}' format."); - } - } - - SolutionTypeSettingsProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSolutionTypeSettingsProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SolutionTypeSettingsProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.cs deleted file mode 100644 index 7ae0608185400..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/Models/SolutionTypeSettingsProperties.cs +++ /dev/null @@ -1,111 +0,0 @@ -// 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.HybridConnectivity.Models -{ - /// Represent Solution settings properties description array. - public partial class SolutionTypeSettingsProperties - { - /// - /// 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 name of the solution setting property. - /// The UI friendly name of the solution setting property. - /// Type of the solution setting property, represented as a string. - /// Description of solution setting property. - /// Array of allowed values for this solution settings property. - /// Default value for this solution settings property. - /// , , , , or is null. - public SolutionTypeSettingsProperties(string name, string displayName, string solutionTypeSettingsPropertiesType, string description, IEnumerable allowedValues, string defaultValue) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(displayName, nameof(displayName)); - Argument.AssertNotNull(solutionTypeSettingsPropertiesType, nameof(solutionTypeSettingsPropertiesType)); - Argument.AssertNotNull(description, nameof(description)); - Argument.AssertNotNull(allowedValues, nameof(allowedValues)); - Argument.AssertNotNull(defaultValue, nameof(defaultValue)); - - Name = name; - DisplayName = displayName; - SolutionTypeSettingsPropertiesType = solutionTypeSettingsPropertiesType; - Description = description; - AllowedValues = allowedValues.ToList(); - DefaultValue = defaultValue; - } - - /// Initializes a new instance of . - /// The name of the solution setting property. - /// The UI friendly name of the solution setting property. - /// Type of the solution setting property, represented as a string. - /// Description of solution setting property. - /// Array of allowed values for this solution settings property. - /// Default value for this solution settings property. - /// Keeps track of any properties unknown to the library. - internal SolutionTypeSettingsProperties(string name, string displayName, string solutionTypeSettingsPropertiesType, string description, IList allowedValues, string defaultValue, IDictionary serializedAdditionalRawData) - { - Name = name; - DisplayName = displayName; - SolutionTypeSettingsPropertiesType = solutionTypeSettingsPropertiesType; - Description = description; - AllowedValues = allowedValues; - DefaultValue = defaultValue; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SolutionTypeSettingsProperties() - { - } - - /// The name of the solution setting property. - public string Name { get; set; } - /// The UI friendly name of the solution setting property. - public string DisplayName { get; set; } - /// Type of the solution setting property, represented as a string. - public string SolutionTypeSettingsPropertiesType { get; set; } - /// Description of solution setting property. - public string Description { get; set; } - /// Array of allowed values for this solution settings property. - public IList AllowedValues { get; } - /// Default value for this solution settings property. - public string DefaultValue { get; set; } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/EndpointsRestOperations.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/EndpointsRestOperations.cs index 9a03495869b7a..171c0ad89a9ed 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/EndpointsRestOperations.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/EndpointsRestOperations.cs @@ -32,7 +32,7 @@ public EndpointsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01"; + _apiVersion = apiVersion ?? "2023-03-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -555,7 +555,7 @@ public Response ListCredentials(string resourceUri } } - internal RequestUriBuilder CreateListIngressGatewayCredentialsRequestUri(string resourceUri, string endpointName, ListIngressGatewayCredentialsContent content, long? expiresin) + internal RequestUriBuilder CreateListIngressGatewayCredentialsRequestUri(string resourceUri, string endpointName, long? expiresin) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -572,7 +572,7 @@ internal RequestUriBuilder CreateListIngressGatewayCredentialsRequestUri(string return uri; } - internal HttpMessage CreateListIngressGatewayCredentialsRequest(string resourceUri, string endpointName, ListIngressGatewayCredentialsContent content, long? expiresin) + internal HttpMessage CreateListIngressGatewayCredentialsRequest(string resourceUri, string endpointName, long? expiresin) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -591,13 +591,6 @@ internal HttpMessage CreateListIngressGatewayCredentialsRequest(string resourceU } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (content != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - } _userAgent.Apply(message); return message; } @@ -605,16 +598,15 @@ internal HttpMessage CreateListIngressGatewayCredentialsRequest(string resourceU /// Gets the ingress gateway endpoint credentials. /// The fully qualified Azure Resource manager identifier of the resource to be connected. /// The endpoint name. - /// Object of type ListIngressGatewayCredentialsRequest. /// The is how long the endpoint access token is valid (in seconds). /// The cancellation token to use. /// or is null. - public async Task> ListIngressGatewayCredentialsAsync(string resourceUri, string endpointName, ListIngressGatewayCredentialsContent content = null, long? expiresin = null, CancellationToken cancellationToken = default) + public async Task> ListIngressGatewayCredentialsAsync(string resourceUri, string endpointName, long? expiresin = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceUri, nameof(resourceUri)); Argument.AssertNotNull(endpointName, nameof(endpointName)); - using var message = CreateListIngressGatewayCredentialsRequest(resourceUri, endpointName, content, expiresin); + using var message = CreateListIngressGatewayCredentialsRequest(resourceUri, endpointName, expiresin); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -633,16 +625,15 @@ public async Task> ListIngressGatewayCredentialsAs /// Gets the ingress gateway endpoint credentials. /// The fully qualified Azure Resource manager identifier of the resource to be connected. /// The endpoint name. - /// Object of type ListIngressGatewayCredentialsRequest. /// The is how long the endpoint access token is valid (in seconds). /// The cancellation token to use. /// or is null. - public Response ListIngressGatewayCredentials(string resourceUri, string endpointName, ListIngressGatewayCredentialsContent content = null, long? expiresin = null, CancellationToken cancellationToken = default) + public Response ListIngressGatewayCredentials(string resourceUri, string endpointName, long? expiresin = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceUri, nameof(resourceUri)); Argument.AssertNotNull(endpointName, nameof(endpointName)); - using var message = CreateListIngressGatewayCredentialsRequest(resourceUri, endpointName, content, expiresin); + using var message = CreateListIngressGatewayCredentialsRequest(resourceUri, endpointName, expiresin); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/GenerateAwsTemplateRestOperations.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/GenerateAwsTemplateRestOperations.cs deleted file mode 100644 index 85e3182d62144..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/GenerateAwsTemplateRestOperations.cs +++ /dev/null @@ -1,122 +0,0 @@ -// 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.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - internal partial class GenerateAwsTemplateRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of GenerateAwsTemplateRestOperations. - /// 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 GenerateAwsTemplateRestOperations(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-12-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreatePostRequestUri(string subscriptionId, GenerateAwsTemplateContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/generateAwsTemplate", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreatePostRequest(string subscriptionId, GenerateAwsTemplateContent content) - { - 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.HybridConnectivity/generateAwsTemplate", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Retrieve AWS Cloud Formation template. - /// The ID of the target subscription. The value must be an UUID. - /// ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> PostAsync(string subscriptionId, GenerateAwsTemplateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreatePostRequest(subscriptionId, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - BinaryData value = default; - value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Retrieve AWS Cloud Formation template. - /// The ID of the target subscription. The value must be an UUID. - /// ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response Post(string subscriptionId, GenerateAwsTemplateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreatePostRequest(subscriptionId, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - BinaryData value = default; - value = BinaryData.FromStream(message.Response.ContentStream); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/InventoryRestOperations.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/InventoryRestOperations.cs deleted file mode 100644 index f768c11ca8ac0..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/InventoryRestOperations.cs +++ /dev/null @@ -1,301 +0,0 @@ -// 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.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - internal partial class InventoryRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of InventoryRestOperations. - /// 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 InventoryRestOperations(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-12-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListBySolutionConfigurationRequestUri(string resourceUri, string solutionConfiguration) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendPath("/inventory", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySolutionConfigurationRequest(string resourceUri, string solutionConfiguration) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendPath("/inventory", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List InventoryResource resources by SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySolutionConfigurationAsync(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateListBySolutionConfigurationRequest(resourceUri, solutionConfiguration); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - InventoryResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = InventoryResourceListResult.DeserializeInventoryResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List InventoryResource resources by SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySolutionConfiguration(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateListBySolutionConfigurationRequest(resourceUri, solutionConfiguration); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - InventoryResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = InventoryResourceListResult.DeserializeInventoryResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string solutionConfiguration, string inventoryId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendPath("/inventory/", false); - uri.AppendPath(inventoryId, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string resourceUri, string solutionConfiguration, string inventoryId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendPath("/inventory/", false); - uri.AppendPath(inventoryId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a InventoryResource. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// Inventory resource. - /// 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 resourceUri, string solutionConfiguration, string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var message = CreateGetRequest(resourceUri, solutionConfiguration, inventoryId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivityInventoryData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridConnectivityInventoryData.DeserializeHybridConnectivityInventoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivityInventoryData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a InventoryResource. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// Inventory resource. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Get(string resourceUri, string solutionConfiguration, string inventoryId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNullOrEmpty(inventoryId, nameof(inventoryId)); - - using var message = CreateGetRequest(resourceUri, solutionConfiguration, inventoryId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivityInventoryData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridConnectivityInventoryData.DeserializeHybridConnectivityInventoryData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivityInventoryData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySolutionConfigurationNextPageRequestUri(string nextLink, string resourceUri, string solutionConfiguration) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySolutionConfigurationNextPageRequest(string nextLink, string resourceUri, string solutionConfiguration) - { - 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; - } - - /// List InventoryResource resources by SolutionConfiguration. - /// The URL to the next page of results. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySolutionConfigurationNextPageAsync(string nextLink, string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateListBySolutionConfigurationNextPageRequest(nextLink, resourceUri, solutionConfiguration); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - InventoryResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = InventoryResourceListResult.DeserializeInventoryResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List InventoryResource resources by SolutionConfiguration. - /// The URL to the next page of results. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySolutionConfigurationNextPage(string nextLink, string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateListBySolutionConfigurationNextPageRequest(nextLink, resourceUri, solutionConfiguration); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - InventoryResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = InventoryResourceListResult.DeserializeInventoryResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/PublicCloudConnectorsRestOperations.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/PublicCloudConnectorsRestOperations.cs deleted file mode 100644 index 46e89600d3fe3..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/PublicCloudConnectorsRestOperations.cs +++ /dev/null @@ -1,817 +0,0 @@ -// 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.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - internal partial class PublicCloudConnectorsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PublicCloudConnectorsRestOperations. - /// 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 PublicCloudConnectorsRestOperations(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-12-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/publicCloudConnectors", 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.HybridConnectivity/publicCloudConnectors", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List PublicCloudConnector resources by subscription ID. - /// 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: - { - PublicCloudConnectorListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List PublicCloudConnector resources by subscription ID. - /// 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: - { - PublicCloudConnectorListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(document.RootElement); - return Response.FromValue(value, 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.HybridConnectivity/publicCloudConnectors", 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.HybridConnectivity/publicCloudConnectors", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List PublicCloudConnector resources by 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: - { - PublicCloudConnectorListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List PublicCloudConnector resources by 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: - { - PublicCloudConnectorListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string publicCloudConnector) - { - 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string publicCloudConnector) - { - 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// 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 publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, publicCloudConnector); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivityPublicCloudConnectorData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivityPublicCloudConnectorData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// 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 publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, publicCloudConnector); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivityPublicCloudConnectorData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivityPublicCloudConnectorData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string publicCloudConnector, HybridConnectivityPublicCloudConnectorData 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string publicCloudConnector, HybridConnectivityPublicCloudConnectorData 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, 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; - } - - /// Create a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// Resource create parameters. - /// 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 resourceGroupName, string publicCloudConnector, HybridConnectivityPublicCloudConnectorData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, publicCloudConnector, 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); - } - } - - /// Create a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// Resource create parameters. - /// 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 resourceGroupName, string publicCloudConnector, HybridConnectivityPublicCloudConnectorData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, publicCloudConnector, 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 publicCloudConnector, HybridConnectivityPublicCloudConnectorPatch 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string publicCloudConnector, HybridConnectivityPublicCloudConnectorPatch patch) - { - 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// The resource properties to be updated. - /// 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 publicCloudConnector, HybridConnectivityPublicCloudConnectorPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, publicCloudConnector, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivityPublicCloudConnectorData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// The resource properties to be updated. - /// 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 publicCloudConnector, HybridConnectivityPublicCloudConnectorPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, publicCloudConnector, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivityPublicCloudConnectorData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridConnectivityPublicCloudConnectorData.DeserializeHybridConnectivityPublicCloudConnectorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string publicCloudConnector) - { - 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string publicCloudConnector) - { - 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// 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 publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, publicCloudConnector); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a PublicCloudConnector. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// 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 publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, publicCloudConnector); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateTestPermissionsRequestUri(string subscriptionId, string resourceGroupName, string publicCloudConnector) - { - 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.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendPath("/testPermissions", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateTestPermissionsRequest(string subscriptionId, string resourceGroupName, string publicCloudConnector) - { - 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("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/publicCloudConnectors/", false); - uri.AppendPath(publicCloudConnector, true); - uri.AppendPath("/testPermissions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// A long-running resource action. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task TestPermissionsAsync(string subscriptionId, string resourceGroupName, string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var message = CreateTestPermissionsRequest(subscriptionId, resourceGroupName, publicCloudConnector); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// A long-running resource action. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Represent public cloud connectors resource. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response TestPermissions(string subscriptionId, string resourceGroupName, string publicCloudConnector, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(publicCloudConnector, nameof(publicCloudConnector)); - - using var message = CreateTestPermissionsRequest(subscriptionId, resourceGroupName, publicCloudConnector); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return 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; - } - - /// List PublicCloudConnector resources by subscription ID. - /// 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: - { - PublicCloudConnectorListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List PublicCloudConnector resources by subscription ID. - /// 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: - { - PublicCloudConnectorListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(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; - } - - /// List PublicCloudConnector resources by 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: - { - PublicCloudConnectorListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List PublicCloudConnector resources by 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: - { - PublicCloudConnectorListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PublicCloudConnectorListResult.DeserializePublicCloudConnectorListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/ServiceConfigurationsRestOperations.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/ServiceConfigurationsRestOperations.cs index e725242eddf8c..5e3033e5a3fed 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/ServiceConfigurationsRestOperations.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/ServiceConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public ServiceConfigurationsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01"; + _apiVersion = apiVersion ?? "2023-03-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionConfigurationsRestOperations.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionConfigurationsRestOperations.cs deleted file mode 100644 index ddcf067c9c1ee..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionConfigurationsRestOperations.cs +++ /dev/null @@ -1,617 +0,0 @@ -// 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.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - internal partial class SolutionConfigurationsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of SolutionConfigurationsRestOperations. - /// 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 SolutionConfigurationsRestOperations(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-12-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string resourceUri) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string resourceUri) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List SolutionConfiguration resources by parent. - /// The fully qualified Azure Resource manager identifier of the resource. - /// The cancellation token to use. - /// is null. - public async Task> ListAsync(string resourceUri, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - - using var message = CreateListRequest(resourceUri); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SolutionConfigurationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SolutionConfigurationListResult.DeserializeSolutionConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List SolutionConfiguration resources by parent. - /// The fully qualified Azure Resource manager identifier of the resource. - /// The cancellation token to use. - /// is null. - public Response List(string resourceUri, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - - using var message = CreateListRequest(resourceUri); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SolutionConfigurationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SolutionConfigurationListResult.DeserializeSolutionConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string resourceUri, string solutionConfiguration) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string resourceUri, string solutionConfiguration) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateGetRequest(resourceUri, solutionConfiguration); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivitySolutionConfigurationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivitySolutionConfigurationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response Get(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateGetRequest(resourceUri, solutionConfiguration); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivitySolutionConfigurationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivitySolutionConfigurationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationData data) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, 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; - } - - /// Create a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// Resource create parameters. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(resourceUri, solutionConfiguration, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - HybridConnectivitySolutionConfigurationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// Resource create parameters. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(resourceUri, solutionConfiguration, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - HybridConnectivitySolutionConfigurationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationPatch patch) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationPatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(resourceUri, solutionConfiguration, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivitySolutionConfigurationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public Response Update(string resourceUri, string solutionConfiguration, HybridConnectivitySolutionConfigurationPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(resourceUri, solutionConfiguration, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivitySolutionConfigurationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridConnectivitySolutionConfigurationData.DeserializeHybridConnectivitySolutionConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string resourceUri, string solutionConfiguration) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string resourceUri, string solutionConfiguration) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateDeleteRequest(resourceUri, solutionConfiguration); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a SolutionConfiguration. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response Delete(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateDeleteRequest(resourceUri, solutionConfiguration); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateSyncNowRequestUri(string resourceUri, string solutionConfiguration) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendPath("/syncNow", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateSyncNowRequest(string resourceUri, string solutionConfiguration) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionConfigurations/", false); - uri.AppendPath(solutionConfiguration, true); - uri.AppendPath("/syncNow", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Trigger immediate sync with source cloud. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task SyncNowAsync(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateSyncNowRequest(resourceUri, solutionConfiguration); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Trigger immediate sync with source cloud. - /// The fully qualified Azure Resource manager identifier of the resource. - /// Represent Solution Configuration Resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response SyncNow(string resourceUri, string solutionConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - Argument.AssertNotNullOrEmpty(solutionConfiguration, nameof(solutionConfiguration)); - - using var message = CreateSyncNowRequest(resourceUri, solutionConfiguration); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string resourceUri) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceUri) - { - 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; - } - - /// List SolutionConfiguration resources by parent. - /// The URL to the next page of results. - /// The fully qualified Azure Resource manager identifier of the resource. - /// The cancellation token to use. - /// or is null. - public async Task> ListNextPageAsync(string nextLink, string resourceUri, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - - using var message = CreateListNextPageRequest(nextLink, resourceUri); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SolutionConfigurationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SolutionConfigurationListResult.DeserializeSolutionConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List SolutionConfiguration resources by parent. - /// The URL to the next page of results. - /// The fully qualified Azure Resource manager identifier of the resource. - /// The cancellation token to use. - /// or is null. - public Response ListNextPage(string nextLink, string resourceUri, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - - using var message = CreateListNextPageRequest(nextLink, resourceUri); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SolutionConfigurationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SolutionConfigurationListResult.DeserializeSolutionConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionTypesRestOperations.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionTypesRestOperations.cs deleted file mode 100644 index 4126bbfd0b056..0000000000000 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/RestOperations/SolutionTypesRestOperations.cs +++ /dev/null @@ -1,455 +0,0 @@ -// 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.HybridConnectivity.Models; - -namespace Azure.ResourceManager.HybridConnectivity -{ - internal partial class SolutionTypesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of SolutionTypesRestOperations. - /// 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 SolutionTypesRestOperations(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-12-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HybridConnectivity/solutionTypes", 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.HybridConnectivity/solutionTypes", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List SolutionTypeResource resources by subscription ID. - /// 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: - { - SolutionTypeResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List SolutionTypeResource resources by subscription ID. - /// 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: - { - SolutionTypeResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(document.RootElement); - return Response.FromValue(value, 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.HybridConnectivity/solutionTypes", 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.HybridConnectivity/solutionTypes", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List SolutionTypeResource resources by 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: - { - SolutionTypeResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List SolutionTypeResource resources by 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: - { - SolutionTypeResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string solutionType) - { - 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.HybridConnectivity/solutionTypes/", false); - uri.AppendPath(solutionType, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string solutionType) - { - 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.HybridConnectivity/solutionTypes/", false); - uri.AppendPath(solutionType, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a SolutionTypeResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Solution Type resource. - /// 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 solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, solutionType); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivitySolutionTypeData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HybridConnectivitySolutionTypeData.DeserializeHybridConnectivitySolutionTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivitySolutionTypeData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a SolutionTypeResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Solution Type resource. - /// 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 solutionType, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(solutionType, nameof(solutionType)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, solutionType); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HybridConnectivitySolutionTypeData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HybridConnectivitySolutionTypeData.DeserializeHybridConnectivitySolutionTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HybridConnectivitySolutionTypeData)null, 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; - } - - /// List SolutionTypeResource resources by subscription ID. - /// 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: - { - SolutionTypeResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List SolutionTypeResource resources by subscription ID. - /// 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: - { - SolutionTypeResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(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; - } - - /// List SolutionTypeResource resources by 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: - { - SolutionTypeResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List SolutionTypeResource resources by 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: - { - SolutionTypeResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SolutionTypeResourceListResult.DeserializeSolutionTypeResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/autorest.md b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/autorest.md index 54385e9061163..87d7241b27954 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/autorest.md +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/autorest.md @@ -9,8 +9,8 @@ csharp: true library-name: HybridConnectivity namespace: Azure.ResourceManager.HybridConnectivity # default tag is a preview version -require: https://github.com/Azure/azure-rest-api-specs/blob/fe44d3261ff0ea816315126120672ccec78c3074/specification/hybridconnectivity/resource-manager/readme.md -#tag: package-2024-12 +require: https://github.com/Azure/azure-rest-api-specs/blob/5f869da70574588b5af7c46a20de802cb8edc093/specification/hybridconnectivity/resource-manager/readme.md +#tag: package-2023-03 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -55,31 +55,31 @@ acronym-mapping: Etag: ETag|etag prepend-rp-prefix: - - CloudNativeType + # - CloudNativeType - EndpointProperties - - HostType - - InventoryProperties + # - HostType + # - InventoryProperties - ProvisioningState - - ResourceProvisioningState + # - ResourceProvisioningState - ServiceName - - SolutionConfiguration - - PublicCloudConnector - - OperationStatusResult - - SolutionTypeProperties + # - SolutionConfiguration + # - PublicCloudConnector + # - OperationStatusResult + # - SolutionTypeProperties rename-mapping: EndpointResource: HybridConnectivityEndpoint - InventoryResource: HybridConnectivityInventory + # InventoryResource: HybridConnectivityInventory ServiceConfigurationResource: HybridConnectivityServiceConfiguration - SolutionTypeResource: HybridConnectivitySolutionType + # SolutionTypeResource: HybridConnectivitySolutionType IngressGatewayResource: IngressGatewayAsset ManagedProxyResource: ManagedProxyAsset IngressGatewayResource.ingress.aadProfile.serverId: -|uuid - PublicCloudConnectorProperties.connectorPrimaryIdentifier: -|uuid + # PublicCloudConnectorProperties.connectorPrimaryIdentifier: -|uuid EndpointProperties.resourceId: -|arm-id - InventoryProperties.azureResourceId: -|arm-id + # InventoryProperties.azureResourceId: -|arm-id ServiceConfigurationResource.properties.resourceId: -|arm-id - GenerateAwsTemplateRequest.connectorId: -|arm-id + # GenerateAwsTemplateRequest.connectorId: -|arm-id EndpointAccessResource: TargetResourceEndpointAccess directive: diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/HybridConnectivityManagementTestBase.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/HybridConnectivityManagementTestBase.cs index 7ffeff08fef05..3b8bea46df4f5 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/HybridConnectivityManagementTestBase.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/HybridConnectivityManagementTestBase.cs @@ -47,20 +47,21 @@ protected async Task CreateResourceGroup() return lro.Value; } - protected async Task CreatePublicCloudConnector(ResourceGroupResource rg) - { - var connectorData = new HybridConnectivityPublicCloudConnectorData(DefaultLocation) { }; + // Comment out the following code as it is not used in version 2023-03-01 + //protected async Task CreatePublicCloudConnector(ResourceGroupResource rg) + //{ + // var connectorData = new HybridConnectivityPublicCloudConnectorData(DefaultLocation) { }; - var awsCloudProfile = new AwsCloudProfile("123456789123") { }; - awsCloudProfile.IsOrganizationalAccount = false; + // var awsCloudProfile = new AwsCloudProfile("123456789123") { }; + // awsCloudProfile.IsOrganizationalAccount = false; - var properties = new PublicCloudConnectorProperties(awsCloudProfile, HybridConnectivityHostType.AWS) { }; + // var properties = new PublicCloudConnectorProperties(awsCloudProfile, HybridConnectivityHostType.AWS) { }; - connectorData.Properties = properties; + // connectorData.Properties = properties; - var collection = rg.GetHybridConnectivityPublicCloudConnectors(); - var pcc = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ConnectorName, connectorData); - return pcc.Value; - } + // var collection = rg.GetHybridConnectivityPublicCloudConnectors(); + // var pcc = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ConnectorName, connectorData); + // return pcc.Value; + //} } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Scenario/HybridConnectivityPublicCloudConnectorTest.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Scenario/HybridConnectivityPublicCloudConnectorTest.cs index 715c299a30624..000904bfd5040 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Scenario/HybridConnectivityPublicCloudConnectorTest.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tests/Scenario/HybridConnectivityPublicCloudConnectorTest.cs @@ -14,86 +14,87 @@ namespace Azure.ResourceManager.HybridConnectivity.Tests.Scenario { - [LiveOnly] - public class HybridConnectivityPublicCloudConnectorTest : HybridConnectivityManagementTestBase - { - private HybridConnectivityPublicCloudConnectorResource _testConnector; - - private ResourceGroupResource _testRG; - - public HybridConnectivityPublicCloudConnectorTest(bool isAsync) : base(isAsync, RecordedTestMode.Record) - { - } - - [SetUp] - public async Task TestSetUp() - { - _testRG = await CreateResourceGroup(); - Assert.IsNotNull(_testRG, "Resource Group initialization failed."); - - _testConnector = await CreatePublicCloudConnector(_testRG); - Assert.IsNotNull(_testConnector, "Public Cloud Connector initialization failed."); - } - - [TearDown] - public async Task TearDown() - { - var deleteResp = await _testConnector.DeleteAsync(WaitUntil.Completed); - Assert.AreEqual(200, deleteResp.GetRawResponse().Status); - } - - [RecordedTest] - public async Task TestPublicCloudConnector() - { - var connectorCollection = _testRG.GetHybridConnectivityPublicCloudConnectors(); - Assert.IsNotNull(connectorCollection); - - await createSolutionConfiguration(); - - var testPermissionResp = await _testConnector.TestPermissionsAsync(WaitUntil.Completed); - Assert.IsNotNull(testPermissionResp); - Assert.AreEqual(200, testPermissionResp.GetRawResponse().Status); - } - - [RecordedTest] - public async Task TestSolutionConfiguration() - { - var sc = await createSolutionConfiguration(); - - var patchData = new HybridConnectivitySolutionConfigurationPatch(); - patchData.Properties = new SolutionConfigurationPropertiesUpdate(); - patchData.Properties.SolutionType = "Microsoft.AssetManagement"; - patchData.Properties.SolutionSettings.Add("periodicSync", "true"); - patchData.Properties.SolutionSettings.Add("periodicSyncTime", "2"); - - var updateResp = await sc.UpdateAsync(patchData); - Assert.AreEqual(200, updateResp.GetRawResponse().Status); - Assert.AreEqual("2", updateResp.Value.Data.Properties.SolutionSettings["periodicSyncTime"]); - - var deleteResp = await sc.DeleteAsync(WaitUntil.Completed); - Assert.AreEqual(200, deleteResp.GetRawResponse().Status); - } - - protected async Task createSolutionConfiguration() - { - var scopeId = _testConnector.Id; - var scCollection = ArmClient.GetHybridConnectivitySolutionConfigurations(scopeId); - Assert.IsNotNull(scCollection); - - var scProperties = new SolutionConfigurationProperties(AssetManagementType); - scProperties.SolutionSettings.Add("periodicSync", "true"); - scProperties.SolutionSettings.Add("periodicSyncTime", "1"); - scProperties.SolutionSettings.Add("cloudProviderServiceTypes", "ec2,s3"); - scProperties.SolutionSettings.Add("awsGlobalReadOnly", "true"); - scProperties.SolutionSettings.Add("cloudProviderRegions", "us-east-1"); - - var scData = new HybridConnectivitySolutionConfigurationData(); - scData.Properties = scProperties; - - var scTask = await scCollection.CreateOrUpdateAsync(WaitUntil.Completed, SolutionConfigurationName, scData); - var sc = scTask.Value; - Assert.IsNotNull(sc); - return sc; - } - } + // Comment out the following code as it is not used in version 2023-03-01 + //[LiveOnly] + //public class HybridConnectivityPublicCloudConnectorTest : HybridConnectivityManagementTestBase + //{ + // private HybridConnectivityPublicCloudConnectorResource _testConnector; + + // private ResourceGroupResource _testRG; + + // public HybridConnectivityPublicCloudConnectorTest(bool isAsync) : base(isAsync, RecordedTestMode.Record) + // { + // } + + // [SetUp] + // public async Task TestSetUp() + // { + // _testRG = await CreateResourceGroup(); + // Assert.IsNotNull(_testRG, "Resource Group initialization failed."); + + // _testConnector = await CreatePublicCloudConnector(_testRG); + // Assert.IsNotNull(_testConnector, "Public Cloud Connector initialization failed."); + // } + + // [TearDown] + // public async Task TearDown() + // { + // var deleteResp = await _testConnector.DeleteAsync(WaitUntil.Completed); + // Assert.AreEqual(200, deleteResp.GetRawResponse().Status); + // } + + // [RecordedTest] + // public async Task TestPublicCloudConnector() + // { + // var connectorCollection = _testRG.GetHybridConnectivityPublicCloudConnectors(); + // Assert.IsNotNull(connectorCollection); + + // await createSolutionConfiguration(); + + // var testPermissionResp = await _testConnector.TestPermissionsAsync(WaitUntil.Completed); + // Assert.IsNotNull(testPermissionResp); + // Assert.AreEqual(200, testPermissionResp.GetRawResponse().Status); + // } + + // [RecordedTest] + // public async Task TestSolutionConfiguration() + // { + // var sc = await createSolutionConfiguration(); + + // var patchData = new HybridConnectivitySolutionConfigurationPatch(); + // patchData.Properties = new SolutionConfigurationPropertiesUpdate(); + // patchData.Properties.SolutionType = "Microsoft.AssetManagement"; + // patchData.Properties.SolutionSettings.Add("periodicSync", "true"); + // patchData.Properties.SolutionSettings.Add("periodicSyncTime", "2"); + + // var updateResp = await sc.UpdateAsync(patchData); + // Assert.AreEqual(200, updateResp.GetRawResponse().Status); + // Assert.AreEqual("2", updateResp.Value.Data.Properties.SolutionSettings["periodicSyncTime"]); + + // var deleteResp = await sc.DeleteAsync(WaitUntil.Completed); + // Assert.AreEqual(200, deleteResp.GetRawResponse().Status); + // } + + // protected async Task createSolutionConfiguration() + // { + // var scopeId = _testConnector.Id; + // var scCollection = ArmClient.GetHybridConnectivitySolutionConfigurations(scopeId); + // Assert.IsNotNull(scCollection); + + // var scProperties = new SolutionConfigurationProperties(AssetManagementType); + // scProperties.SolutionSettings.Add("periodicSync", "true"); + // scProperties.SolutionSettings.Add("periodicSyncTime", "1"); + // scProperties.SolutionSettings.Add("cloudProviderServiceTypes", "ec2,s3"); + // scProperties.SolutionSettings.Add("awsGlobalReadOnly", "true"); + // scProperties.SolutionSettings.Add("cloudProviderRegions", "us-east-1"); + + // var scData = new HybridConnectivitySolutionConfigurationData(); + // scData.Properties = scProperties; + + // var scTask = await scCollection.CreateOrUpdateAsync(WaitUntil.Completed, SolutionConfigurationName, scData); + // var sc = scTask.Value; + // Assert.IsNotNull(sc); + // return sc; + // } + //} }