From 6bf4aa839293e5a8029ebbcd9b51337a1e40bf50 Mon Sep 17 00:00:00 2001 From: siddiavinashmsft <117774802+siddiavinashmsft@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:43:50 -0400 Subject: [PATCH] Genrated new SDK's (#44289) --- ...ResourceManager.SelfHelp.netstandard2.0.cs | 24 +-- .../assets.json | 2 +- .../Sample_SubscriptionResourceExtensions.cs | 6 +- .../Sample_TenantResourceExtensions.cs | 11 +- .../src/Generated/ArmSelfHelpModelFactory.cs | 2 +- .../Extensions/MockableSelfHelpArmClient.cs | 8 +- .../MockableSelfHelpSubscriptionResource.cs | 24 +-- .../MockableSelfHelpTenantResource.cs | 32 +-- .../Extensions/SelfHelpExtensions.cs | 48 ++--- .../Generated/Models/DiscoveryNlpContent.cs | 4 +- .../CheckNameAvailabilityRestOperations.cs | 12 +- .../DiscoverySolutionNLPRestOperations.cs | 197 ++++++++++++++++++ ...utionNLPSubscriptionScopeRestOperations.cs | 126 ----------- ...erySolutionNLPTenantScopeRestOperations.cs | 112 ---------- .../src/autorest.md | 9 +- .../tests/DiscoverySolutionNLPTests.cs | 18 +- .../tests/DiscoverySolutionsTests.cs | 2 +- 17 files changed, 300 insertions(+), 337 deletions(-) create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPRestOperations.cs delete mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPSubscriptionScopeRestOperations.cs delete mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPTenantScopeRestOperations.cs diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs index 59c393e65253e..47448a54ff99c 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs @@ -47,16 +47,20 @@ public static partial class SelfHelpExtensions { public static Azure.Response CheckSelfHelpNameAvailability(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SelfHelp.Models.SelfHelpNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckSelfHelpNameAvailabilityAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SelfHelp.Models.SelfHelpNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable DiscoverSolutions(this Azure.ResourceManager.Resources.TenantResource tenantResource, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable DiscoverSolutionsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable DiscoverSolutionsNlp(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable DiscoverSolutionsNlp(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable DiscoverSolutionsNlpAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable DiscoverSolutionsNlpAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetSelfHelpDiagnostic(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string diagnosticsResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSelfHelpDiagnosticAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string diagnosticsResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SelfHelp.SelfHelpDiagnosticResource GetSelfHelpDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.SelfHelp.SelfHelpDiagnosticCollection GetSelfHelpDiagnostics(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetSelfHelpDiscoverySolutions(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Pageable GetSelfHelpDiscoverySolutions(this Azure.ResourceManager.Resources.TenantResource tenantResource, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetSelfHelpDiscoverySolutionsAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetSelfHelpDiscoverySolutionsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetSelfHelpSimplifiedSolution(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string simplifiedSolutionsResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSelfHelpSimplifiedSolutionAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string simplifiedSolutionsResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SelfHelp.SelfHelpSimplifiedSolutionResource GetSelfHelpSimplifiedSolutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -71,10 +75,6 @@ public static partial class SelfHelpExtensions public static System.Threading.Tasks.Task> GetSelfHelpTroubleshooterAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string troubleshooterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SelfHelp.SelfHelpTroubleshooterResource GetSelfHelpTroubleshooterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.SelfHelp.SelfHelpTroubleshooterCollection GetSelfHelpTroubleshooters(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } - public static Azure.Pageable PostDiscoverySolutionNLPSubscriptionScopes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable PostDiscoverySolutionNLPSubscriptionScopesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Pageable PostDiscoverySolutionNLPTenantScopes(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable PostDiscoverySolutionNLPTenantScopesAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SelfHelpSimplifiedSolutionCollection : Azure.ResourceManager.ArmCollection { @@ -248,18 +248,18 @@ protected MockableSelfHelpArmClient() { } public partial class MockableSelfHelpSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableSelfHelpSubscriptionResource() { } - public virtual Azure.Pageable PostDiscoverySolutionNLPSubscriptionScopes(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable PostDiscoverySolutionNLPSubscriptionScopesAsync(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable DiscoverSolutionsNlp(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable DiscoverSolutionsNlpAsync(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableSelfHelpTenantResource : Azure.ResourceManager.ArmResource { protected MockableSelfHelpTenantResource() { } - public virtual Azure.Pageable GetSelfHelpDiscoverySolutions(string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSelfHelpDiscoverySolutionsAsync(string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable DiscoverSolutions(string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable DiscoverSolutionsAsync(string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable DiscoverSolutionsNlp(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable DiscoverSolutionsNlpAsync(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSelfHelpSolutionById(string solutionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSelfHelpSolutionByIdAsync(string solutionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable PostDiscoverySolutionNLPTenantScopes(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable PostDiscoverySolutionNLPTenantScopesAsync(Azure.ResourceManager.SelfHelp.Models.DiscoveryNlpContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.SelfHelp.Models diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/assets.json b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/assets.json index 50a81a3287445..84c4fcd305a92 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/assets.json +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/selfhelp/Azure.ResourceManager.SelfHelp", - "Tag": "net/selfhelp/Azure.ResourceManager.SelfHelp_e82b5f133c" + "Tag": "net/selfhelp/Azure.ResourceManager.SelfHelp_5d95954084" } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index ad6089783191a..ad4d7610bc16c 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions // Discovery Solutions using issue summary and service id. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task PostDiscoverySolutionNLPSubscriptionScopes_DiscoverySolutionsUsingIssueSummaryAndServiceId() + public async Task DiscoverSolutionsNlp_DiscoverySolutionsUsingIssueSummaryAndServiceId() { // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtSubscriptionScope.json - // this example is just showing the usage of "DiscoverySolutionNLPSubscriptionScope_Post" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "DiscoverySolutionNLP_DiscoverSolutionsBySubscription" 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(); @@ -41,7 +41,7 @@ public async Task PostDiscoverySolutionNLPSubscriptionScopes_DiscoverySolutionsU ResourceId = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", ServiceId = "0d0fcd2e-c4fd-4349-8497-200edb39s3ca", }; - await foreach (SolutionNlpMetadata item in subscriptionResource.PostDiscoverySolutionNLPSubscriptionScopesAsync(content: content)) + await foreach (SolutionNlpMetadata item in subscriptionResource.DiscoverSolutionsNlpAsync(content: content)) { Console.WriteLine($"Succeeded: {item}"); } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TenantResourceExtensions.cs index e913b36b5c28e..88b393eeeb27e 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -18,7 +18,7 @@ public partial class Sample_TenantResourceExtensions // List DiscoverySolutions at resource scope [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetSelfHelpDiscoverySolutions_ListDiscoverySolutionsAtResourceScope() + public async Task DiscoverSolutions_ListDiscoverySolutionsAtResourceScope() { // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListDiscoverySolutionsAtTenantScope.json // this example is just showing the usage of "DiscoverySolution_List" operation, for the dependent resources, they will have to be created separately. @@ -34,7 +34,7 @@ public async Task GetSelfHelpDiscoverySolutions_ListDiscoverySolutionsAtResource // invoke the operation and iterate over the result string filter = "ProblemClassificationId eq 'SampleProblemClassificationId1'"; - await foreach (SelfHelpSolutionMetadata item in tenantResource.GetSelfHelpDiscoverySolutionsAsync(filter: filter)) + await foreach (SelfHelpSolutionMetadata item in tenantResource.DiscoverSolutionsAsync(filter: filter)) { Console.WriteLine($"Succeeded: {item}"); } @@ -69,10 +69,10 @@ public async Task GetSelfHelpSolutionById_SolutionGet() // Discovery Solutions using issue summary and service id. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task PostDiscoverySolutionNLPTenantScopes_DiscoverySolutionsUsingIssueSummaryAndServiceId() + public async Task DiscoverSolutionsNlp_DiscoverySolutionsUsingIssueSummaryAndServiceId() { // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtTenantScope.json - // this example is just showing the usage of "DiscoverySolutionNLPTenantScope_Post" operation, for the dependent resources, they will have to be created separately. + // this example is just showing the usage of "DiscoverySolutionNLP_DiscoverSolutions" 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(); @@ -86,10 +86,9 @@ public async Task PostDiscoverySolutionNLPTenantScopes_DiscoverySolutionsUsingIs // invoke the operation and iterate over the result DiscoveryNlpContent content = new DiscoveryNlpContent("how to retrieve certs from deleted keyvault.") { - ResourceId = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", ServiceId = "0d0fcd2e-c4fd-4349-8497-200edb39s3ca", }; - await foreach (SolutionNlpMetadata item in tenantResource.PostDiscoverySolutionNLPTenantScopesAsync(content: content)) + await foreach (SolutionNlpMetadata item in tenantResource.DiscoverSolutionsNlpAsync(content: content)) { Console.WriteLine($"Succeeded: {item}"); } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs index d84a678a825bb..ff4387f413db9 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs @@ -571,7 +571,7 @@ public static SolutionSection SolutionSection(string title = null, string conten /// Initializes a new instance of . /// Natural language description of the issue. - /// ARM resource Id of the resource that is having the issue. + /// ARM resource Id of the resource that is having the issue. Only applicable for Discovery Solution NLP Subscription Scope. /// ARM service Id of the service that is having the issue. For more information on service Id see https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP. /// Additional information in the form of a string. /// A new instance for mocking. diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpArmClient.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpArmClient.cs index f6767612b8491..1c91d8416b07b 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpArmClient.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpArmClient.cs @@ -342,7 +342,7 @@ public virtual Response GetSelfHelpTroubleshoote /// /// /// Operation Id - /// CheckNameAvailability_Post + /// CheckNameAvailability_CheckAvailability /// /// /// Default Api Version @@ -362,7 +362,7 @@ public virtual async Task> CheckSelfHel scope0.Start(); try { - var response = await CheckNameAvailabilityRestClient.PostAsync(scope, content, cancellationToken).ConfigureAwait(false); + var response = await CheckNameAvailabilityRestClient.CheckAvailabilityAsync(scope, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -381,7 +381,7 @@ public virtual async Task> CheckSelfHel /// /// /// Operation Id - /// CheckNameAvailability_Post + /// CheckNameAvailability_CheckAvailability /// /// /// Default Api Version @@ -401,7 +401,7 @@ public virtual Response CheckSelfHelpNameAvailab scope0.Start(); try { - var response = CheckNameAvailabilityRestClient.Post(scope, content, cancellationToken); + var response = CheckNameAvailabilityRestClient.CheckAvailability(scope, content, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpSubscriptionResource.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpSubscriptionResource.cs index 5586270f1406b..5378f80be19e6 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpSubscriptionResource.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpSubscriptionResource.cs @@ -16,8 +16,8 @@ namespace Azure.ResourceManager.SelfHelp.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableSelfHelpSubscriptionResource : ArmResource { - private ClientDiagnostics _discoverySolutionNLPSubscriptionScopeClientDiagnostics; - private DiscoverySolutionNLPSubscriptionScopeRestOperations _discoverySolutionNLPSubscriptionScopeRestClient; + private ClientDiagnostics _discoverySolutionNlpClientDiagnostics; + private DiscoverySolutionNLPRestOperations _discoverySolutionNlpRestClient; /// Initializes a new instance of the class for mocking. protected MockableSelfHelpSubscriptionResource() @@ -31,8 +31,8 @@ internal MockableSelfHelpSubscriptionResource(ArmClient client, ResourceIdentifi { } - private ClientDiagnostics DiscoverySolutionNLPSubscriptionScopeClientDiagnostics => _discoverySolutionNLPSubscriptionScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private DiscoverySolutionNLPSubscriptionScopeRestOperations DiscoverySolutionNLPSubscriptionScopeRestClient => _discoverySolutionNLPSubscriptionScopeRestClient ??= new DiscoverySolutionNLPSubscriptionScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics DiscoverySolutionNLPClientDiagnostics => _discoverySolutionNlpClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private DiscoverySolutionNLPRestOperations DiscoverySolutionNLPRestClient => _discoverySolutionNlpRestClient ??= new DiscoverySolutionNLPRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -49,7 +49,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Operation Id - /// DiscoverySolutionNLPSubscriptionScope_Post + /// DiscoverySolutionNLP_DiscoverSolutionsBySubscription /// /// /// Default Api Version @@ -60,10 +60,10 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// Request body for discovering solutions using NLP. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable PostDiscoverySolutionNLPSubscriptionScopesAsync(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable DiscoverSolutionsNlpAsync(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPSubscriptionScopeRestClient.CreatePostRequest(Id.SubscriptionId, content); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPSubscriptionScopeClientDiagnostics, Pipeline, "MockableSelfHelpSubscriptionResource.PostDiscoverySolutionNLPSubscriptionScopes", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPRestClient.CreateDiscoverSolutionsBySubscriptionRequest(Id.SubscriptionId, content); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPClientDiagnostics, Pipeline, "MockableSelfHelpSubscriptionResource.DiscoverSolutionsNlp", "value", null, cancellationToken); } /// @@ -75,7 +75,7 @@ public virtual AsyncPageable PostDiscoverySolutionNLPSubscr /// /// /// Operation Id - /// DiscoverySolutionNLPSubscriptionScope_Post + /// DiscoverySolutionNLP_DiscoverSolutionsBySubscription /// /// /// Default Api Version @@ -86,10 +86,10 @@ public virtual AsyncPageable PostDiscoverySolutionNLPSubscr /// Request body for discovering solutions using NLP. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable PostDiscoverySolutionNLPSubscriptionScopes(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public virtual Pageable DiscoverSolutionsNlp(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPSubscriptionScopeRestClient.CreatePostRequest(Id.SubscriptionId, content); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPSubscriptionScopeClientDiagnostics, Pipeline, "MockableSelfHelpSubscriptionResource.PostDiscoverySolutionNLPSubscriptionScopes", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPRestClient.CreateDiscoverSolutionsBySubscriptionRequest(Id.SubscriptionId, content); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPClientDiagnostics, Pipeline, "MockableSelfHelpSubscriptionResource.DiscoverSolutionsNlp", "value", null, cancellationToken); } } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpTenantResource.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpTenantResource.cs index 49bef539ded16..6ad9456050d38 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpTenantResource.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/MockableSelfHelpTenantResource.cs @@ -22,8 +22,8 @@ public partial class MockableSelfHelpTenantResource : ArmResource private DiscoverySolutionRestOperations _discoverySolutionRestClient; private ClientDiagnostics _solutionSelfHelpClientDiagnostics; private SolutionSelfHelpRestOperations _solutionSelfHelpRestClient; - private ClientDiagnostics _discoverySolutionNLPTenantScopeClientDiagnostics; - private DiscoverySolutionNLPTenantScopeRestOperations _discoverySolutionNLPTenantScopeRestClient; + private ClientDiagnostics _discoverySolutionNlpClientDiagnostics; + private DiscoverySolutionNLPRestOperations _discoverySolutionNlpRestClient; /// Initializes a new instance of the class for mocking. protected MockableSelfHelpTenantResource() @@ -41,8 +41,8 @@ internal MockableSelfHelpTenantResource(ArmClient client, ResourceIdentifier id) private DiscoverySolutionRestOperations DiscoverySolutionRestClient => _discoverySolutionRestClient ??= new DiscoverySolutionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics SolutionSelfHelpClientDiagnostics => _solutionSelfHelpClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics); private SolutionSelfHelpRestOperations SolutionSelfHelpRestClient => _solutionSelfHelpRestClient ??= new SolutionSelfHelpRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics DiscoverySolutionNLPTenantScopeClientDiagnostics => _discoverySolutionNLPTenantScopeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private DiscoverySolutionNLPTenantScopeRestOperations DiscoverySolutionNLPTenantScopeRestClient => _discoverySolutionNLPTenantScopeRestClient ??= new DiscoverySolutionNLPTenantScopeRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics DiscoverySolutionNLPClientDiagnostics => _discoverySolutionNlpClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private DiscoverySolutionNLPRestOperations DiscoverySolutionNLPRestClient => _discoverySolutionNlpRestClient ??= new DiscoverySolutionNLPRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -71,11 +71,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// Skiptoken is only used if a previous operation returned a partial result. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSelfHelpDiscoverySolutionsAsync(string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable DiscoverSolutionsAsync(string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionRestClient.CreateListRequest(filter, skiptoken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DiscoverySolutionRestClient.CreateListNextPageRequest(nextLink, filter, skiptoken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SelfHelpSolutionMetadata.DeserializeSelfHelpSolutionMetadata(e), DiscoverySolutionClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.GetSelfHelpDiscoverySolutions", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SelfHelpSolutionMetadata.DeserializeSelfHelpSolutionMetadata(e), DiscoverySolutionClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.DiscoverSolutions", "value", "nextLink", cancellationToken); } /// @@ -99,11 +99,11 @@ public virtual AsyncPageable GetSelfHelpDiscoverySolut /// Skiptoken is only used if a previous operation returned a partial result. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSelfHelpDiscoverySolutions(string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + public virtual Pageable DiscoverSolutions(string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionRestClient.CreateListRequest(filter, skiptoken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DiscoverySolutionRestClient.CreateListNextPageRequest(nextLink, filter, skiptoken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SelfHelpSolutionMetadata.DeserializeSelfHelpSolutionMetadata(e), DiscoverySolutionClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.GetSelfHelpDiscoverySolutions", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SelfHelpSolutionMetadata.DeserializeSelfHelpSolutionMetadata(e), DiscoverySolutionClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.DiscoverSolutions", "value", "nextLink", cancellationToken); } /// @@ -193,7 +193,7 @@ public virtual Response GetSelfHelpSolutionById(string s /// /// /// Operation Id - /// DiscoverySolutionNLPTenantScope_Post + /// DiscoverySolutionNLP_DiscoverSolutions /// /// /// Default Api Version @@ -204,10 +204,10 @@ public virtual Response GetSelfHelpSolutionById(string s /// Request body for discovering solutions using NLP. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable PostDiscoverySolutionNLPTenantScopesAsync(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable DiscoverSolutionsNlpAsync(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPTenantScopeRestClient.CreatePostRequest(content); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPTenantScopeClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.PostDiscoverySolutionNLPTenantScopes", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPRestClient.CreateDiscoverSolutionsRequest(content); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.DiscoverSolutionsNlp", "value", null, cancellationToken); } /// @@ -219,7 +219,7 @@ public virtual AsyncPageable PostDiscoverySolutionNLPTenant /// /// /// Operation Id - /// DiscoverySolutionNLPTenantScope_Post + /// DiscoverySolutionNLP_DiscoverSolutions /// /// /// Default Api Version @@ -230,10 +230,10 @@ public virtual AsyncPageable PostDiscoverySolutionNLPTenant /// Request body for discovering solutions using NLP. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable PostDiscoverySolutionNLPTenantScopes(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public virtual Pageable DiscoverSolutionsNlp(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPTenantScopeRestClient.CreatePostRequest(content); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPTenantScopeClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.PostDiscoverySolutionNLPTenantScopes", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionNLPRestClient.CreateDiscoverSolutionsRequest(content); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SolutionNlpMetadata.DeserializeSolutionNlpMetadata(e), DiscoverySolutionNLPClientDiagnostics, Pipeline, "MockableSelfHelpTenantResource.DiscoverSolutionsNlp", "value", null, cancellationToken); } } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs index 76dd0bb4ec985..00a653ff37c7f 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs @@ -426,7 +426,7 @@ public static Response GetSelfHelpTroubleshooter /// /// /// Operation Id - /// CheckNameAvailability_Post + /// CheckNameAvailability_CheckAvailability /// /// /// Default Api Version @@ -459,7 +459,7 @@ public static async Task> CheckSelfHelp /// /// /// Operation Id - /// CheckNameAvailability_Post + /// CheckNameAvailability_CheckAvailability /// /// /// Default Api Version @@ -568,7 +568,7 @@ public static SelfHelpTroubleshooterResource GetSelfHelpTroubleshooterResource(t /// /// /// Operation Id - /// DiscoverySolutionNLPSubscriptionScope_Post + /// DiscoverySolutionNLP_DiscoverSolutionsBySubscription /// /// /// Default Api Version @@ -577,7 +577,7 @@ public static SelfHelpTroubleshooterResource GetSelfHelpTroubleshooterResource(t /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -585,11 +585,11 @@ public static SelfHelpTroubleshooterResource GetSelfHelpTroubleshooterResource(t /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable PostDiscoverySolutionNLPSubscriptionScopesAsync(this SubscriptionResource subscriptionResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public static AsyncPageable DiscoverSolutionsNlpAsync(this SubscriptionResource subscriptionResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSelfHelpSubscriptionResource(subscriptionResource).PostDiscoverySolutionNLPSubscriptionScopesAsync(content, cancellationToken); + return GetMockableSelfHelpSubscriptionResource(subscriptionResource).DiscoverSolutionsNlpAsync(content, cancellationToken); } /// @@ -601,7 +601,7 @@ public static AsyncPageable PostDiscoverySolutionNLPSubscri /// /// /// Operation Id - /// DiscoverySolutionNLPSubscriptionScope_Post + /// DiscoverySolutionNLP_DiscoverSolutionsBySubscription /// /// /// Default Api Version @@ -610,7 +610,7 @@ public static AsyncPageable PostDiscoverySolutionNLPSubscri /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -618,11 +618,11 @@ public static AsyncPageable PostDiscoverySolutionNLPSubscri /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable PostDiscoverySolutionNLPSubscriptionScopes(this SubscriptionResource subscriptionResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public static Pageable DiscoverSolutionsNlp(this SubscriptionResource subscriptionResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSelfHelpSubscriptionResource(subscriptionResource).PostDiscoverySolutionNLPSubscriptionScopes(content, cancellationToken); + return GetMockableSelfHelpSubscriptionResource(subscriptionResource).DiscoverSolutionsNlp(content, cancellationToken); } /// @@ -643,7 +643,7 @@ public static Pageable PostDiscoverySolutionNLPSubscription /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -652,11 +652,11 @@ public static Pageable PostDiscoverySolutionNLPSubscription /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetSelfHelpDiscoverySolutionsAsync(this TenantResource tenantResource, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + public static AsyncPageable DiscoverSolutionsAsync(this TenantResource tenantResource, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return GetMockableSelfHelpTenantResource(tenantResource).GetSelfHelpDiscoverySolutionsAsync(filter, skiptoken, cancellationToken); + return GetMockableSelfHelpTenantResource(tenantResource).DiscoverSolutionsAsync(filter, skiptoken, cancellationToken); } /// @@ -677,7 +677,7 @@ public static AsyncPageable GetSelfHelpDiscoverySoluti /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -686,11 +686,11 @@ public static AsyncPageable GetSelfHelpDiscoverySoluti /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetSelfHelpDiscoverySolutions(this TenantResource tenantResource, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + public static Pageable DiscoverSolutions(this TenantResource tenantResource, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return GetMockableSelfHelpTenantResource(tenantResource).GetSelfHelpDiscoverySolutions(filter, skiptoken, cancellationToken); + return GetMockableSelfHelpTenantResource(tenantResource).DiscoverSolutions(filter, skiptoken, cancellationToken); } /// @@ -768,7 +768,7 @@ public static Response GetSelfHelpSolutionById(this Tena /// /// /// Operation Id - /// DiscoverySolutionNLPTenantScope_Post + /// DiscoverySolutionNLP_DiscoverSolutions /// /// /// Default Api Version @@ -777,7 +777,7 @@ public static Response GetSelfHelpSolutionById(this Tena /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -785,11 +785,11 @@ public static Response GetSelfHelpSolutionById(this Tena /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable PostDiscoverySolutionNLPTenantScopesAsync(this TenantResource tenantResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public static AsyncPageable DiscoverSolutionsNlpAsync(this TenantResource tenantResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return GetMockableSelfHelpTenantResource(tenantResource).PostDiscoverySolutionNLPTenantScopesAsync(content, cancellationToken); + return GetMockableSelfHelpTenantResource(tenantResource).DiscoverSolutionsNlpAsync(content, cancellationToken); } /// @@ -801,7 +801,7 @@ public static AsyncPageable PostDiscoverySolutionNLPTenantS /// /// /// Operation Id - /// DiscoverySolutionNLPTenantScope_Post + /// DiscoverySolutionNLP_DiscoverSolutions /// /// /// Default Api Version @@ -810,7 +810,7 @@ public static AsyncPageable PostDiscoverySolutionNLPTenantS /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -818,11 +818,11 @@ public static AsyncPageable PostDiscoverySolutionNLPTenantS /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable PostDiscoverySolutionNLPTenantScopes(this TenantResource tenantResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + public static Pageable DiscoverSolutionsNlp(this TenantResource tenantResource, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return GetMockableSelfHelpTenantResource(tenantResource).PostDiscoverySolutionNLPTenantScopes(content, cancellationToken); + return GetMockableSelfHelpTenantResource(tenantResource).DiscoverSolutionsNlp(content, cancellationToken); } } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiscoveryNlpContent.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiscoveryNlpContent.cs index 2516156607f6c..905e97a666ace 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiscoveryNlpContent.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiscoveryNlpContent.cs @@ -57,7 +57,7 @@ public DiscoveryNlpContent(string issueSummary) /// Initializes a new instance of . /// Natural language description of the issue. - /// ARM resource Id of the resource that is having the issue. + /// ARM resource Id of the resource that is having the issue. Only applicable for Discovery Solution NLP Subscription Scope. /// ARM service Id of the service that is having the issue. For more information on service Id see https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP. /// Additional information in the form of a string. /// Keeps track of any properties unknown to the library. @@ -77,7 +77,7 @@ internal DiscoveryNlpContent() /// Natural language description of the issue. public string IssueSummary { get; } - /// ARM resource Id of the resource that is having the issue. + /// ARM resource Id of the resource that is having the issue. Only applicable for Discovery Solution NLP Subscription Scope. public string ResourceId { get; set; } /// ARM service Id of the service that is having the issue. For more information on service Id see https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP. public string ServiceId { get; set; } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs index 75d6a257ddda3..04019171e54b9 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs @@ -36,7 +36,7 @@ public CheckNameAvailabilityRestOperations(HttpPipeline pipeline, string applica _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreatePostRequestUri(string scope, SelfHelpNameAvailabilityContent content) + internal RequestUriBuilder CreateCheckAvailabilityRequestUri(string scope, SelfHelpNameAvailabilityContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -47,7 +47,7 @@ internal RequestUriBuilder CreatePostRequestUri(string scope, SelfHelpNameAvaila return uri; } - internal HttpMessage CreatePostRequest(string scope, SelfHelpNameAvailabilityContent content) + internal HttpMessage CreateCheckAvailabilityRequest(string scope, SelfHelpNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -76,11 +76,11 @@ internal HttpMessage CreatePostRequest(string scope, SelfHelpNameAvailabilityCon /// The required parameters for availability check. /// The cancellation token to use. /// is null. - public async Task> PostAsync(string scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + public async Task> CheckAvailabilityAsync(string scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(scope, nameof(scope)); - using var message = CreatePostRequest(scope, content); + using var message = CreateCheckAvailabilityRequest(scope, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -101,11 +101,11 @@ public async Task> PostAsync(string sco /// The required parameters for availability check. /// The cancellation token to use. /// is null. - public Response Post(string scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + public Response CheckAvailability(string scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(scope, nameof(scope)); - using var message = CreatePostRequest(scope, content); + using var message = CreateCheckAvailabilityRequest(scope, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPRestOperations.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPRestOperations.cs new file mode 100644 index 0000000000000..82cabe88d05f0 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPRestOperations.cs @@ -0,0 +1,197 @@ +// 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.SelfHelp.Models; + +namespace Azure.ResourceManager.SelfHelp +{ + internal partial class DiscoverySolutionNLPRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DiscoverySolutionNLPRestOperations. + /// 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 DiscoverySolutionNLPRestOperations(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-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateDiscoverSolutionsRequestUri(DiscoveryNlpContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Help/discoverSolutions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDiscoverSolutionsRequest(DiscoveryNlpContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Help/discoverSolutions", false); + uri.AppendQuery("api-version", _apiVersion, true); + 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; + } + + /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + /// Request body for discovering solutions using NLP. + /// The cancellation token to use. + public async Task> DiscoverSolutionsAsync(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + { + using var message = CreateDiscoverSolutionsRequest(content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiscoveryNlpResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + /// Request body for discovering solutions using NLP. + /// The cancellation token to use. + public Response DiscoverSolutions(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + { + using var message = CreateDiscoverSolutionsRequest(content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiscoveryNlpResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDiscoverSolutionsBySubscriptionRequestUri(string subscriptionId, DiscoveryNlpContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, false); + uri.AppendPath("/providers/Microsoft.Help/discoverSolutions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDiscoverSolutionsBySubscriptionRequest(string subscriptionId, DiscoveryNlpContent 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, false); + uri.AppendPath("/providers/Microsoft.Help/discoverSolutions", false); + uri.AppendQuery("api-version", _apiVersion, true); + 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; + } + + /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. + /// The Azure subscription ID. + /// Request body for discovering solutions using NLP. + /// The cancellation token to use. + /// is null. + public async Task> DiscoverSolutionsBySubscriptionAsync(string subscriptionId, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionId, nameof(subscriptionId)); + + using var message = CreateDiscoverSolutionsBySubscriptionRequest(subscriptionId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiscoveryNlpResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. + /// The Azure subscription ID. + /// Request body for discovering solutions using NLP. + /// The cancellation token to use. + /// is null. + public Response DiscoverSolutionsBySubscription(string subscriptionId, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionId, nameof(subscriptionId)); + + using var message = CreateDiscoverSolutionsBySubscriptionRequest(subscriptionId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiscoveryNlpResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPSubscriptionScopeRestOperations.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPSubscriptionScopeRestOperations.cs deleted file mode 100644 index fdd53c41cca84..0000000000000 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPSubscriptionScopeRestOperations.cs +++ /dev/null @@ -1,126 +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.SelfHelp.Models; - -namespace Azure.ResourceManager.SelfHelp -{ - internal partial class DiscoverySolutionNLPSubscriptionScopeRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of DiscoverySolutionNLPSubscriptionScopeRestOperations. - /// 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 DiscoverySolutionNLPSubscriptionScopeRestOperations(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-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreatePostRequestUri(string subscriptionId, DiscoveryNlpContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Help/discoverSolutions", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreatePostRequest(string subscriptionId, DiscoveryNlpContent 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.Help/discoverSolutions", false); - uri.AppendQuery("api-version", _apiVersion, true); - 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; - } - - /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. - /// The ID of the target subscription. The value must be an UUID. - /// Request body for discovering solutions using NLP. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> PostAsync(string subscriptionId, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreatePostRequest(subscriptionId, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DiscoveryNlpResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and subscription. - /// The ID of the target subscription. The value must be an UUID. - /// Request body for discovering solutions using NLP. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response Post(string subscriptionId, DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreatePostRequest(subscriptionId, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DiscoveryNlpResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPTenantScopeRestOperations.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPTenantScopeRestOperations.cs deleted file mode 100644 index 85cb58aad8bbf..0000000000000 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/DiscoverySolutionNLPTenantScopeRestOperations.cs +++ /dev/null @@ -1,112 +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.SelfHelp.Models; - -namespace Azure.ResourceManager.SelfHelp -{ - internal partial class DiscoverySolutionNLPTenantScopeRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of DiscoverySolutionNLPTenantScopeRestOperations. - /// 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 DiscoverySolutionNLPTenantScopeRestOperations(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-03-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreatePostRequestUri(DiscoveryNlpContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/providers/Microsoft.Help/discoverSolutions", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreatePostRequest(DiscoveryNlpContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/providers/Microsoft.Help/discoverSolutions", false); - uri.AppendQuery("api-version", _apiVersion, true); - 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; - } - - /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. - /// Request body for discovering solutions using NLP. - /// The cancellation token to use. - public async Task> PostAsync(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) - { - using var message = CreatePostRequest(content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DiscoveryNlpResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. - /// Request body for discovering solutions using NLP. - /// The cancellation token to use. - public Response Post(DiscoveryNlpContent content = null, CancellationToken cancellationToken = default) - { - using var message = CreatePostRequest(content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DiscoveryNlpResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DiscoveryNlpResult.DeserializeDiscoveryNlpResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md index 97e5b5e58ed53..058fe5c793438 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: SelfHelp namespace: Azure.ResourceManager.SelfHelp -require: https://github.com/Azure/azure-rest-api-specs/blob/b38632bbd56247985cb0493b128ba048e5fee16b/specification/help/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/51031c3dc961c33be93afe1f15d35acfe5999861/specification/help/resource-manager/readme.md #tag: package-2024-03-01-preview output-folder: $(this-folder)/Generated clear-output-folder: true @@ -51,6 +51,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + NLP: Nlp request-path-is-non-resource: - /providers/Microsoft.Help/selfHelp/{solutionId} @@ -118,9 +119,11 @@ rename-mapping: WebResult: KBWebResult override-operation-name: - CheckNameAvailability_Post: CheckSelfHelpNameAvailability - DiscoverySolution_List: GetSelfHelpDiscoverySolutions + CheckNameAvailability_CheckAvailability: CheckSelfHelpNameAvailability + DiscoverySolution_List: DiscoverSolutions SolutionSelfHelp_Get: GetSelfHelpSolutionById + DiscoverySolutionNLP_DiscoverSolutionsBySubscription: DiscoverSolutionsNlp + DiscoverySolutionNLP_DiscoverSolutions: DiscoverSolutionsNlp directive: - from: help.json diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionNLPTests.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionNLPTests.cs index 56bb94919a03b..1c6f991f5e083 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionNLPTests.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionNLPTests.cs @@ -19,20 +19,22 @@ public DiscoverySolutionNLPTests(bool isAsync) : base(isAsync) //, RecordedTestM public async Task DiscoveryNlpSubscriptionScopeTest() { var discoveryNlpReqObject = GetDiscoveryNlpContent(); - var solutionNlpMetadataResource = DefaultSubscription.PostDiscoverySolutionNLPSubscriptionScopesAsync(discoveryNlpReqObject); - var response = await solutionNlpMetadataResource.ToEnumerableAsync(); - - Assert.IsNotNull(response.First()); + await foreach (SolutionNlpMetadata item in DefaultSubscription.DiscoverSolutionsNlpAsync(discoveryNlpReqObject)) + { + Assert.IsNotNull(item); + break; + } } [Test] public async Task DiscoveryNlpTenantScopeTest() { var discoveryNlpReqObject = GetDiscoveryNlpContent(); - var solutionNlpMetadataResource = DefaultTenantResource.PostDiscoverySolutionNLPTenantScopesAsync(discoveryNlpReqObject); - var response = await solutionNlpMetadataResource.ToEnumerableAsync(); - - Assert.IsNotNull(response.First()); + await foreach (SolutionNlpMetadata item in DefaultTenantResource.DiscoverSolutionsNlpAsync(discoveryNlpReqObject)) + { + Assert.IsNotNull(item); + break; + } } private DiscoveryNlpContent GetDiscoveryNlpContent() diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionsTests.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionsTests.cs index 9893f0e683c93..d74b772e6d7ce 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionsTests.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/tests/DiscoverySolutionsTests.cs @@ -21,7 +21,7 @@ public DiscoverySolutionsTests(bool isAsync) : base(isAsync) //, RecordedTestMod [Test] public async Task ListDisocverySolutionsTest() { - var listDisocverySolutionsData = DefaultTenantResource.GetSelfHelpDiscoverySolutionsAsync("ProblemClassificationId eq 'a93e16a3-9f43-a003-6ac0-e5f6caa90cb9'"); + var listDisocverySolutionsData = DefaultTenantResource.DiscoverSolutionsAsync("ProblemClassificationId eq 'a93e16a3-9f43-a003-6ac0-e5f6caa90cb9'"); var response = await listDisocverySolutionsData.ToEnumerableAsync(); Assert.NotNull(response.First()); }