From 62afbf609f32717dcf9b47dffff59089e7735f53 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 23 Apr 2024 02:24:04 +0000 Subject: [PATCH] [Automation] Generate Fluent Lite from help#package-2024-03-01-preview --- .../CHANGELOG.md | 87 ++- .../azure-resourcemanager-selfhelp/README.md | 4 +- .../azure-resourcemanager-selfhelp/SAMPLE.md | 326 +++++++++-- .../azure-resourcemanager-selfhelp/pom.xml | 16 +- .../selfhelp/SelfHelpManager.java | 102 +++- .../selfhelp/fluent/DiagnosticsClient.java | 32 +- ...rySolutionNlpSubscriptionScopesClient.java | 43 ++ ...iscoverySolutionNlpTenantScopesClient.java | 40 ++ .../fluent/DiscoverySolutionsClient.java | 13 +- .../selfhelp/fluent/HelpRP.java | 35 ++ .../fluent/SimplifiedSolutionsClient.java | 130 +++++ .../fluent/SolutionOperationsClient.java | 95 ++-- .../fluent/SolutionSelfHelpsClient.java | 49 ++ .../CheckNameAvailabilityResponseInner.java | 9 +- .../models/DiagnosticResourceInner.java | 8 +- .../models/DiagnosticResourceProperties.java | 11 +- .../models/DiscoveryNlpResponseInner.java | 59 ++ .../selfhelp/fluent/models/NlpSolutions.java | 205 +++++++ .../fluent/models/OperationInner.java | 9 +- .../SimplifiedSolutionsResourceInner.java | 147 +++++ ...SimplifiedSolutionsResourceProperties.java | 145 +++++ .../models/SolutionResourceSelfHelpInner.java | 113 ++++ .../SolutionsResourcePropertiesSelfHelp.java | 114 ++++ .../DiagnosticResourceImpl.java | 22 +- .../implementation/DiagnosticsClientImpl.java | 96 ++-- .../implementation/DiagnosticsImpl.java | 8 +- .../DiscoveryNlpResponseImpl.java | 40 ++ ...lutionNlpSubscriptionScopesClientImpl.java | 182 ++++++ ...verySolutionNlpSubscriptionScopesImpl.java | 58 ++ ...verySolutionNlpTenantScopesClientImpl.java | 166 ++++++ .../DiscoverySolutionNlpTenantScopesImpl.java | 58 ++ .../DiscoverySolutionsClientImpl.java | 77 +-- .../DiscoverySolutionsImpl.java | 14 +- .../implementation/HelpRPBuilder.java | 24 +- .../selfhelp/implementation/HelpRPImpl.java | 93 ++- .../implementation/OperationsImpl.java | 4 +- .../{Utils.java => ResourceManagerUtils.java} | 6 +- .../SimplifiedSolutionsClientImpl.java | 531 ++++++++++++++++++ .../SimplifiedSolutionsImpl.java | 95 ++++ .../SimplifiedSolutionsResourceImpl.java | 139 +++++ .../SolutionOperationsClientImpl.java | 330 ++++++----- .../SolutionOperationsImpl.java | 18 +- .../implementation/SolutionResourceImpl.java | 47 +- .../SolutionResourceSelfHelpImpl.java | 74 +++ .../SolutionSelfHelpsClientImpl.java | 181 ++++++ .../implementation/SolutionSelfHelpsImpl.java | 55 ++ .../TroubleshooterResourceImpl.java | 28 +- .../TroubleshootersClientImpl.java | 4 +- .../implementation/TroubleshootersImpl.java | 8 +- .../selfhelp/models/AutomatedCheckResult.java | 52 ++ .../models/ClassificationService.java | 85 +++ .../selfhelp/models/DiscoveryNlpRequest.java | 144 +++++ .../selfhelp/models/DiscoveryNlpResponse.java | 27 + ...iscoverySolutionNlpSubscriptionScopes.java | 36 ++ .../DiscoverySolutionNlpTenantScopes.java | 34 ++ .../selfhelp/models/DiscoverySolutions.java | 13 +- .../selfhelp/models/OperationDisplay.java | 9 +- .../selfhelp/models/OperationListResult.java | 4 +- .../selfhelp/models/QuestionType.java | 10 + .../models/ReplacementMapsSelfHelp.java | 118 ++++ .../models/ResponseValidationProperties.java | 26 + .../selfhelp/models/SectionSelfHelp.java | 109 ++++ .../selfhelp/models/SimplifiedSolutions.java | 76 +++ .../models/SimplifiedSolutionsResource.java | 185 ++++++ .../models/SolutionNlpMetadataResource.java | 215 +++++++ .../selfhelp/models/SolutionOperations.java | 28 + .../models/SolutionPatchRequestBody.java | 2 +- .../selfhelp/models/SolutionResource.java | 21 + .../models/SolutionResourceSelfHelp.java | 86 +++ .../selfhelp/models/SolutionSelfHelps.java | 44 ++ .../selfhelp/models/SolutionType.java | 10 + .../models/SolutionWarmUpRequestBody.java | 57 ++ .../selfhelp/models/SolutionsDiagnostic.java | 26 + .../selfhelp/models/StepInput.java | 26 + .../resourcemanager/selfhelp/models/Type.java | 5 + .../selfhelp/models/ValidationScope.java | 68 +++ .../src/main/java/module-info.java | 4 +- .../proxy-config.json | 2 +- .../reflect-config.json | 65 +++ .../CheckNameAvailabilityPostSamples.java | 20 +- .../generated/DiagnosticsCreateSamples.java | 14 +- .../generated/DiagnosticsGetSamples.java | 10 +- .../DiscoverySolutionListSamples.java | 24 +- ...lutionNlpSubscriptionScopePostSamples.java | 29 + ...verySolutionNlpTenantScopePostSamples.java | 27 + .../generated/OperationsListSamples.java | 3 +- .../SimplifiedSolutionsCreateSamples.java | 44 ++ .../SimplifiedSolutionsGetSamples.java | 25 + .../SolutionOperationCreateSamples.java | 25 +- .../SolutionOperationGetSamples.java | 10 +- .../SolutionOperationUpdateSamples.java | 17 +- .../SolutionOperationWarmUpSamples.java | 25 + .../generated/SolutionSelfHelpGetSamples.java | 22 + .../TroubleshootersContinueMethodSamples.java | 20 +- .../TroubleshootersCreateSamples.java | 9 +- .../generated/TroubleshootersEndSamples.java | 10 +- .../generated/TroubleshootersGetSamples.java | 10 +- .../TroubleshootersRestartSamples.java | 11 +- .../generated/AutomatedCheckResultTests.java | 21 +- ...ailabilitiesPostWithResponseMockTests.java | 50 +- ...eckNameAvailabilityResponseInnerTests.java | 3 +- .../generated/ClassificationServiceTests.java | 28 + .../generated/ContinueRequestBodyTests.java | 32 +- .../generated/DiscoveryNlpRequestTests.java | 35 ++ .../DiscoveryNlpResponseInnerTests.java | 66 +++ .../generated/DiscoveryResponseTests.java | 2 +- ...iptionScopesPostWithResponseMockTests.java | 46 ++ ...TenantScopesPostWithResponseMockTests.java | 46 ++ .../DiscoverySolutionsListMockTests.java | 38 +- .../selfhelp/generated/InsightTests.java | 4 +- .../selfhelp/generated/NlpSolutionsTests.java | 49 ++ .../generated/OperationsListMockTests.java | 36 +- .../ResponseValidationPropertiesTests.java | 24 +- ...startTroubleshooterResponseInnerTests.java | 5 +- .../selfhelp/generated/SearchResultTests.java | 11 +- .../SimplifiedSolutionsCreateMockTests.java | 57 ++ ...fiedSolutionsGetWithResponseMockTests.java | 40 ++ ...SimplifiedSolutionsResourceInnerTests.java | 43 ++ ...ifiedSolutionsResourcePropertiesTests.java | 44 ++ .../SolutionMetadataPropertiesTests.java | 2 +- .../SolutionMetadataResourceInnerTests.java | 2 +- .../SolutionNlpMetadataResourceTests.java | 46 ++ ...OperationsWarmUpWithResponseMockTests.java | 50 ++ .../SolutionWarmUpRequestBodyTests.java | 41 ++ .../selfhelp/generated/SolutionsTests.java | 2 +- ...TroubleshooterInstancePropertiesTests.java | 15 +- .../TroubleshooterResourceInnerTests.java | 14 +- .../TroubleshooterResponseTests.java | 20 +- ...rsContinueMethodWithResponseMockTests.java | 53 +- ...leshootersCreateWithResponseMockTests.java | 56 +- ...oubleshootersEndWithResponseMockTests.java | 34 +- ...oubleshootersGetWithResponseMockTests.java | 43 +- ...eshootersRestartWithResponseMockTests.java | 37 +- 133 files changed, 6287 insertions(+), 900 deletions(-) create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpSubscriptionScopesClient.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpTenantScopesClient.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SimplifiedSolutionsClient.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionSelfHelpsClient.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiscoveryNlpResponseInner.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/NlpSolutions.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceInner.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceProperties.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionResourceSelfHelpInner.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionsResourcePropertiesSelfHelp.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoveryNlpResponseImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesClientImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesClientImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesImpl.java rename sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/{Utils.java => ResourceManagerUtils.java} (99%) create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsClientImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsResourceImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceSelfHelpImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsClientImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsImpl.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ClassificationService.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpRequest.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpResponse.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpSubscriptionScopes.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpTenantScopes.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ReplacementMapsSelfHelp.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/SectionSelfHelp.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/SimplifiedSolutions.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/SimplifiedSolutionsResource.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/SolutionNlpMetadataResource.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/SolutionResourceSelfHelp.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/SolutionSelfHelps.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/SolutionWarmUpRequestBody.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ValidationScope.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/samples/java/com/azure/resourcemanager/selfhelp/generated/DiscoverySolutionNlpSubscriptionScopePostSamples.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/samples/java/com/azure/resourcemanager/selfhelp/generated/DiscoverySolutionNlpTenantScopePostSamples.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/samples/java/com/azure/resourcemanager/selfhelp/generated/SimplifiedSolutionsCreateSamples.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/samples/java/com/azure/resourcemanager/selfhelp/generated/SimplifiedSolutionsGetSamples.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/samples/java/com/azure/resourcemanager/selfhelp/generated/SolutionOperationWarmUpSamples.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/samples/java/com/azure/resourcemanager/selfhelp/generated/SolutionSelfHelpGetSamples.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/ClassificationServiceTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/DiscoveryNlpRequestTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/DiscoveryNlpResponseInnerTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/DiscoverySolutionNlpSubscriptionScopesPostWithResponseMockTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/DiscoverySolutionNlpTenantScopesPostWithResponseMockTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/NlpSolutionsTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/SimplifiedSolutionsCreateMockTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/SimplifiedSolutionsGetWithResponseMockTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/SimplifiedSolutionsResourceInnerTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/SimplifiedSolutionsResourcePropertiesTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/SolutionNlpMetadataResourceTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/SolutionOperationsWarmUpWithResponseMockTests.java create mode 100644 sdk/selfhelp/azure-resourcemanager-selfhelp/src/test/java/com/azure/resourcemanager/selfhelp/generated/SolutionWarmUpRequestBodyTests.java diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/CHANGELOG.md b/sdk/selfhelp/azure-resourcemanager-selfhelp/CHANGELOG.md index 7962fdfc7078..fef9de8bd138 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/CHANGELOG.md +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/CHANGELOG.md @@ -1,14 +1,93 @@ # Release History -## 1.1.0-beta.3 (Unreleased) +## 1.1.0-beta.3 (2024-04-23) -### Features Added +- Azure Resource Manager Self Help client library for Java. This package contains Microsoft Azure SDK for Self Help Management SDK. Help RP provider. Package tag package-2024-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.DiscoverySolutions` was modified + +* `list(java.lang.String)` was removed +* `list(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +### Features Added + +* `models.SolutionResourceSelfHelp` was added + +* `models.DiscoveryNlpRequest` was added + +* `models.ValidationScope` was added + +* `models.SimplifiedSolutionsResource$Definition` was added + +* `models.DiscoveryNlpResponse` was added + +* `models.SolutionWarmUpRequestBody` was added + +* `models.ClassificationService` was added + +* `models.SectionSelfHelp` was added + +* `models.SimplifiedSolutionsResource$DefinitionStages` was added + +* `models.SolutionSelfHelps` was added + +* `models.SolutionNlpMetadataResource` was added + +* `models.SimplifiedSolutions` was added + +* `models.DiscoverySolutionNlpTenantScopes` was added + +* `models.ReplacementMapsSelfHelp` was added + +* `models.DiscoverySolutionNlpSubscriptionScopes` was added + +* `models.SimplifiedSolutionsResource` was added + +#### `models.ResponseValidationProperties` was modified + +* `validationScope()` was added +* `withValidationScope(models.ValidationScope)` was added + +#### `models.StepInput` was modified + +* `withQuestionTitle(java.lang.String)` was added +* `questionTitle()` was added + +#### `models.SolutionOperations` was modified + +* `warmUpWithResponse(java.lang.String,java.lang.String,models.SolutionWarmUpRequestBody,com.azure.core.util.Context)` was added +* `warmUp(java.lang.String,java.lang.String)` was added + +#### `models.SolutionResource` was modified + +* `warmUpWithResponse(models.SolutionWarmUpRequestBody,com.azure.core.util.Context)` was added +* `warmUp()` was added + +#### `models.AutomatedCheckResult` was modified + +* `status()` was added +* `version()` was added +* `withStatus(java.lang.String)` was added +* `withVersion(java.lang.String)` was added + +#### `models.DiscoverySolutions` was modified + +* `list()` was added +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.SolutionsDiagnostic` was modified + +* `estimatedCompletionTime()` was added +* `withEstimatedCompletionTime(java.lang.String)` was added + +#### `SelfHelpManager` was modified -### Other Changes +* `solutionSelfHelps()` was added +* `discoverySolutionNlpTenantScopes()` was added +* `discoverySolutionNlpSubscriptionScopes()` was added +* `simplifiedSolutions()` was added ## 1.1.0-beta.2 (2023-12-19) diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/README.md b/sdk/selfhelp/azure-resourcemanager-selfhelp/README.md index 520830f17cba..505a1e1acb64 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/README.md +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Self Help client library for Java. -This package contains Microsoft Azure SDK for Self Help Management SDK. Help RP provider. Package tag package-2023-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Self Help Management SDK. Help RP provider. Package tag package-2024-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-selfhelp - 1.1.0-beta.2 + 1.1.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/SAMPLE.md b/sdk/selfhelp/azure-resourcemanager-selfhelp/SAMPLE.md index ba121fe68c0f..1c9e08341eda 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/SAMPLE.md +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/SAMPLE.md @@ -14,15 +14,33 @@ - [List](#discoverysolution_list) +## DiscoverySolutionNlpSubscriptionScope + +- [Post](#discoverysolutionnlpsubscriptionscope_post) + +## DiscoverySolutionNlpTenantScope + +- [Post](#discoverysolutionnlptenantscope_post) + ## Operations - [List](#operations_list) +## SimplifiedSolutions + +- [Create](#simplifiedsolutions_create) +- [Get](#simplifiedsolutions_get) + ## SolutionOperation - [Create](#solutionoperation_create) - [Get](#solutionoperation_get) - [Update](#solutionoperation_update) +- [WarmUp](#solutionoperation_warmup) + +## SolutionSelfHelp + +- [Get](#solutionselfhelp_get) ## Troubleshooters @@ -41,27 +59,35 @@ import com.azure.resourcemanager.selfhelp.models.CheckNameAvailabilityRequest; */ public final class CheckNameAvailabilityPostSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json */ /** * Sample code: Example when name is not available for a Diagnostic resource. * * @param manager Entry point to SelfHelpManager. */ - public static void exampleWhenNameIsNotAvailableForADiagnosticResource(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.checkNameAvailabilities().postWithResponse("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", new CheckNameAvailabilityRequest().withName("sampleName").withType("Microsoft.Help/diagnostics"), com.azure.core.util.Context.NONE); + public static void exampleWhenNameIsNotAvailableForADiagnosticResource( + com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.checkNameAvailabilities() + .postWithResponse("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", + new CheckNameAvailabilityRequest().withName("sampleName").withType("Microsoft.Help/diagnostics"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json */ /** * Sample code: Example when name is available for a Diagnostic resource. * * @param manager Entry point to SelfHelpManager. */ - public static void exampleWhenNameIsAvailableForADiagnosticResource(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.checkNameAvailabilities().postWithResponse("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", new CheckNameAvailabilityRequest().withName("sampleName").withType("Microsoft.Help/diagnostics"), com.azure.core.util.Context.NONE); + public static void + exampleWhenNameIsAvailableForADiagnosticResource(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.checkNameAvailabilities() + .postWithResponse("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", + new CheckNameAvailabilityRequest().withName("sampleName").withType("Microsoft.Help/diagnostics"), + com.azure.core.util.Context.NONE); } } ``` @@ -69,23 +95,25 @@ public final class CheckNameAvailabilityPostSamples { ### Diagnostics_Create ```java -import com.azure.resourcemanager.selfhelp.models.DiagnosticInvocation; -import java.util.Arrays; - /** * Samples for Diagnostics Create. */ public final class DiagnosticsCreateSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/CreateDiagnosticForKeyVaultResource.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/CreateDiagnosticForKeyVaultResource.json */ /** * Sample code: Creates a Diagnostic for a KeyVault resource. * * @param manager Entry point to SelfHelpManager. */ - public static void createsADiagnosticForAKeyVaultResource(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.diagnostics().define("VMNotWorkingInsight").withExistingScope("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read").withInsights(Arrays.asList(new DiagnosticInvocation().withSolutionId("SampleSolutionId1"), new DiagnosticInvocation().withSolutionId("SampleSolutionId2"))).create(); + public static void + createsADiagnosticForAKeyVaultResource(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.diagnostics() + .define("VMNotWorkingInsight") + .withExistingScope( + "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read") + .create(); } } ``` @@ -98,7 +126,7 @@ public final class DiagnosticsCreateSamples { */ public final class DiagnosticsGetSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/GetDiagnosticForKeyVaultResource.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/GetDiagnosticForKeyVaultResource.json */ /** * Sample code: Gets a Diagnostic for a KeyVault resource. @@ -106,7 +134,10 @@ public final class DiagnosticsGetSamples { * @param manager Entry point to SelfHelpManager. */ public static void getsADiagnosticForAKeyVaultResource(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.diagnostics().getWithResponse("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", "VMNotWorkingInsight", com.azure.core.util.Context.NONE); + manager.diagnostics() + .getWithResponse( + "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", + "VMNotWorkingInsight", com.azure.core.util.Context.NONE); } } ``` @@ -119,27 +150,72 @@ public final class DiagnosticsGetSamples { */ public final class DiscoverySolutionListSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/ListDiscoverySolutionsAtResourceScope.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListDiscoverySolutionsAtTenantScope.json */ /** * Sample code: List DiscoverySolutions at resource scope. * * @param manager Entry point to SelfHelpManager. */ - public static void listDiscoverySolutionsAtResourceScope(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.discoverySolutions().list("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read", "ProblemClassificationId eq 'SampleProblemClassificationId1'", null, com.azure.core.util.Context.NONE); + public static void + listDiscoverySolutionsAtResourceScope(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.discoverySolutions() + .list("ProblemClassificationId eq 'SampleProblemClassificationId1'", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### DiscoverySolutionNlpSubscriptionScope_Post + +```java +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; + +/** + * Samples for DiscoverySolutionNlpSubscriptionScope Post. + */ +public final class DiscoverySolutionNlpSubscriptionScopePostSamples { + /* + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtSubscriptionScope.json + */ + /** + * Sample code: Discovery Solutions using issue summary and service id. + * + * @param manager Entry point to SelfHelpManager. + */ + public static void + discoverySolutionsUsingIssueSummaryAndServiceId(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.discoverySolutionNlpSubscriptionScopes() + .postWithResponse(new DiscoveryNlpRequest().withIssueSummary("how to retrieve certs from deleted keyvault.") + .withResourceId( + "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read") + .withServiceId("0d0fcd2e-c4fd-4349-8497-200edb39s3ca"), com.azure.core.util.Context.NONE); } +} +``` + +### DiscoverySolutionNlpTenantScope_Post +```java +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; + +/** + * Samples for DiscoverySolutionNlpTenantScope Post. + */ +public final class DiscoverySolutionNlpTenantScopePostSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/ListDiscoverySolutionsAtSubscriptionScope.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/DiscoverSolutionsAtTenantScope.json */ /** - * Sample code: List DiscoverySolutions at subscription scope. + * Sample code: Discovery Solutions using issue summary and service id. * * @param manager Entry point to SelfHelpManager. */ - public static void listDiscoverySolutionsAtSubscriptionScope(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.discoverySolutions().list("subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6", "ProblemClassificationId eq 'SampleProblemClassificationId1'", null, com.azure.core.util.Context.NONE); + public static void + discoverySolutionsUsingIssueSummaryAndServiceId(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.discoverySolutionNlpTenantScopes() + .postWithResponse(new DiscoveryNlpRequest().withIssueSummary("how to retrieve certs from deleted keyvault.") + .withServiceId("0d0fcd2e-c4fd-4349-8497-200edb39s3ca"), com.azure.core.util.Context.NONE); } } ``` @@ -152,7 +228,7 @@ public final class DiscoverySolutionListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/ListOperations.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/ListOperations.json */ /** * Sample code: List All Operations. @@ -165,20 +241,88 @@ public final class OperationsListSamples { } ``` +### SimplifiedSolutions_Create + +```java +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for SimplifiedSolutions Create. + */ +public final class SimplifiedSolutionsCreateSamples { + /* + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/SimplifiedSolutions_Create.json + */ + /** + * Sample code: Solution_Create. + * + * @param manager Entry point to SelfHelpManager. + */ + public static void solutionCreate(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.simplifiedSolutions() + .define("simplifiedSolutionsResourceName1") + .withExistingScope( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp") + .withSolutionId("sampleSolutionId") + .withParameters(mapOf("resourceUri", + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### SimplifiedSolutions_Get + +```java +/** + * Samples for SimplifiedSolutions Get. + */ +public final class SimplifiedSolutionsGetSamples { + /* + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/SimplifiedSolutions_Get.json + */ + /** + * Sample code: Solution_Get. + * + * @param manager Entry point to SelfHelpManager. + */ + public static void solutionGet(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.simplifiedSolutions() + .getWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "simplifiedSolutionsResourceName1", com.azure.core.util.Context.NONE); + } +} +``` + ### SolutionOperation_Create ```java import com.azure.resourcemanager.selfhelp.models.Name; import com.azure.resourcemanager.selfhelp.models.TriggerCriterion; import java.util.Arrays; -import java.util.stream.Collectors; +import java.util.HashMap; +import java.util.Map; /** * Samples for SolutionOperation Create. */ public final class SolutionOperationCreateSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Create.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_Create.json */ /** * Sample code: Solution_Create. @@ -186,7 +330,27 @@ public final class SolutionOperationCreateSamples { * @param manager Entry point to SelfHelpManager. */ public static void solutionCreate(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.solutionOperations().define("SolutionResourceName1").withExistingScope("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp").withTriggerCriteria(Arrays.asList(new TriggerCriterion().withName(Name.SOLUTION_ID).withValue("SolutionId1"))).create(); + manager.solutionOperations() + .define("SolutionResourceName1") + .withExistingScope( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp") + .withTriggerCriteria( + Arrays.asList(new TriggerCriterion().withName(Name.SOLUTION_ID).withValue("SolutionId1"))) + .withParameters(mapOf("resourceUri", + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -199,7 +363,7 @@ public final class SolutionOperationCreateSamples { */ public final class SolutionOperationGetSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Get.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_Get.json */ /** * Sample code: Solution_Get. @@ -207,7 +371,10 @@ public final class SolutionOperationGetSamples { * @param manager Entry point to SelfHelpManager. */ public static void solutionGet(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.solutionOperations().getWithResponse("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "SolutionResource1", com.azure.core.util.Context.NONE); + manager.solutionOperations() + .getWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "SolutionResource1", com.azure.core.util.Context.NONE); } } ``` @@ -215,18 +382,14 @@ public final class SolutionOperationGetSamples { ### SolutionOperation_Update ```java -import com.azure.resourcemanager.selfhelp.models.Name; import com.azure.resourcemanager.selfhelp.models.SolutionResource; -import com.azure.resourcemanager.selfhelp.models.TriggerCriterion; -import java.util.Arrays; -import java.util.stream.Collectors; /** * Samples for SolutionOperation Update. */ public final class SolutionOperationUpdateSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Update.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_Update.json */ /** * Sample code: Solution_Update. @@ -234,8 +397,58 @@ public final class SolutionOperationUpdateSamples { * @param manager Entry point to SelfHelpManager. */ public static void solutionUpdate(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - SolutionResource resource = manager.solutionOperations().getWithResponse("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "SolutionResourceName1", com.azure.core.util.Context.NONE).getValue(); - resource.update().withTriggerCriteria(Arrays.asList(new TriggerCriterion().withName(Name.REPLACEMENT_KEY).withValue(""))).apply(); + SolutionResource resource = manager.solutionOperations() + .getWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "SolutionResourceName1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### SolutionOperation_WarmUp + +```java + +/** + * Samples for SolutionOperation WarmUp. + */ +public final class SolutionOperationWarmUpSamples { + /* + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_WarmUp.json + */ + /** + * Sample code: Solution_WarmUp. + * + * @param manager Entry point to SelfHelpManager. + */ + public static void solutionWarmUp(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.solutionOperations() + .warmUpWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "SolutionResourceName1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### SolutionSelfHelp_Get + +```java +/** + * Samples for SolutionSelfHelp Get. + */ +public final class SolutionSelfHelpGetSamples { + /* + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/SelfHelpSolution_Get.json + */ + /** + * Sample code: Solution_Get. + * + * @param manager Entry point to SelfHelpManager. + */ + public static void solutionGet(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { + manager.solutionSelfHelps().getWithResponse("SolutionId1", com.azure.core.util.Context.NONE); } } ``` @@ -247,14 +460,13 @@ import com.azure.resourcemanager.selfhelp.models.ContinueRequestBody; import com.azure.resourcemanager.selfhelp.models.QuestionType; import com.azure.resourcemanager.selfhelp.models.TroubleshooterResponse; import java.util.Arrays; -import java.util.stream.Collectors; /** * Samples for Troubleshooters ContinueMethod. */ public final class TroubleshootersContinueMethodSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Continue.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Continue.json */ /** * Sample code: Troubleshooter_Continue. @@ -262,7 +474,15 @@ public final class TroubleshootersContinueMethodSamples { * @param manager Entry point to SelfHelpManager. */ public static void troubleshooterContinue(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.troubleshooters().continueMethodWithResponse("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", new ContinueRequestBody().withStepId("SampleStepId").withResponses(Arrays.asList(new TroubleshooterResponse().withQuestionId("SampleQuestionId").withQuestionType(QuestionType.fromString("Text")).withResponse("Connection exception"))), com.azure.core.util.Context.NONE); + manager.troubleshooters() + .continueMethodWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "abf168ed-1b54-454a-86f6-e4b62253d3b1", + new ContinueRequestBody().withStepId("SampleStepId") + .withResponses(Arrays.asList(new TroubleshooterResponse().withQuestionId("SampleQuestionId") + .withQuestionType(QuestionType.fromString("Text")) + .withResponse("Connection exception"))), + com.azure.core.util.Context.NONE); } } ``` @@ -278,7 +498,7 @@ import java.util.Map; */ public final class TroubleshootersCreateSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Create.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Create.json */ /** * Sample code: Troubleshooters_Create. @@ -286,7 +506,14 @@ public final class TroubleshootersCreateSamples { * @param manager Entry point to SelfHelpManager. */ public static void troubleshootersCreate(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.troubleshooters().define("abf168ed-1b54-454a-86f6-e4b62253d3b1").withExistingScope("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp").withSolutionId("SampleTroubleshooterSolutionId").withParameters(mapOf("ResourceURI", "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp")).create(); + manager.troubleshooters() + .define("abf168ed-1b54-454a-86f6-e4b62253d3b1") + .withExistingScope( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp") + .withSolutionId("SampleTroubleshooterSolutionId") + .withParameters(mapOf("ResourceURI", + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp")) + .create(); } // Use "Map.of" if available @@ -311,7 +538,7 @@ public final class TroubleshootersCreateSamples { */ public final class TroubleshootersEndSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_End.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_End.json */ /** * Sample code: Troubleshooters_End. @@ -319,7 +546,10 @@ public final class TroubleshootersEndSamples { * @param manager Entry point to SelfHelpManager. */ public static void troubleshootersEnd(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.troubleshooters().endWithResponse("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", com.azure.core.util.Context.NONE); + manager.troubleshooters() + .endWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "abf168ed-1b54-454a-86f6-e4b62253d3b1", com.azure.core.util.Context.NONE); } } ``` @@ -332,7 +562,7 @@ public final class TroubleshootersEndSamples { */ public final class TroubleshootersGetSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Get.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Get.json */ /** * Sample code: Troubleshooters_Get. @@ -340,7 +570,10 @@ public final class TroubleshootersGetSamples { * @param manager Entry point to SelfHelpManager. */ public static void troubleshootersGet(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.troubleshooters().getWithResponse("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", com.azure.core.util.Context.NONE); + manager.troubleshooters() + .getWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "abf168ed-1b54-454a-86f6-e4b62253d3b1", com.azure.core.util.Context.NONE); } } ``` @@ -353,7 +586,7 @@ public final class TroubleshootersGetSamples { */ public final class TroubleshootersRestartSamples { /* - * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Restart.json + * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Troubleshooter_Restart.json */ /** * Sample code: Troubleshooters_Restart. @@ -361,7 +594,10 @@ public final class TroubleshootersRestartSamples { * @param manager Entry point to SelfHelpManager. */ public static void troubleshootersRestart(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) { - manager.troubleshooters().restartWithResponse("subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "abf168ed-1b54-454a-86f6-e4b62253d3b1", com.azure.core.util.Context.NONE); + manager.troubleshooters() + .restartWithResponse( + "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", + "abf168ed-1b54-454a-86f6-e4b62253d3b1", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/pom.xml b/sdk/selfhelp/azure-resourcemanager-selfhelp/pom.xml index 6e8ae8849570..0a25a16687fd 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/pom.xml +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Self Help Management - This package contains Microsoft Azure SDK for Self Help Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Help RP provider. Package tag package-2023-09-01-preview. + This package contains Microsoft Azure SDK for Self Help Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Help RP provider. Package tag package-2024-03-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -82,14 +82,18 @@ 5.9.3 test + + org.slf4j + slf4j-simple + 1.7.36 + test + org.mockito mockito-core 4.11.0 test - - net.bytebuddy byte-buddy @@ -102,11 +106,5 @@ 1.14.12 test - - org.slf4j - slf4j-simple - 1.7.36 - test - diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/SelfHelpManager.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/SelfHelpManager.java index 70bb9d6decf7..449ef1e0d542 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/SelfHelpManager.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/SelfHelpManager.java @@ -11,8 +11,8 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -26,16 +26,24 @@ import com.azure.resourcemanager.selfhelp.fluent.HelpRP; import com.azure.resourcemanager.selfhelp.implementation.CheckNameAvailabilitiesImpl; import com.azure.resourcemanager.selfhelp.implementation.DiagnosticsImpl; +import com.azure.resourcemanager.selfhelp.implementation.DiscoverySolutionNlpSubscriptionScopesImpl; +import com.azure.resourcemanager.selfhelp.implementation.DiscoverySolutionNlpTenantScopesImpl; import com.azure.resourcemanager.selfhelp.implementation.DiscoverySolutionsImpl; import com.azure.resourcemanager.selfhelp.implementation.HelpRPBuilder; import com.azure.resourcemanager.selfhelp.implementation.OperationsImpl; +import com.azure.resourcemanager.selfhelp.implementation.SimplifiedSolutionsImpl; import com.azure.resourcemanager.selfhelp.implementation.SolutionOperationsImpl; +import com.azure.resourcemanager.selfhelp.implementation.SolutionSelfHelpsImpl; import com.azure.resourcemanager.selfhelp.implementation.TroubleshootersImpl; import com.azure.resourcemanager.selfhelp.models.CheckNameAvailabilities; import com.azure.resourcemanager.selfhelp.models.Diagnostics; +import com.azure.resourcemanager.selfhelp.models.DiscoverySolutionNlpSubscriptionScopes; +import com.azure.resourcemanager.selfhelp.models.DiscoverySolutionNlpTenantScopes; import com.azure.resourcemanager.selfhelp.models.DiscoverySolutions; import com.azure.resourcemanager.selfhelp.models.Operations; +import com.azure.resourcemanager.selfhelp.models.SimplifiedSolutions; import com.azure.resourcemanager.selfhelp.models.SolutionOperations; +import com.azure.resourcemanager.selfhelp.models.SolutionSelfHelps; import com.azure.resourcemanager.selfhelp.models.Troubleshooters; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -59,16 +67,26 @@ public final class SelfHelpManager { private SolutionOperations solutionOperations; + private SimplifiedSolutions simplifiedSolutions; + private Troubleshooters troubleshooters; + private SolutionSelfHelps solutionSelfHelps; + + private DiscoverySolutionNlpTenantScopes discoverySolutionNlpTenantScopes; + + private DiscoverySolutionNlpSubscriptionScopes discoverySolutionNlpSubscriptionScopes; + private final HelpRP clientObject; private SelfHelpManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject - = new HelpRPBuilder().pipeline(httpPipeline).endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .defaultPollInterval(defaultPollInterval).buildClient(); + this.clientObject = new HelpRPBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** @@ -219,12 +237,19 @@ public SelfHelpManager authenticate(TokenCredential credential, AzureProfile pro Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.selfhelp").append("/") - .append("1.1.0-beta.2"); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.selfhelp") + .append("/") + .append("1.1.0-beta.3"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -243,18 +268,21 @@ public SelfHelpManager authenticate(TokenCredential credential, AzureProfile pro policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new SelfHelpManager(httpPipeline, profile, defaultPollInterval); } } @@ -320,6 +348,18 @@ public SolutionOperations solutionOperations() { return solutionOperations; } + /** + * Gets the resource collection API of SimplifiedSolutions. It manages SimplifiedSolutionsResource. + * + * @return Resource collection API of SimplifiedSolutions. + */ + public SimplifiedSolutions simplifiedSolutions() { + if (this.simplifiedSolutions == null) { + this.simplifiedSolutions = new SimplifiedSolutionsImpl(clientObject.getSimplifiedSolutions(), this); + } + return simplifiedSolutions; + } + /** * Gets the resource collection API of Troubleshooters. It manages TroubleshooterResource. * @@ -332,6 +372,44 @@ public Troubleshooters troubleshooters() { return troubleshooters; } + /** + * Gets the resource collection API of SolutionSelfHelps. + * + * @return Resource collection API of SolutionSelfHelps. + */ + public SolutionSelfHelps solutionSelfHelps() { + if (this.solutionSelfHelps == null) { + this.solutionSelfHelps = new SolutionSelfHelpsImpl(clientObject.getSolutionSelfHelps(), this); + } + return solutionSelfHelps; + } + + /** + * Gets the resource collection API of DiscoverySolutionNlpTenantScopes. + * + * @return Resource collection API of DiscoverySolutionNlpTenantScopes. + */ + public DiscoverySolutionNlpTenantScopes discoverySolutionNlpTenantScopes() { + if (this.discoverySolutionNlpTenantScopes == null) { + this.discoverySolutionNlpTenantScopes + = new DiscoverySolutionNlpTenantScopesImpl(clientObject.getDiscoverySolutionNlpTenantScopes(), this); + } + return discoverySolutionNlpTenantScopes; + } + + /** + * Gets the resource collection API of DiscoverySolutionNlpSubscriptionScopes. + * + * @return Resource collection API of DiscoverySolutionNlpSubscriptionScopes. + */ + public DiscoverySolutionNlpSubscriptionScopes discoverySolutionNlpSubscriptionScopes() { + if (this.discoverySolutionNlpSubscriptionScopes == null) { + this.discoverySolutionNlpSubscriptionScopes = new DiscoverySolutionNlpSubscriptionScopesImpl( + clientObject.getDiscoverySolutionNlpSubscriptionScopes(), this); + } + return discoverySolutionNlpSubscriptionScopes; + } + /** * Gets wrapped service client HelpRP providing direct access to the underlying auto-generated API implementation, * based on Azure REST API. diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiagnosticsClient.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiagnosticsClient.java index 484a03e0d571..fe5ed8c77699 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiagnosticsClient.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiagnosticsClient.java @@ -17,11 +17,9 @@ */ public interface DiagnosticsClient { /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -36,11 +34,9 @@ SyncPoller, DiagnosticResourceInner> beginCr String diagnosticsResourceName); /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -57,11 +53,9 @@ SyncPoller, DiagnosticResourceInner> beginCr String diagnosticsResourceName, DiagnosticResourceInner diagnosticResourceRequest, Context context); /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -75,11 +69,9 @@ SyncPoller, DiagnosticResourceInner> beginCr DiagnosticResourceInner create(String scope, String diagnosticsResourceName); /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpSubscriptionScopesClient.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpSubscriptionScopesClient.java new file mode 100644 index 000000000000..c072412dde0b --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpSubscriptionScopesClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; + +/** + * An instance of this class provides access to all the operations defined in + * DiscoverySolutionNlpSubscriptionScopesClient. + */ +public interface DiscoverySolutionNlpSubscriptionScopesClient { + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, Context context); + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiscoveryNlpResponseInner post(); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpTenantScopesClient.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpTenantScopesClient.java new file mode 100644 index 000000000000..dac9f88d536b --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionNlpTenantScopesClient.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; + +/** + * An instance of this class provides access to all the operations defined in DiscoverySolutionNlpTenantScopesClient. + */ +public interface DiscoverySolutionNlpTenantScopesClient { + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, Context context); + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiscoveryNlpResponseInner post(); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionsClient.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionsClient.java index 28be209f079f..49850e5299da 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionsClient.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/DiscoverySolutionsClient.java @@ -15,7 +15,7 @@ */ public interface DiscoverySolutionsClient { /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -25,18 +25,15 @@ public interface DiscoverySolutionsClient { * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return discovery response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope); + PagedIterable list(); /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -46,8 +43,6 @@ public interface DiscoverySolutionsClient { * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. * @param filter 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional * 'ResourceType' and 'SolutionType' filters. The * [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and @@ -60,5 +55,5 @@ public interface DiscoverySolutionsClient { * @return discovery response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope, String filter, String skiptoken, Context context); + PagedIterable list(String filter, String skiptoken, Context context); } diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/HelpRP.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/HelpRP.java index bb06e4ee5b0e..bfc597db94d8 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/HelpRP.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/HelpRP.java @@ -11,6 +11,13 @@ * The interface for HelpRP class. */ public interface HelpRP { + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets server parameter. * @@ -74,10 +81,38 @@ public interface HelpRP { */ SolutionOperationsClient getSolutionOperations(); + /** + * Gets the SimplifiedSolutionsClient object to access its operations. + * + * @return the SimplifiedSolutionsClient object. + */ + SimplifiedSolutionsClient getSimplifiedSolutions(); + /** * Gets the TroubleshootersClient object to access its operations. * * @return the TroubleshootersClient object. */ TroubleshootersClient getTroubleshooters(); + + /** + * Gets the SolutionSelfHelpsClient object to access its operations. + * + * @return the SolutionSelfHelpsClient object. + */ + SolutionSelfHelpsClient getSolutionSelfHelps(); + + /** + * Gets the DiscoverySolutionNlpTenantScopesClient object to access its operations. + * + * @return the DiscoverySolutionNlpTenantScopesClient object. + */ + DiscoverySolutionNlpTenantScopesClient getDiscoverySolutionNlpTenantScopes(); + + /** + * Gets the DiscoverySolutionNlpSubscriptionScopesClient object to access its operations. + * + * @return the DiscoverySolutionNlpSubscriptionScopesClient object. + */ + DiscoverySolutionNlpSubscriptionScopesClient getDiscoverySolutionNlpSubscriptionScopes(); } diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SimplifiedSolutionsClient.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SimplifiedSolutionsClient.java new file mode 100644 index 000000000000..b154510caab8 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SimplifiedSolutionsClient.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.selfhelp.fluent.models.SimplifiedSolutionsResourceInner; + +/** + * An instance of this class provides access to all the operations defined in SimplifiedSolutionsClient. + */ +public interface SimplifiedSolutionsClient { + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimplifiedSolutionsResourceInner> beginCreate(String scope, + String simplifiedSolutionsResourceName); + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SimplifiedSolutionsResourceInner> beginCreate(String scope, + String simplifiedSolutionsResourceName, SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, + Context context); + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimplifiedSolutionsResourceInner create(String scope, String simplifiedSolutionsResourceName); + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimplifiedSolutionsResourceInner create(String scope, String simplifiedSolutionsResourceName, + SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, Context context); + + /** + * Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the simplified Solutions using the applicable solutionResourceName while creating the simplified + * Solutions along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String scope, String simplifiedSolutionsResourceName, + Context context); + + /** + * Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the simplified Solutions using the applicable solutionResourceName while creating the simplified + * Solutions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SimplifiedSolutionsResourceInner get(String scope, String simplifiedSolutionsResourceName); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionOperationsClient.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionOperationsClient.java index cc64b74d51f0..7f4874cac712 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionOperationsClient.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionOperationsClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceInner; import com.azure.resourcemanager.selfhelp.models.SolutionPatchRequestBody; +import com.azure.resourcemanager.selfhelp.models.SolutionWarmUpRequestBody; /** * An instance of this class provides access to all the operations defined in SolutionOperationsClient. @@ -21,17 +22,11 @@ public interface SolutionOperationsClient { * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -49,17 +44,11 @@ SyncPoller, SolutionResourceInner> beginCreate * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -79,17 +68,11 @@ SyncPoller, SolutionResourceInner> beginCreate * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -106,17 +89,11 @@ SyncPoller, SolutionResourceInner> beginCreate * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -224,4 +201,34 @@ SyncPoller, SolutionResourceInner> beginUpdate @ServiceMethod(returns = ReturnType.SINGLE) SolutionResourceInner update(String scope, String solutionResourceName, SolutionPatchRequestBody solutionPatchRequestBody, Context context); + + /** + * Warm up the solution resource by preloading asynchronous diagnostics results into cache. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param solutionResourceName Solution resource Name. + * @param solutionWarmUpRequestBody The required request body for warming up a solution resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response warmUpWithResponse(String scope, String solutionResourceName, + SolutionWarmUpRequestBody solutionWarmUpRequestBody, Context context); + + /** + * Warm up the solution resource by preloading asynchronous diagnostics results into cache. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param solutionResourceName Solution resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void warmUp(String scope, String solutionResourceName); } diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionSelfHelpsClient.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionSelfHelpsClient.java new file mode 100644 index 000000000000..306d6c51b9e3 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/SolutionSelfHelpsClient.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceSelfHelpInner; + +/** + * An instance of this class provides access to all the operations defined in SolutionSelfHelpsClient. + */ +public interface SolutionSelfHelpsClient { + /** + * Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video + * tutorials, links and guides to public documentation related to a specific problem that enables users to + * troubleshoot Azure issues. + * + * @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + * Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return self Help Solutions for a given solutionId along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String solutionId, Context context); + + /** + * Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video + * tutorials, links and guides to public documentation related to a specific problem that enables users to + * troubleshoot Azure issues. + * + * @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + * Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return self Help Solutions for a given solutionId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SolutionResourceSelfHelpInner get(String solutionId); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/CheckNameAvailabilityResponseInner.java index 489c9d863693..6e988f2321da 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/CheckNameAvailabilityResponseInner.java @@ -25,8 +25,7 @@ public final class CheckNameAvailabilityResponseInner { private String reason; /* - * Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable - * is false. + * Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable is false. */ @JsonProperty(value = "message") private String message; @@ -58,8 +57,7 @@ public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailabl } /** - * Get the reason property: Reason for why value is not available. This field is returned if nameAvailable is - * false. + * Get the reason property: Reason for why value is not available. This field is returned if nameAvailable is false. * * @return the reason value. */ @@ -68,8 +66,7 @@ public String reason() { } /** - * Set the reason property: Reason for why value is not available. This field is returned if nameAvailable is - * false. + * Set the reason property: Reason for why value is not available. This field is returned if nameAvailable is false. * * @param reason the reason value to set. * @return the CheckNameAvailabilityResponseInner object itself. diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceInner.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceInner.java index 41fe8ef92a1b..d7b2beb117c0 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceInner.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceInner.java @@ -56,8 +56,8 @@ public SystemData systemData() { } /** - * Get the globalParameters property: Global parameters is an optional map which can be used to add key and value - * to request body to improve the diagnostics results. + * Get the globalParameters property: Global parameters is an optional map which can be used to add key and value to + * request body to improve the diagnostics results. * * @return the globalParameters value. */ @@ -66,8 +66,8 @@ public Map globalParameters() { } /** - * Set the globalParameters property: Global parameters is an optional map which can be used to add key and value - * to request body to improve the diagnostics results. + * Set the globalParameters property: Global parameters is an optional map which can be used to add key and value to + * request body to improve the diagnostics results. * * @param globalParameters the globalParameters value to set. * @return the DiagnosticResourceInner object itself. diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceProperties.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceProperties.java index 4104d02cbbb2..217a0324acb9 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceProperties.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiagnosticResourceProperties.java @@ -19,8 +19,7 @@ @Fluent public final class DiagnosticResourceProperties { /* - * Global parameters is an optional map which can be used to add key and value to request body to improve the - * diagnostics results + * Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results */ @JsonProperty(value = "globalParameters") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -57,8 +56,8 @@ public DiagnosticResourceProperties() { } /** - * Get the globalParameters property: Global parameters is an optional map which can be used to add key and value - * to request body to improve the diagnostics results. + * Get the globalParameters property: Global parameters is an optional map which can be used to add key and value to + * request body to improve the diagnostics results. * * @return the globalParameters value. */ @@ -67,8 +66,8 @@ public Map globalParameters() { } /** - * Set the globalParameters property: Global parameters is an optional map which can be used to add key and value - * to request body to improve the diagnostics results. + * Set the globalParameters property: Global parameters is an optional map which can be used to add key and value to + * request body to improve the diagnostics results. * * @param globalParameters the globalParameters value to set. * @return the DiagnosticResourceProperties object itself. diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiscoveryNlpResponseInner.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiscoveryNlpResponseInner.java new file mode 100644 index 000000000000..ed96de629f26 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/DiscoveryNlpResponseInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.selfhelp.models.SolutionNlpMetadataResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Successfully fetched list of solution metadata. + */ +@Fluent +public final class DiscoveryNlpResponseInner { + /* + * The list of solution metadata. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of DiscoveryNlpResponseInner class. + */ + public DiscoveryNlpResponseInner() { + } + + /** + * Get the value property: The list of solution metadata. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of solution metadata. + * + * @param value the value value to set. + * @return the DiscoveryNlpResponseInner object itself. + */ + public DiscoveryNlpResponseInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/NlpSolutions.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/NlpSolutions.java new file mode 100644 index 000000000000..f66a92977fdb --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/NlpSolutions.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.selfhelp.models.ClassificationService; +import com.azure.resourcemanager.selfhelp.models.SolutionMetadataProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Nlp metadata. + */ +@Fluent +public final class NlpSolutions { + /* + * Title of the problem classification. + */ + @JsonProperty(value = "problemTitle") + private String problemTitle; + + /* + * Description of the problem classification. + */ + @JsonProperty(value = "problemDescription") + private String problemDescription; + + /* + * Id of the service (https://learn.microsoft.com/en-us/rest/api/support/services?view=rest-support-2020-04-01) that may be used to create a support ticket. + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /* + * Id of the ProblemClassification (https://learn.microsoft.com/en-us/rest/api/support/problem-classifications?view=rest-support-2020-04-01) that may be used to create a support ticket. + */ + @JsonProperty(value = "problemClassificationId") + private String problemClassificationId; + + /* + * The list of solution metadata. + */ + @JsonProperty(value = "solutions") + private List solutions; + + /* + * The set of services that are most likely related to the request. If relatedServices is included in the response then solutions may not be discovered until the client calls a second time specifying one of the service Ids in the relatedServices object. + */ + @JsonProperty(value = "relatedServices") + private List relatedServices; + + /** + * Creates an instance of NlpSolutions class. + */ + public NlpSolutions() { + } + + /** + * Get the problemTitle property: Title of the problem classification. + * + * @return the problemTitle value. + */ + public String problemTitle() { + return this.problemTitle; + } + + /** + * Set the problemTitle property: Title of the problem classification. + * + * @param problemTitle the problemTitle value to set. + * @return the NlpSolutions object itself. + */ + public NlpSolutions withProblemTitle(String problemTitle) { + this.problemTitle = problemTitle; + return this; + } + + /** + * Get the problemDescription property: Description of the problem classification. + * + * @return the problemDescription value. + */ + public String problemDescription() { + return this.problemDescription; + } + + /** + * Set the problemDescription property: Description of the problem classification. + * + * @param problemDescription the problemDescription value to set. + * @return the NlpSolutions object itself. + */ + public NlpSolutions withProblemDescription(String problemDescription) { + this.problemDescription = problemDescription; + return this; + } + + /** + * Get the serviceId property: Id of the service + * (https://learn.microsoft.com/en-us/rest/api/support/services?view=rest-support-2020-04-01) that may be used to + * create a support ticket. + * + * @return the serviceId value. + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the serviceId property: Id of the service + * (https://learn.microsoft.com/en-us/rest/api/support/services?view=rest-support-2020-04-01) that may be used to + * create a support ticket. + * + * @param serviceId the serviceId value to set. + * @return the NlpSolutions object itself. + */ + public NlpSolutions withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the problemClassificationId property: Id of the ProblemClassification + * (https://learn.microsoft.com/en-us/rest/api/support/problem-classifications?view=rest-support-2020-04-01) that + * may be used to create a support ticket. + * + * @return the problemClassificationId value. + */ + public String problemClassificationId() { + return this.problemClassificationId; + } + + /** + * Set the problemClassificationId property: Id of the ProblemClassification + * (https://learn.microsoft.com/en-us/rest/api/support/problem-classifications?view=rest-support-2020-04-01) that + * may be used to create a support ticket. + * + * @param problemClassificationId the problemClassificationId value to set. + * @return the NlpSolutions object itself. + */ + public NlpSolutions withProblemClassificationId(String problemClassificationId) { + this.problemClassificationId = problemClassificationId; + return this; + } + + /** + * Get the solutions property: The list of solution metadata. + * + * @return the solutions value. + */ + public List solutions() { + return this.solutions; + } + + /** + * Set the solutions property: The list of solution metadata. + * + * @param solutions the solutions value to set. + * @return the NlpSolutions object itself. + */ + public NlpSolutions withSolutions(List solutions) { + this.solutions = solutions; + return this; + } + + /** + * Get the relatedServices property: The set of services that are most likely related to the request. If + * relatedServices is included in the response then solutions may not be discovered until the client calls a second + * time specifying one of the service Ids in the relatedServices object. + * + * @return the relatedServices value. + */ + public List relatedServices() { + return this.relatedServices; + } + + /** + * Set the relatedServices property: The set of services that are most likely related to the request. If + * relatedServices is included in the response then solutions may not be discovered until the client calls a second + * time specifying one of the service Ids in the relatedServices object. + * + * @param relatedServices the relatedServices value to set. + * @return the NlpSolutions object itself. + */ + public NlpSolutions withRelatedServices(List relatedServices) { + this.relatedServices = relatedServices; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (solutions() != null) { + solutions().forEach(e -> e.validate()); + } + if (relatedServices() != null) { + relatedServices().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/OperationInner.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/OperationInner.java index 33b5668857c4..f170d6d18666 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/OperationInner.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/OperationInner.java @@ -18,15 +18,13 @@ @Fluent public final class OperationInner { /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. */ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; @@ -38,8 +36,7 @@ public final class OperationInner { private OperationDisplay display; /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private Origin origin; diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceInner.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceInner.java new file mode 100644 index 000000000000..4bc487a7ccaf --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceInner.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.selfhelp.models.SolutionProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Simplified Solutions response. + */ +@Fluent +public final class SimplifiedSolutionsResourceInner extends ProxyResource { + /* + * Simplified Solutions result + */ + @JsonProperty(value = "properties") + private SimplifiedSolutionsResourceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SimplifiedSolutionsResourceInner class. + */ + public SimplifiedSolutionsResourceInner() { + } + + /** + * Get the innerProperties property: Simplified Solutions result. + * + * @return the innerProperties value. + */ + private SimplifiedSolutionsResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the solutionId property: Solution Id to identify single Simplified Solution. + * + * @return the solutionId value. + */ + public String solutionId() { + return this.innerProperties() == null ? null : this.innerProperties().solutionId(); + } + + /** + * Set the solutionId property: Solution Id to identify single Simplified Solution. + * + * @param solutionId the solutionId value to set. + * @return the SimplifiedSolutionsResourceInner object itself. + */ + public SimplifiedSolutionsResourceInner withSolutionId(String solutionId) { + if (this.innerProperties() == null) { + this.innerProperties = new SimplifiedSolutionsResourceProperties(); + } + this.innerProperties().withSolutionId(solutionId); + return this; + } + + /** + * Get the parameters property: Client input parameters to run Simplified Solutions. + * + * @return the parameters value. + */ + public Map parameters() { + return this.innerProperties() == null ? null : this.innerProperties().parameters(); + } + + /** + * Set the parameters property: Client input parameters to run Simplified Solutions. + * + * @param parameters the parameters value to set. + * @return the SimplifiedSolutionsResourceInner object itself. + */ + public SimplifiedSolutionsResourceInner withParameters(Map parameters) { + if (this.innerProperties() == null) { + this.innerProperties = new SimplifiedSolutionsResourceProperties(); + } + this.innerProperties().withParameters(parameters); + return this; + } + + /** + * Get the title property: The title. + * + * @return the title value. + */ + public String title() { + return this.innerProperties() == null ? null : this.innerProperties().title(); + } + + /** + * Get the appendix property: Additional parameter response for Simplified Solutions. + * + * @return the appendix value. + */ + public Map appendix() { + return this.innerProperties() == null ? null : this.innerProperties().appendix(); + } + + /** + * Get the content property: The HTML content that needs to be rendered and shown to customer. + * + * @return the content value. + */ + public String content() { + return this.innerProperties() == null ? null : this.innerProperties().content(); + } + + /** + * Get the provisioningState property: Status of Simplified Solution provisioning. + * + * @return the provisioningState value. + */ + public SolutionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceProperties.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceProperties.java new file mode 100644 index 000000000000..853c3618a93e --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SimplifiedSolutionsResourceProperties.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.selfhelp.models.SolutionProvisioningState; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Simplified Solutions result. + */ +@Fluent +public final class SimplifiedSolutionsResourceProperties { + /* + * Solution Id to identify single Simplified Solution. + */ + @JsonProperty(value = "solutionId") + private String solutionId; + + /* + * Client input parameters to run Simplified Solutions + */ + @JsonProperty(value = "parameters") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map parameters; + + /* + * The title. + */ + @JsonProperty(value = "title", access = JsonProperty.Access.WRITE_ONLY) + private String title; + + /* + * Additional parameter response for Simplified Solutions + */ + @JsonProperty(value = "appendix", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map appendix; + + /* + * The HTML content that needs to be rendered and shown to customer. + */ + @JsonProperty(value = "content", access = JsonProperty.Access.WRITE_ONLY) + private String content; + + /* + * Status of Simplified Solution provisioning. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private SolutionProvisioningState provisioningState; + + /** + * Creates an instance of SimplifiedSolutionsResourceProperties class. + */ + public SimplifiedSolutionsResourceProperties() { + } + + /** + * Get the solutionId property: Solution Id to identify single Simplified Solution. + * + * @return the solutionId value. + */ + public String solutionId() { + return this.solutionId; + } + + /** + * Set the solutionId property: Solution Id to identify single Simplified Solution. + * + * @param solutionId the solutionId value to set. + * @return the SimplifiedSolutionsResourceProperties object itself. + */ + public SimplifiedSolutionsResourceProperties withSolutionId(String solutionId) { + this.solutionId = solutionId; + return this; + } + + /** + * Get the parameters property: Client input parameters to run Simplified Solutions. + * + * @return the parameters value. + */ + public Map parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Client input parameters to run Simplified Solutions. + * + * @param parameters the parameters value to set. + * @return the SimplifiedSolutionsResourceProperties object itself. + */ + public SimplifiedSolutionsResourceProperties withParameters(Map parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the title property: The title. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Get the appendix property: Additional parameter response for Simplified Solutions. + * + * @return the appendix value. + */ + public Map appendix() { + return this.appendix; + } + + /** + * Get the content property: The HTML content that needs to be rendered and shown to customer. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Get the provisioningState property: Status of Simplified Solution provisioning. + * + * @return the provisioningState value. + */ + public SolutionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionResourceSelfHelpInner.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionResourceSelfHelpInner.java new file mode 100644 index 000000000000..427f10ed230a --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionResourceSelfHelpInner.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.selfhelp.models.ReplacementMapsSelfHelp; +import com.azure.resourcemanager.selfhelp.models.SectionSelfHelp; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Self Help Solution response. + */ +@Immutable +public final class SolutionResourceSelfHelpInner extends ProxyResource { + /* + * Solution result + */ + @JsonProperty(value = "properties") + private SolutionsResourcePropertiesSelfHelp innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SolutionResourceSelfHelpInner class. + */ + public SolutionResourceSelfHelpInner() { + } + + /** + * Get the innerProperties property: Solution result. + * + * @return the innerProperties value. + */ + private SolutionsResourcePropertiesSelfHelp innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the solutionId property: SolutionId is a unique id to identify a solution. You can retrieve the solution id + * using the Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * + * @return the solutionId value. + */ + public String solutionId() { + return this.innerProperties() == null ? null : this.innerProperties().solutionId(); + } + + /** + * Get the title property: The title. + * + * @return the title value. + */ + public String title() { + return this.innerProperties() == null ? null : this.innerProperties().title(); + } + + /** + * Get the content property: The HTML content that needs to be rendered and shown to customer. + * + * @return the content value. + */ + public String content() { + return this.innerProperties() == null ? null : this.innerProperties().content(); + } + + /** + * Get the replacementMaps property: Solution replacement maps. + * + * @return the replacementMaps value. + */ + public ReplacementMapsSelfHelp replacementMaps() { + return this.innerProperties() == null ? null : this.innerProperties().replacementMaps(); + } + + /** + * Get the sections property: List of section object. + * + * @return the sections value. + */ + public List sections() { + return this.innerProperties() == null ? null : this.innerProperties().sections(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionsResourcePropertiesSelfHelp.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionsResourcePropertiesSelfHelp.java new file mode 100644 index 000000000000..fe34be320b7b --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/fluent/models/SolutionsResourcePropertiesSelfHelp.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.selfhelp.models.ReplacementMapsSelfHelp; +import com.azure.resourcemanager.selfhelp.models.SectionSelfHelp; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Solution result. + */ +@Immutable +public final class SolutionsResourcePropertiesSelfHelp { + /* + * SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + */ + @JsonProperty(value = "solutionId", access = JsonProperty.Access.WRITE_ONLY) + private String solutionId; + + /* + * The title. + */ + @JsonProperty(value = "title", access = JsonProperty.Access.WRITE_ONLY) + private String title; + + /* + * The HTML content that needs to be rendered and shown to customer. + */ + @JsonProperty(value = "content", access = JsonProperty.Access.WRITE_ONLY) + private String content; + + /* + * Solution replacement maps. + */ + @JsonProperty(value = "replacementMaps", access = JsonProperty.Access.WRITE_ONLY) + private ReplacementMapsSelfHelp replacementMaps; + + /* + * List of section object. + */ + @JsonProperty(value = "sections", access = JsonProperty.Access.WRITE_ONLY) + private List sections; + + /** + * Creates an instance of SolutionsResourcePropertiesSelfHelp class. + */ + public SolutionsResourcePropertiesSelfHelp() { + } + + /** + * Get the solutionId property: SolutionId is a unique id to identify a solution. You can retrieve the solution id + * using the Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * + * @return the solutionId value. + */ + public String solutionId() { + return this.solutionId; + } + + /** + * Get the title property: The title. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Get the content property: The HTML content that needs to be rendered and shown to customer. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Get the replacementMaps property: Solution replacement maps. + * + * @return the replacementMaps value. + */ + public ReplacementMapsSelfHelp replacementMaps() { + return this.replacementMaps; + } + + /** + * Get the sections property: List of section object. + * + * @return the sections value. + */ + public List sections() { + return this.sections; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (replacementMaps() != null) { + replacementMaps().validate(); + } + if (sections() != null) { + sections().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticResourceImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticResourceImpl.java index 691bb523c38f..773c359b95f8 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticResourceImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticResourceImpl.java @@ -95,14 +95,16 @@ public DiagnosticResourceImpl withExistingScope(String scope) { } public DiagnosticResource create() { - this.innerObject = serviceManager.serviceClient().getDiagnostics().create(scope, diagnosticsResourceName, - this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getDiagnostics() + .create(scope, diagnosticsResourceName, this.innerModel(), Context.NONE); return this; } public DiagnosticResource create(Context context) { - this.innerObject = serviceManager.serviceClient().getDiagnostics().create(scope, diagnosticsResourceName, - this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getDiagnostics() + .create(scope, diagnosticsResourceName, this.innerModel(), context); return this; } @@ -113,14 +115,18 @@ public DiagnosticResource create(Context context) { } public DiagnosticResource refresh() { - this.innerObject = serviceManager.serviceClient().getDiagnostics() - .getWithResponse(scope, diagnosticsResourceName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDiagnostics() + .getWithResponse(scope, diagnosticsResourceName, Context.NONE) + .getValue(); return this; } public DiagnosticResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getDiagnostics() - .getWithResponse(scope, diagnosticsResourceName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDiagnostics() + .getWithResponse(scope, diagnosticsResourceName, context) + .getValue(); return this; } diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsClientImpl.java index 248d331a3dec..0b6b73a9e702 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsClientImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsClientImpl.java @@ -86,11 +86,9 @@ Mono> get(@HostParam("$host") String endpoint, } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -126,11 +124,9 @@ private Mono>> createWithResponseAsync(String scope, S } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -166,11 +162,9 @@ private Mono>> createWithResponseAsync(String scope, S } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -192,11 +186,9 @@ private PollerFlux, DiagnosticResourceInner> } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -218,11 +210,9 @@ private PollerFlux, DiagnosticResourceInner> } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -245,11 +235,9 @@ private PollerFlux, DiagnosticResourceInner> } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -267,11 +255,9 @@ public SyncPoller, DiagnosticResourceInner> } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -291,11 +277,9 @@ public SyncPoller, DiagnosticResourceInner> } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -314,11 +298,9 @@ private Mono createAsync(String scope, String diagnosti } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -336,11 +318,9 @@ private Mono createAsync(String scope, String diagnosti } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -360,11 +340,9 @@ private Mono createAsync(String scope, String diagnosti } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -381,11 +359,9 @@ public DiagnosticResourceInner create(String scope, String diagnosticsResourceNa } /** - * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. - * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and provide - * the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note: </b> - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to - * Diagnostics API. + * Creates a diagnostic for the specific resource using solutionId from discovery solutions. <br/>Diagnostics + * are powerful solutions that access product resources or other relevant data and provide the root cause of the + * issue and the steps to address the issue.<br/><br/>. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsImpl.java index e2a9e2575bb3..d34a5c1eae36 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiagnosticsImpl.java @@ -47,13 +47,13 @@ public DiagnosticResource get(String scope, String diagnosticsResourceName) { } public DiagnosticResource getById(String id) { - String scope = Utils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", "scope"); if (scope == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String diagnosticsResourceName = Utils.getValueFromIdByParameterName(id, + String diagnosticsResourceName = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", "diagnosticsResourceName"); if (diagnosticsResourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -63,13 +63,13 @@ public DiagnosticResource getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String scope = Utils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", "scope"); if (scope == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String diagnosticsResourceName = Utils.getValueFromIdByParameterName(id, + String diagnosticsResourceName = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", "diagnosticsResourceName"); if (diagnosticsResourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoveryNlpResponseImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoveryNlpResponseImpl.java new file mode 100644 index 000000000000..2d988a6af0bd --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoveryNlpResponseImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpResponse; +import com.azure.resourcemanager.selfhelp.models.SolutionNlpMetadataResource; +import java.util.Collections; +import java.util.List; + +public final class DiscoveryNlpResponseImpl implements DiscoveryNlpResponse { + private DiscoveryNlpResponseInner innerObject; + + private final com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager; + + DiscoveryNlpResponseImpl(DiscoveryNlpResponseInner innerObject, + com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DiscoveryNlpResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.selfhelp.SelfHelpManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesClientImpl.java new file mode 100644 index 000000000000..9893fadb3ce9 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesClientImpl.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.selfhelp.fluent.DiscoverySolutionNlpSubscriptionScopesClient; +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * DiscoverySolutionNlpSubscriptionScopesClient. + */ +public final class DiscoverySolutionNlpSubscriptionScopesClientImpl + implements DiscoverySolutionNlpSubscriptionScopesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DiscoverySolutionNlpSubscriptionScopesService service; + + /** + * The service client containing this operation class. + */ + private final HelpRPImpl client; + + /** + * Initializes an instance of DiscoverySolutionNlpSubscriptionScopesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DiscoverySolutionNlpSubscriptionScopesClientImpl(HelpRPImpl client) { + this.service = RestProxy.create(DiscoverySolutionNlpSubscriptionScopesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HelpRPDiscoverySolutionNlpSubscriptionScopes to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HelpRPDiscoverySolut") + public interface DiscoverySolutionNlpSubscriptionScopesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> post(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DiscoveryNlpRequest discoverSolutionRequest, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + postWithResponseAsync(DiscoveryNlpRequest discoverSolutionRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (discoverSolutionRequest != null) { + discoverSolutionRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), discoverSolutionRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> postWithResponseAsync(DiscoveryNlpRequest discoverSolutionRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (discoverSolutionRequest != null) { + discoverSolutionRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + discoverSolutionRequest, accept, context); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono postAsync() { + final DiscoveryNlpRequest discoverSolutionRequest = null; + return postWithResponseAsync(discoverSolutionRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, + Context context) { + return postWithResponseAsync(discoverSolutionRequest, context).block(); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiscoveryNlpResponseInner post() { + final DiscoveryNlpRequest discoverSolutionRequest = null; + return postWithResponse(discoverSolutionRequest, Context.NONE).getValue(); + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesImpl.java new file mode 100644 index 000000000000..372da4e98f6a --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpSubscriptionScopesImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.selfhelp.fluent.DiscoverySolutionNlpSubscriptionScopesClient; +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpResponse; +import com.azure.resourcemanager.selfhelp.models.DiscoverySolutionNlpSubscriptionScopes; + +public final class DiscoverySolutionNlpSubscriptionScopesImpl implements DiscoverySolutionNlpSubscriptionScopes { + private static final ClientLogger LOGGER = new ClientLogger(DiscoverySolutionNlpSubscriptionScopesImpl.class); + + private final DiscoverySolutionNlpSubscriptionScopesClient innerClient; + + private final com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager; + + public DiscoverySolutionNlpSubscriptionScopesImpl(DiscoverySolutionNlpSubscriptionScopesClient innerClient, + com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, + Context context) { + Response inner + = this.serviceClient().postWithResponse(discoverSolutionRequest, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DiscoveryNlpResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiscoveryNlpResponse post() { + DiscoveryNlpResponseInner inner = this.serviceClient().post(); + if (inner != null) { + return new DiscoveryNlpResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private DiscoverySolutionNlpSubscriptionScopesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.selfhelp.SelfHelpManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesClientImpl.java new file mode 100644 index 000000000000..9af6386a8eb0 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesClientImpl.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.selfhelp.fluent.DiscoverySolutionNlpTenantScopesClient; +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DiscoverySolutionNlpTenantScopesClient. + */ +public final class DiscoverySolutionNlpTenantScopesClientImpl implements DiscoverySolutionNlpTenantScopesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DiscoverySolutionNlpTenantScopesService service; + + /** + * The service client containing this operation class. + */ + private final HelpRPImpl client; + + /** + * Initializes an instance of DiscoverySolutionNlpTenantScopesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DiscoverySolutionNlpTenantScopesClientImpl(HelpRPImpl client) { + this.service = RestProxy.create(DiscoverySolutionNlpTenantScopesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HelpRPDiscoverySolutionNlpTenantScopes to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HelpRPDiscoverySolut") + public interface DiscoverySolutionNlpTenantScopesService { + @Headers({ "Content-Type: application/json" }) + @Post("/providers/Microsoft.Help/discoverSolutions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> post(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DiscoveryNlpRequest discoverSolutionRequest, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + postWithResponseAsync(DiscoveryNlpRequest discoverSolutionRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (discoverSolutionRequest != null) { + discoverSolutionRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.post(this.client.getEndpoint(), this.client.getApiVersion(), + discoverSolutionRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> postWithResponseAsync(DiscoveryNlpRequest discoverSolutionRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (discoverSolutionRequest != null) { + discoverSolutionRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.post(this.client.getEndpoint(), this.client.getApiVersion(), discoverSolutionRequest, accept, + context); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono postAsync() { + final DiscoveryNlpRequest discoverSolutionRequest = null; + return postWithResponseAsync(discoverSolutionRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, + Context context) { + return postWithResponseAsync(discoverSolutionRequest, context).block(); + } + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiscoveryNlpResponseInner post() { + final DiscoveryNlpRequest discoverSolutionRequest = null; + return postWithResponse(discoverSolutionRequest, Context.NONE).getValue(); + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesImpl.java new file mode 100644 index 000000000000..11147f177df6 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionNlpTenantScopesImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.selfhelp.fluent.DiscoverySolutionNlpTenantScopesClient; +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpRequest; +import com.azure.resourcemanager.selfhelp.models.DiscoveryNlpResponse; +import com.azure.resourcemanager.selfhelp.models.DiscoverySolutionNlpTenantScopes; + +public final class DiscoverySolutionNlpTenantScopesImpl implements DiscoverySolutionNlpTenantScopes { + private static final ClientLogger LOGGER = new ClientLogger(DiscoverySolutionNlpTenantScopesImpl.class); + + private final DiscoverySolutionNlpTenantScopesClient innerClient; + + private final com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager; + + public DiscoverySolutionNlpTenantScopesImpl(DiscoverySolutionNlpTenantScopesClient innerClient, + com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, + Context context) { + Response inner + = this.serviceClient().postWithResponse(discoverSolutionRequest, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DiscoveryNlpResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiscoveryNlpResponse post() { + DiscoveryNlpResponseInner inner = this.serviceClient().post(); + if (inner != null) { + return new DiscoveryNlpResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private DiscoverySolutionNlpTenantScopesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.selfhelp.SelfHelpManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsClientImpl.java index 40de992fdd3a..aa5ccf60bee9 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsClientImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsClientImpl.java @@ -63,13 +63,12 @@ public final class DiscoverySolutionsClientImpl implements DiscoverySolutionsCli @ServiceInterface(name = "HelpRPDiscoverySolut") public interface DiscoverySolutionsService { @Headers({ "Content-Type: application/json" }) - @Get("/{scope}/providers/Microsoft.Help/discoverySolutions") + @Get("/providers/Microsoft.Help/discoverySolutions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list(@HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion, - @QueryParam(value = "$filter", encoded = true) String filter, @QueryParam("$skiptoken") String skiptoken, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @QueryParam(value = "$filter", encoded = true) String filter, + @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -80,7 +79,7 @@ Mono> listNext(@PathParam(value = "nextLink", encode } /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -90,8 +89,6 @@ Mono> listNext(@PathParam(value = "nextLink", encode * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. * @param filter 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional * 'ResourceType' and 'SolutionType' filters. The * [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and @@ -103,18 +100,14 @@ Mono> listNext(@PathParam(value = "nextLink", encode * @return discovery response along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String scope, String filter, - String skiptoken) { + private Mono> listSinglePageAsync(String filter, String skiptoken) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), filter, + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), filter, skiptoken, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -122,7 +115,7 @@ private Mono> listSinglePageAsync(S } /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -132,8 +125,6 @@ private Mono> listSinglePageAsync(S * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. * @param filter 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional * 'ResourceType' and 'SolutionType' filters. The * [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and @@ -146,25 +137,21 @@ private Mono> listSinglePageAsync(S * @return discovery response along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String scope, String filter, - String skiptoken, Context context) { + private Mono> listSinglePageAsync(String filter, String skiptoken, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), scope, this.client.getApiVersion(), filter, skiptoken, accept, context) + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), filter, skiptoken, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -174,8 +161,6 @@ private Mono> listSinglePageAsync(S * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. * @param filter 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional * 'ResourceType' and 'SolutionType' filters. The * [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and @@ -187,13 +172,13 @@ private Mono> listSinglePageAsync(S * @return discovery response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String scope, String filter, String skiptoken) { - return new PagedFlux<>(() -> listSinglePageAsync(scope, filter, skiptoken), + private PagedFlux listAsync(String filter, String skiptoken) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, skiptoken), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -203,23 +188,20 @@ private PagedFlux listAsync(String scope, String * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return discovery response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String scope) { + private PagedFlux listAsync() { final String filter = null; final String skiptoken = null; - return new PagedFlux<>(() -> listSinglePageAsync(scope, filter, skiptoken), + return new PagedFlux<>(() -> listSinglePageAsync(filter, skiptoken), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -229,8 +211,6 @@ private PagedFlux listAsync(String scope) { * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. * @param filter 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional * 'ResourceType' and 'SolutionType' filters. The * [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and @@ -243,14 +223,13 @@ private PagedFlux listAsync(String scope) { * @return discovery response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String scope, String filter, String skiptoken, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(scope, filter, skiptoken, context), + private PagedFlux listAsync(String filter, String skiptoken, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, skiptoken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -260,22 +239,19 @@ private PagedFlux listAsync(String scope, String * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return discovery response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String scope) { + public PagedIterable list() { final String filter = null; final String skiptoken = null; - return new PagedIterable<>(listAsync(scope, filter, skiptoken)); + return new PagedIterable<>(listAsync(filter, skiptoken)); } /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -285,8 +261,6 @@ public PagedIterable list(String scope) { * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. * @param filter 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional * 'ResourceType' and 'SolutionType' filters. The * [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and @@ -299,9 +273,8 @@ public PagedIterable list(String scope) { * @return discovery response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String scope, String filter, String skiptoken, - Context context) { - return new PagedIterable<>(listAsync(scope, filter, skiptoken, context)); + public PagedIterable list(String filter, String skiptoken, Context context) { + return new PagedIterable<>(listAsync(filter, skiptoken, context)); } /** diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsImpl.java index e4f14f750851..a964c5910191 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/DiscoverySolutionsImpl.java @@ -25,16 +25,14 @@ public DiscoverySolutionsImpl(DiscoverySolutionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String scope) { - PagedIterable inner = this.serviceClient().list(scope); - return Utils.mapPage(inner, inner1 -> new SolutionMetadataResourceImpl(inner1, this.manager())); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SolutionMetadataResourceImpl(inner1, this.manager())); } - public PagedIterable list(String scope, String filter, String skiptoken, - Context context) { - PagedIterable inner - = this.serviceClient().list(scope, filter, skiptoken, context); - return Utils.mapPage(inner, inner1 -> new SolutionMetadataResourceImpl(inner1, this.manager())); + public PagedIterable list(String filter, String skiptoken, Context context) { + PagedIterable inner = this.serviceClient().list(filter, skiptoken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SolutionMetadataResourceImpl(inner1, this.manager())); } private DiscoverySolutionsClient serviceClient() { diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPBuilder.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPBuilder.java index 21c89c33fe99..60f1f13c1256 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPBuilder.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPBuilder.java @@ -19,6 +19,22 @@ */ @ServiceClientBuilder(serviceClients = { HelpRPImpl.class }) public final class HelpRPBuilder { + /* + * The ID of the target subscription. The value must be an UUID. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. The value must be an UUID. + * + * @param subscriptionId the subscriptionId value. + * @return the HelpRPBuilder. + */ + public HelpRPBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /* * server parameter */ @@ -107,14 +123,16 @@ public HelpRPBuilder serializerAdapter(SerializerAdapter serializerAdapter) { public HelpRPImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) ? pipeline + HttpPipeline localPipeline = (pipeline != null) + ? pipeline : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); Duration localDefaultPollInterval = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); HelpRPImpl client = new HelpRPImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, - localEnvironment, localEndpoint); + localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPImpl.java index 875b90f2a76b..d11ab6a2beae 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/HelpRPImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.selfhelp.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -24,10 +25,14 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.selfhelp.fluent.CheckNameAvailabilitiesClient; import com.azure.resourcemanager.selfhelp.fluent.DiagnosticsClient; +import com.azure.resourcemanager.selfhelp.fluent.DiscoverySolutionNlpSubscriptionScopesClient; +import com.azure.resourcemanager.selfhelp.fluent.DiscoverySolutionNlpTenantScopesClient; import com.azure.resourcemanager.selfhelp.fluent.DiscoverySolutionsClient; import com.azure.resourcemanager.selfhelp.fluent.HelpRP; import com.azure.resourcemanager.selfhelp.fluent.OperationsClient; +import com.azure.resourcemanager.selfhelp.fluent.SimplifiedSolutionsClient; import com.azure.resourcemanager.selfhelp.fluent.SolutionOperationsClient; +import com.azure.resourcemanager.selfhelp.fluent.SolutionSelfHelpsClient; import com.azure.resourcemanager.selfhelp.fluent.TroubleshootersClient; import java.io.IOException; import java.lang.reflect.Type; @@ -43,6 +48,20 @@ */ @ServiceClient(builder = HelpRPBuilder.class) public final class HelpRPImpl implements HelpRP { + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * server parameter. */ @@ -183,6 +202,20 @@ public SolutionOperationsClient getSolutionOperations() { return this.solutionOperations; } + /** + * The SimplifiedSolutionsClient object to access its operations. + */ + private final SimplifiedSolutionsClient simplifiedSolutions; + + /** + * Gets the SimplifiedSolutionsClient object to access its operations. + * + * @return the SimplifiedSolutionsClient object. + */ + public SimplifiedSolutionsClient getSimplifiedSolutions() { + return this.simplifiedSolutions; + } + /** * The TroubleshootersClient object to access its operations. */ @@ -197,6 +230,48 @@ public TroubleshootersClient getTroubleshooters() { return this.troubleshooters; } + /** + * The SolutionSelfHelpsClient object to access its operations. + */ + private final SolutionSelfHelpsClient solutionSelfHelps; + + /** + * Gets the SolutionSelfHelpsClient object to access its operations. + * + * @return the SolutionSelfHelpsClient object. + */ + public SolutionSelfHelpsClient getSolutionSelfHelps() { + return this.solutionSelfHelps; + } + + /** + * The DiscoverySolutionNlpTenantScopesClient object to access its operations. + */ + private final DiscoverySolutionNlpTenantScopesClient discoverySolutionNlpTenantScopes; + + /** + * Gets the DiscoverySolutionNlpTenantScopesClient object to access its operations. + * + * @return the DiscoverySolutionNlpTenantScopesClient object. + */ + public DiscoverySolutionNlpTenantScopesClient getDiscoverySolutionNlpTenantScopes() { + return this.discoverySolutionNlpTenantScopes; + } + + /** + * The DiscoverySolutionNlpSubscriptionScopesClient object to access its operations. + */ + private final DiscoverySolutionNlpSubscriptionScopesClient discoverySolutionNlpSubscriptionScopes; + + /** + * Gets the DiscoverySolutionNlpSubscriptionScopesClient object to access its operations. + * + * @return the DiscoverySolutionNlpSubscriptionScopesClient object. + */ + public DiscoverySolutionNlpSubscriptionScopesClient getDiscoverySolutionNlpSubscriptionScopes() { + return this.discoverySolutionNlpSubscriptionScopes; + } + /** * Initializes an instance of HelpRP client. * @@ -204,21 +279,27 @@ public TroubleshootersClient getTroubleshooters() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ HelpRPImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, - AzureEnvironment environment, String endpoint) { + AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-09-01-preview"; + this.apiVersion = "2024-03-01-preview"; this.operations = new OperationsClientImpl(this); this.checkNameAvailabilities = new CheckNameAvailabilitiesClientImpl(this); this.diagnostics = new DiagnosticsClientImpl(this); this.discoverySolutions = new DiscoverySolutionsClientImpl(this); this.solutionOperations = new SolutionOperationsClientImpl(this); + this.simplifiedSolutions = new SimplifiedSolutionsClientImpl(this); this.troubleshooters = new TroubleshootersClientImpl(this); + this.solutionSelfHelps = new SolutionSelfHelpsClientImpl(this); + this.discoverySolutionNlpTenantScopes = new DiscoverySolutionNlpTenantScopesClientImpl(this); + this.discoverySolutionNlpSubscriptionScopes = new DiscoverySolutionNlpSubscriptionScopesClientImpl(this); } /** @@ -281,8 +362,8 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, - SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -323,7 +404,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/OperationsImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/OperationsImpl.java index 7ff8b486f21a..faeaf3f6148b 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/OperationsImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/OperationsImpl.java @@ -27,12 +27,12 @@ public OperationsImpl(OperationsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/Utils.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/ResourceManagerUtils.java similarity index 99% rename from sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/Utils.java rename to sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/ResourceManagerUtils.java index a9fb003b7141..778a2f549ba2 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/Utils.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { @@ -41,7 +41,6 @@ static String getValueFromIdByName(String id, String name) { } } return null; - } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -75,7 +74,6 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; - } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsClientImpl.java new file mode 100644 index 000000000000..a4e8f85e227c --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsClientImpl.java @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.selfhelp.fluent.SimplifiedSolutionsClient; +import com.azure.resourcemanager.selfhelp.fluent.models.SimplifiedSolutionsResourceInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SimplifiedSolutionsClient. + */ +public final class SimplifiedSolutionsClientImpl implements SimplifiedSolutionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SimplifiedSolutionsService service; + + /** + * The service client containing this operation class. + */ + private final HelpRPImpl client; + + /** + * Initializes an instance of SimplifiedSolutionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SimplifiedSolutionsClientImpl(HelpRPImpl client) { + this.service = RestProxy.create(SimplifiedSolutionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HelpRPSimplifiedSolutions to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HelpRPSimplifiedSolu") + public interface SimplifiedSolutionsService { + @Headers({ "Content-Type: application/json" }) + @Put("/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("simplifiedSolutionsResourceName") String simplifiedSolutionsResourceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("simplifiedSolutionsResourceName") String simplifiedSolutionsResourceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String scope, + String simplifiedSolutionsResourceName, SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (simplifiedSolutionsResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter simplifiedSolutionsResourceName is required and cannot be null.")); + } + if (simplifiedSolutionsRequestBody != null) { + simplifiedSolutionsRequestBody.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), scope, simplifiedSolutionsResourceName, + this.client.getApiVersion(), simplifiedSolutionsRequestBody, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String scope, + String simplifiedSolutionsResourceName, SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (simplifiedSolutionsResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter simplifiedSolutionsResourceName is required and cannot be null.")); + } + if (simplifiedSolutionsRequestBody != null) { + simplifiedSolutionsRequestBody.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), scope, simplifiedSolutionsResourceName, + this.client.getApiVersion(), simplifiedSolutionsRequestBody, accept, context); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimplifiedSolutionsResourceInner> beginCreateAsync( + String scope, String simplifiedSolutionsResourceName, + SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody) { + Mono>> mono + = createWithResponseAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SimplifiedSolutionsResourceInner.class, + SimplifiedSolutionsResourceInner.class, this.client.getContext()); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimplifiedSolutionsResourceInner> + beginCreateAsync(String scope, String simplifiedSolutionsResourceName) { + final SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody = null; + Mono>> mono + = createWithResponseAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SimplifiedSolutionsResourceInner.class, + SimplifiedSolutionsResourceInner.class, this.client.getContext()); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SimplifiedSolutionsResourceInner> beginCreateAsync( + String scope, String simplifiedSolutionsResourceName, + SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SimplifiedSolutionsResourceInner.class, + SimplifiedSolutionsResourceInner.class, context); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimplifiedSolutionsResourceInner> + beginCreate(String scope, String simplifiedSolutionsResourceName) { + final SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody = null; + return this.beginCreateAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody) + .getSyncPoller(); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SimplifiedSolutionsResourceInner> beginCreate( + String scope, String simplifiedSolutionsResourceName, + SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, Context context) { + return this.beginCreateAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody, context) + .getSyncPoller(); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String scope, String simplifiedSolutionsResourceName, + SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody) { + return beginCreateAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String scope, String simplifiedSolutionsResourceName) { + final SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody = null; + return beginCreateAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String scope, String simplifiedSolutionsResourceName, + SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, Context context) { + return beginCreateAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimplifiedSolutionsResourceInner create(String scope, String simplifiedSolutionsResourceName) { + final SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody = null; + return createAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody).block(); + } + + /** + * Creates Simplified Solutions for an Azure subscription using 'solutionId' from Discovery Solutions as the input. + * <br/><br/> Simplified Solutions API makes the consumption of solutions APIs easier while still + * providing access to the same powerful solutions rendered in Solutions API. With Simplified Solutions, users don't + * have to worry about stitching together the article using replacement maps and can use the content in the API + * response to directly render as HTML content.<br/>. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param simplifiedSolutionsRequestBody The required request body for simplified Solutions resource creation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return simplified Solutions response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimplifiedSolutionsResourceInner create(String scope, String simplifiedSolutionsResourceName, + SimplifiedSolutionsResourceInner simplifiedSolutionsRequestBody, Context context) { + return createAsync(scope, simplifiedSolutionsResourceName, simplifiedSolutionsRequestBody, context).block(); + } + + /** + * Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the simplified Solutions using the applicable solutionResourceName while creating the simplified + * Solutions along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String scope, + String simplifiedSolutionsResourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (simplifiedSolutionsResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter simplifiedSolutionsResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), scope, simplifiedSolutionsResourceName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the simplified Solutions using the applicable solutionResourceName while creating the simplified + * Solutions along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String scope, + String simplifiedSolutionsResourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (simplifiedSolutionsResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter simplifiedSolutionsResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), scope, simplifiedSolutionsResourceName, + this.client.getApiVersion(), accept, context); + } + + /** + * Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the simplified Solutions using the applicable solutionResourceName while creating the simplified + * Solutions on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String scope, String simplifiedSolutionsResourceName) { + return getWithResponseAsync(scope, simplifiedSolutionsResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the simplified Solutions using the applicable solutionResourceName while creating the simplified + * Solutions along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String scope, + String simplifiedSolutionsResourceName, Context context) { + return getWithResponseAsync(scope, simplifiedSolutionsResourceName, context).block(); + } + + /** + * Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param simplifiedSolutionsResourceName Simplified Solutions Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the simplified Solutions using the applicable solutionResourceName while creating the simplified + * Solutions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SimplifiedSolutionsResourceInner get(String scope, String simplifiedSolutionsResourceName) { + return getWithResponse(scope, simplifiedSolutionsResourceName, Context.NONE).getValue(); + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsImpl.java new file mode 100644 index 000000000000..0fdf9fb22315 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsImpl.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.selfhelp.fluent.SimplifiedSolutionsClient; +import com.azure.resourcemanager.selfhelp.fluent.models.SimplifiedSolutionsResourceInner; +import com.azure.resourcemanager.selfhelp.models.SimplifiedSolutions; +import com.azure.resourcemanager.selfhelp.models.SimplifiedSolutionsResource; + +public final class SimplifiedSolutionsImpl implements SimplifiedSolutions { + private static final ClientLogger LOGGER = new ClientLogger(SimplifiedSolutionsImpl.class); + + private final SimplifiedSolutionsClient innerClient; + + private final com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager; + + public SimplifiedSolutionsImpl(SimplifiedSolutionsClient innerClient, + com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String scope, String simplifiedSolutionsResourceName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(scope, simplifiedSolutionsResourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SimplifiedSolutionsResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SimplifiedSolutionsResource get(String scope, String simplifiedSolutionsResourceName) { + SimplifiedSolutionsResourceInner inner = this.serviceClient().get(scope, simplifiedSolutionsResourceName); + if (inner != null) { + return new SimplifiedSolutionsResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public SimplifiedSolutionsResource getById(String id) { + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", "scope"); + if (scope == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + } + String simplifiedSolutionsResourceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", + "simplifiedSolutionsResourceName"); + if (simplifiedSolutionsResourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simplifiedSolutions'.", id))); + } + return this.getWithResponse(scope, simplifiedSolutionsResourceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", "scope"); + if (scope == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); + } + String simplifiedSolutionsResourceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", + "simplifiedSolutionsResourceName"); + if (simplifiedSolutionsResourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'simplifiedSolutions'.", id))); + } + return this.getWithResponse(scope, simplifiedSolutionsResourceName, context); + } + + private SimplifiedSolutionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.selfhelp.SelfHelpManager manager() { + return this.serviceManager; + } + + public SimplifiedSolutionsResourceImpl define(String name) { + return new SimplifiedSolutionsResourceImpl(name, this.manager()); + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsResourceImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsResourceImpl.java new file mode 100644 index 000000000000..dabe22dbc401 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SimplifiedSolutionsResourceImpl.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.selfhelp.fluent.models.SimplifiedSolutionsResourceInner; +import com.azure.resourcemanager.selfhelp.models.SimplifiedSolutionsResource; +import com.azure.resourcemanager.selfhelp.models.SolutionProvisioningState; +import java.util.Collections; +import java.util.Map; + +public final class SimplifiedSolutionsResourceImpl + implements SimplifiedSolutionsResource, SimplifiedSolutionsResource.Definition { + private SimplifiedSolutionsResourceInner innerObject; + + private final com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager; + + SimplifiedSolutionsResourceImpl(SimplifiedSolutionsResourceInner innerObject, + com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String solutionId() { + return this.innerModel().solutionId(); + } + + public Map parameters() { + Map inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String title() { + return this.innerModel().title(); + } + + public Map appendix() { + Map inner = this.innerModel().appendix(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String content() { + return this.innerModel().content(); + } + + public SolutionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public SimplifiedSolutionsResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.selfhelp.SelfHelpManager manager() { + return this.serviceManager; + } + + private String scope; + + private String simplifiedSolutionsResourceName; + + public SimplifiedSolutionsResourceImpl withExistingScope(String scope) { + this.scope = scope; + return this; + } + + public SimplifiedSolutionsResource create() { + this.innerObject = serviceManager.serviceClient() + .getSimplifiedSolutions() + .create(scope, simplifiedSolutionsResourceName, this.innerModel(), Context.NONE); + return this; + } + + public SimplifiedSolutionsResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimplifiedSolutions() + .create(scope, simplifiedSolutionsResourceName, this.innerModel(), context); + return this; + } + + SimplifiedSolutionsResourceImpl(String name, com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerObject = new SimplifiedSolutionsResourceInner(); + this.serviceManager = serviceManager; + this.simplifiedSolutionsResourceName = name; + } + + public SimplifiedSolutionsResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getSimplifiedSolutions() + .getWithResponse(scope, simplifiedSolutionsResourceName, Context.NONE) + .getValue(); + return this; + } + + public SimplifiedSolutionsResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSimplifiedSolutions() + .getWithResponse(scope, simplifiedSolutionsResourceName, context) + .getValue(); + return this; + } + + public SimplifiedSolutionsResourceImpl withSolutionId(String solutionId) { + this.innerModel().withSolutionId(solutionId); + return this; + } + + public SimplifiedSolutionsResourceImpl withParameters(Map parameters) { + this.innerModel().withParameters(parameters); + return this; + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsClientImpl.java index 78eab125be27..a2a1f1a238b2 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsClientImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -30,6 +31,7 @@ import com.azure.resourcemanager.selfhelp.fluent.SolutionOperationsClient; import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceInner; import com.azure.resourcemanager.selfhelp.models.SolutionPatchRequestBody; +import com.azure.resourcemanager.selfhelp.models.SolutionWarmUpRequestBody; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -96,23 +98,28 @@ Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SolutionPatchRequestBody solutionPatchRequestBody, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> warmUp(@HostParam("$host") String endpoint, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("solutionResourceName") String solutionResourceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SolutionWarmUpRequestBody solutionWarmUpRequestBody, + @HeaderParam("Accept") String accept, Context context); } /** * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -151,17 +158,11 @@ private Mono>> createWithResponseAsync(String scope, S * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -200,17 +201,11 @@ private Mono>> createWithResponseAsync(String scope, S * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -235,17 +230,11 @@ private PollerFlux, SolutionResourceInner> beg * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -270,17 +259,11 @@ private PollerFlux, SolutionResourceInner> beg * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -306,17 +289,11 @@ private PollerFlux, SolutionResourceInner> beg * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -337,17 +314,11 @@ public SyncPoller, SolutionResourceInner> begi * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -369,17 +340,11 @@ public SyncPoller, SolutionResourceInner> begi * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -401,17 +366,11 @@ private Mono createAsync(String scope, String solutionRes * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -432,17 +391,11 @@ private Mono createAsync(String scope, String solutionRes * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -465,17 +418,11 @@ private Mono createAsync(String scope, String solutionRes * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -495,17 +442,11 @@ public SolutionResourceInner create(String scope, String solutionResourceName) { * Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and * requiredInputs’ from discovery solutions. <br/> Azure solutions comprise a comprehensive library of * self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical - * troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided - * troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative - * diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components - * are seamlessly converged into unified solutions tailored to address a specific support problem area. Each - * solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution - * component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail - * execution, and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. - * ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of - * Solutions API. <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ - * additionalParameters’ in the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions - * response is the same as ‘properties.parameters’ in the request for Troubleshooters. + * troubleshooting issues. These solutions encompass: <br/> (1.) Dynamic and context-aware diagnostics, guided + * troubleshooting wizards, and data visualizations. <br/> (2.) Rich instructional video tutorials and + * illustrative diagrams and images. <br/> (3.) Thoughtfully assembled textual troubleshooting instructions. + * <br/> All these components are seamlessly converged into unified solutions tailored to address a specific + * support problem area. * * @param scope scope = resourceUri of affected resource.<br/> For example: * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. @@ -907,4 +848,129 @@ public SolutionResourceInner update(String scope, String solutionResourceName, SolutionPatchRequestBody solutionPatchRequestBody, Context context) { return updateAsync(scope, solutionResourceName, solutionPatchRequestBody, context).block(); } + + /** + * Warm up the solution resource by preloading asynchronous diagnostics results into cache. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param solutionResourceName Solution resource Name. + * @param solutionWarmUpRequestBody The required request body for warming up a solution resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> warmUpWithResponseAsync(String scope, String solutionResourceName, + SolutionWarmUpRequestBody solutionWarmUpRequestBody) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (solutionResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter solutionResourceName is required and cannot be null.")); + } + if (solutionWarmUpRequestBody != null) { + solutionWarmUpRequestBody.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.warmUp(this.client.getEndpoint(), scope, solutionResourceName, + this.client.getApiVersion(), solutionWarmUpRequestBody, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Warm up the solution resource by preloading asynchronous diagnostics results into cache. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param solutionResourceName Solution resource Name. + * @param solutionWarmUpRequestBody The required request body for warming up a solution resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> warmUpWithResponseAsync(String scope, String solutionResourceName, + SolutionWarmUpRequestBody solutionWarmUpRequestBody, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (solutionResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter solutionResourceName is required and cannot be null.")); + } + if (solutionWarmUpRequestBody != null) { + solutionWarmUpRequestBody.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.warmUp(this.client.getEndpoint(), scope, solutionResourceName, this.client.getApiVersion(), + solutionWarmUpRequestBody, accept, context); + } + + /** + * Warm up the solution resource by preloading asynchronous diagnostics results into cache. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param solutionResourceName Solution resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono warmUpAsync(String scope, String solutionResourceName) { + final SolutionWarmUpRequestBody solutionWarmUpRequestBody = null; + return warmUpWithResponseAsync(scope, solutionResourceName, solutionWarmUpRequestBody) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Warm up the solution resource by preloading asynchronous diagnostics results into cache. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param solutionResourceName Solution resource Name. + * @param solutionWarmUpRequestBody The required request body for warming up a solution resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response warmUpWithResponse(String scope, String solutionResourceName, + SolutionWarmUpRequestBody solutionWarmUpRequestBody, Context context) { + return warmUpWithResponseAsync(scope, solutionResourceName, solutionWarmUpRequestBody, context).block(); + } + + /** + * Warm up the solution resource by preloading asynchronous diagnostics results into cache. + * + * @param scope scope = resourceUri of affected resource.<br/> For example: + * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. + * @param solutionResourceName Solution resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void warmUp(String scope, String solutionResourceName) { + final SolutionWarmUpRequestBody solutionWarmUpRequestBody = null; + warmUpWithResponse(scope, solutionResourceName, solutionWarmUpRequestBody, Context.NONE); + } } diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsImpl.java index eb93e3418e07..6928d3b32784 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionOperationsImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceInner; import com.azure.resourcemanager.selfhelp.models.SolutionOperations; import com.azure.resourcemanager.selfhelp.models.SolutionResource; +import com.azure.resourcemanager.selfhelp.models.SolutionWarmUpRequestBody; public final class SolutionOperationsImpl implements SolutionOperations { private static final ClientLogger LOGGER = new ClientLogger(SolutionOperationsImpl.class); @@ -46,14 +47,23 @@ public SolutionResource get(String scope, String solutionResourceName) { } } + public Response warmUpWithResponse(String scope, String solutionResourceName, + SolutionWarmUpRequestBody solutionWarmUpRequestBody, Context context) { + return this.serviceClient().warmUpWithResponse(scope, solutionResourceName, solutionWarmUpRequestBody, context); + } + + public void warmUp(String scope, String solutionResourceName) { + this.serviceClient().warmUp(scope, solutionResourceName); + } + public SolutionResource getById(String id) { - String scope = Utils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", "scope"); if (scope == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String solutionResourceName = Utils.getValueFromIdByParameterName(id, + String solutionResourceName = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", "solutionResourceName"); if (solutionResourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -63,13 +73,13 @@ public SolutionResource getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String scope = Utils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", "scope"); if (scope == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String solutionResourceName = Utils.getValueFromIdByParameterName(id, + String solutionResourceName = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", "solutionResourceName"); if (solutionResourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceImpl.java index 8823575c7c22..4d9bec2b52f0 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.selfhelp.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceInner; @@ -12,6 +13,7 @@ import com.azure.resourcemanager.selfhelp.models.SolutionPatchRequestBody; import com.azure.resourcemanager.selfhelp.models.SolutionProvisioningState; import com.azure.resourcemanager.selfhelp.models.SolutionResource; +import com.azure.resourcemanager.selfhelp.models.SolutionWarmUpRequestBody; import com.azure.resourcemanager.selfhelp.models.TriggerCriterion; import java.util.Collections; import java.util.List; @@ -106,14 +108,16 @@ public SolutionResourceImpl withExistingScope(String scope) { } public SolutionResource create() { - this.innerObject = serviceManager.serviceClient().getSolutionOperations().create(scope, solutionResourceName, - this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getSolutionOperations() + .create(scope, solutionResourceName, this.innerModel(), Context.NONE); return this; } public SolutionResource create(Context context) { - this.innerObject = serviceManager.serviceClient().getSolutionOperations().create(scope, solutionResourceName, - this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getSolutionOperations() + .create(scope, solutionResourceName, this.innerModel(), context); return this; } @@ -129,14 +133,16 @@ public SolutionResourceImpl update() { } public SolutionResource apply() { - this.innerObject = serviceManager.serviceClient().getSolutionOperations().update(scope, solutionResourceName, - updateSolutionPatchRequestBody, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getSolutionOperations() + .update(scope, solutionResourceName, updateSolutionPatchRequestBody, Context.NONE); return this; } public SolutionResource apply(Context context) { - this.innerObject = serviceManager.serviceClient().getSolutionOperations().update(scope, solutionResourceName, - updateSolutionPatchRequestBody, context); + this.innerObject = serviceManager.serviceClient() + .getSolutionOperations() + .update(scope, solutionResourceName, updateSolutionPatchRequestBody, context); return this; } @@ -144,24 +150,37 @@ public SolutionResource apply(Context context) { com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.scope = Utils.getValueFromIdByParameterName(innerObject.id(), + this.scope = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", "scope"); - this.solutionResourceName = Utils.getValueFromIdByParameterName(innerObject.id(), + this.solutionResourceName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", "solutionResourceName"); } public SolutionResource refresh() { - this.innerObject = serviceManager.serviceClient().getSolutionOperations() - .getWithResponse(scope, solutionResourceName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getSolutionOperations() + .getWithResponse(scope, solutionResourceName, Context.NONE) + .getValue(); return this; } public SolutionResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getSolutionOperations() - .getWithResponse(scope, solutionResourceName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getSolutionOperations() + .getWithResponse(scope, solutionResourceName, context) + .getValue(); return this; } + public Response warmUpWithResponse(SolutionWarmUpRequestBody solutionWarmUpRequestBody, Context context) { + return serviceManager.solutionOperations() + .warmUpWithResponse(scope, solutionResourceName, solutionWarmUpRequestBody, context); + } + + public void warmUp() { + serviceManager.solutionOperations().warmUp(scope, solutionResourceName); + } + public SolutionResourceImpl withTriggerCriteria(List triggerCriteria) { if (isInCreateMode()) { this.innerModel().withTriggerCriteria(triggerCriteria); diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceSelfHelpImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceSelfHelpImpl.java new file mode 100644 index 000000000000..db74b62f01f5 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionResourceSelfHelpImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceSelfHelpInner; +import com.azure.resourcemanager.selfhelp.models.ReplacementMapsSelfHelp; +import com.azure.resourcemanager.selfhelp.models.SectionSelfHelp; +import com.azure.resourcemanager.selfhelp.models.SolutionResourceSelfHelp; +import java.util.Collections; +import java.util.List; + +public final class SolutionResourceSelfHelpImpl implements SolutionResourceSelfHelp { + private SolutionResourceSelfHelpInner innerObject; + + private final com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager; + + SolutionResourceSelfHelpImpl(SolutionResourceSelfHelpInner innerObject, + com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String solutionId() { + return this.innerModel().solutionId(); + } + + public String title() { + return this.innerModel().title(); + } + + public String content() { + return this.innerModel().content(); + } + + public ReplacementMapsSelfHelp replacementMaps() { + return this.innerModel().replacementMaps(); + } + + public List sections() { + List inner = this.innerModel().sections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SolutionResourceSelfHelpInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.selfhelp.SelfHelpManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsClientImpl.java new file mode 100644 index 000000000000..0b4e5f6e9ea1 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsClientImpl.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.selfhelp.fluent.SolutionSelfHelpsClient; +import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceSelfHelpInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SolutionSelfHelpsClient. + */ +public final class SolutionSelfHelpsClientImpl implements SolutionSelfHelpsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SolutionSelfHelpsService service; + + /** + * The service client containing this operation class. + */ + private final HelpRPImpl client; + + /** + * Initializes an instance of SolutionSelfHelpsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SolutionSelfHelpsClientImpl(HelpRPImpl client) { + this.service + = RestProxy.create(SolutionSelfHelpsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HelpRPSolutionSelfHelps to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HelpRPSolutionSelfHe") + public interface SolutionSelfHelpsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Help/selfHelp/{solutionId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("solutionId") String solutionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video + * tutorials, links and guides to public documentation related to a specific problem that enables users to + * troubleshoot Azure issues. + * + * @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + * Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return self Help Solutions for a given solutionId along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String solutionId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (solutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter solutionId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.get(this.client.getEndpoint(), solutionId, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video + * tutorials, links and guides to public documentation related to a specific problem that enables users to + * troubleshoot Azure issues. + * + * @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + * Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return self Help Solutions for a given solutionId along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String solutionId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (solutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter solutionId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), solutionId, this.client.getApiVersion(), accept, context); + } + + /** + * Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video + * tutorials, links and guides to public documentation related to a specific problem that enables users to + * troubleshoot Azure issues. + * + * @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + * Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return self Help Solutions for a given solutionId on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String solutionId) { + return getWithResponseAsync(solutionId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video + * tutorials, links and guides to public documentation related to a specific problem that enables users to + * troubleshoot Azure issues. + * + * @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + * Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return self Help Solutions for a given solutionId along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String solutionId, Context context) { + return getWithResponseAsync(solutionId, context).block(); + } + + /** + * Gets Self Help Solutions for a given solutionId. Self Help Solutions consist of rich instructional video + * tutorials, links and guides to public documentation related to a specific problem that enables users to + * troubleshoot Azure issues. + * + * @param solutionId SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + * Discovery api - + * https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return self Help Solutions for a given solutionId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SolutionResourceSelfHelpInner get(String solutionId) { + return getWithResponse(solutionId, Context.NONE).getValue(); + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsImpl.java new file mode 100644 index 000000000000..91ceea8b37d2 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/SolutionSelfHelpsImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.selfhelp.fluent.SolutionSelfHelpsClient; +import com.azure.resourcemanager.selfhelp.fluent.models.SolutionResourceSelfHelpInner; +import com.azure.resourcemanager.selfhelp.models.SolutionResourceSelfHelp; +import com.azure.resourcemanager.selfhelp.models.SolutionSelfHelps; + +public final class SolutionSelfHelpsImpl implements SolutionSelfHelps { + private static final ClientLogger LOGGER = new ClientLogger(SolutionSelfHelpsImpl.class); + + private final SolutionSelfHelpsClient innerClient; + + private final com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager; + + public SolutionSelfHelpsImpl(SolutionSelfHelpsClient innerClient, + com.azure.resourcemanager.selfhelp.SelfHelpManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String solutionId, Context context) { + Response inner = this.serviceClient().getWithResponse(solutionId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SolutionResourceSelfHelpImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SolutionResourceSelfHelp get(String solutionId) { + SolutionResourceSelfHelpInner inner = this.serviceClient().get(solutionId); + if (inner != null) { + return new SolutionResourceSelfHelpImpl(inner, this.manager()); + } else { + return null; + } + } + + private SolutionSelfHelpsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.selfhelp.SelfHelpManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshooterResourceImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshooterResourceImpl.java index c1809fb725e7..e4ce3136b08f 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshooterResourceImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshooterResourceImpl.java @@ -90,14 +90,18 @@ public TroubleshooterResourceImpl withExistingScope(String scope) { } public TroubleshooterResource create() { - this.innerObject = serviceManager.serviceClient().getTroubleshooters() - .createWithResponse(scope, troubleshooterName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getTroubleshooters() + .createWithResponse(scope, troubleshooterName, this.innerModel(), Context.NONE) + .getValue(); return this; } public TroubleshooterResource create(Context context) { - this.innerObject = serviceManager.serviceClient().getTroubleshooters() - .createWithResponse(scope, troubleshooterName, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getTroubleshooters() + .createWithResponse(scope, troubleshooterName, this.innerModel(), context) + .getValue(); return this; } @@ -108,21 +112,25 @@ public TroubleshooterResource create(Context context) { } public TroubleshooterResource refresh() { - this.innerObject = serviceManager.serviceClient().getTroubleshooters() - .getWithResponse(scope, troubleshooterName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getTroubleshooters() + .getWithResponse(scope, troubleshooterName, Context.NONE) + .getValue(); return this; } public TroubleshooterResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getTroubleshooters() - .getWithResponse(scope, troubleshooterName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getTroubleshooters() + .getWithResponse(scope, troubleshooterName, context) + .getValue(); return this; } public TroubleshootersContinueMethodResponse continueMethodWithResponse(ContinueRequestBody continueRequestBody, Context context) { - return serviceManager.troubleshooters().continueMethodWithResponse(scope, troubleshooterName, - continueRequestBody, context); + return serviceManager.troubleshooters() + .continueMethodWithResponse(scope, troubleshooterName, continueRequestBody, context); } public void continueMethod() { diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersClientImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersClientImpl.java index a06bba89be18..3b380193865f 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersClientImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersClientImpl.java @@ -59,8 +59,8 @@ public final class TroubleshootersClientImpl implements TroubleshootersClient { } /** - * The interface defining all the services for HelpRPTroubleshooters to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for HelpRPTroubleshooters to be used by the proxy service to perform REST + * calls. */ @Host("{$host}") @ServiceInterface(name = "HelpRPTroubleshooter") diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersImpl.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersImpl.java index f1959607e621..c257b75d0af6 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersImpl.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/implementation/TroubleshootersImpl.java @@ -91,13 +91,13 @@ public RestartTroubleshooterResponse restart(String scope, String troubleshooter } public TroubleshooterResource getById(String id) { - String scope = Utils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", "scope"); if (scope == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String troubleshooterName = Utils.getValueFromIdByParameterName(id, + String troubleshooterName = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", "troubleshooterName"); if (troubleshooterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -107,13 +107,13 @@ public TroubleshooterResource getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String scope = Utils.getValueFromIdByParameterName(id, + String scope = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", "scope"); if (scope == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id))); } - String troubleshooterName = Utils.getValueFromIdByParameterName(id, + String troubleshooterName = ResourceManagerUtils.getValueFromIdByParameterName(id, "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", "troubleshooterName"); if (troubleshooterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/AutomatedCheckResult.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/AutomatedCheckResult.java index f518a8def327..43e41cea5f11 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/AutomatedCheckResult.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/AutomatedCheckResult.java @@ -12,6 +12,18 @@ */ @Fluent public final class AutomatedCheckResult { + /* + * Version for automated check result + */ + @JsonProperty(value = "version") + private String version; + + /* + * Status for automated check result + */ + @JsonProperty(value = "status") + private String status; + /* * Insight Article Content */ @@ -30,6 +42,46 @@ public final class AutomatedCheckResult { public AutomatedCheckResult() { } + /** + * Get the version property: Version for automated check result. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version for automated check result. + * + * @param version the version value to set. + * @return the AutomatedCheckResult object itself. + */ + public AutomatedCheckResult withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the status property: Status for automated check result. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Status for automated check result. + * + * @param status the status value to set. + * @return the AutomatedCheckResult object itself. + */ + public AutomatedCheckResult withStatus(String status) { + this.status = status; + return this; + } + /** * Get the result property: Insight Article Content. * diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ClassificationService.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ClassificationService.java new file mode 100644 index 000000000000..c3205c501e4a --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ClassificationService.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Service Classification result object. + */ +@Fluent +public final class ClassificationService { + /* + * Azure resource Id of the service. + */ + @JsonProperty(value = "serviceId", access = JsonProperty.Access.WRITE_ONLY) + private String serviceId; + + /* + * Localized name of the azure service. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * List of applicable ARM resource types for this service. + */ + @JsonProperty(value = "resourceTypes") + private List resourceTypes; + + /** + * Creates an instance of ClassificationService class. + */ + public ClassificationService() { + } + + /** + * Get the serviceId property: Azure resource Id of the service. + * + * @return the serviceId value. + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Get the displayName property: Localized name of the azure service. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the resourceTypes property: List of applicable ARM resource types for this service. + * + * @return the resourceTypes value. + */ + public List resourceTypes() { + return this.resourceTypes; + } + + /** + * Set the resourceTypes property: List of applicable ARM resource types for this service. + * + * @param resourceTypes the resourceTypes value to set. + * @return the ClassificationService object itself. + */ + public ClassificationService withResourceTypes(List resourceTypes) { + this.resourceTypes = resourceTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpRequest.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpRequest.java new file mode 100644 index 000000000000..d4eed836577a --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpRequest.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Discover NLP request. + */ +@Fluent +public final class DiscoveryNlpRequest { + /* + * Natural language description of the issue. + */ + @JsonProperty(value = "issueSummary", required = true) + private String issueSummary; + + /* + * ARM resource Id of the resource that is having the issue. Only applicable for Discovery Solution NLP Subscription Scope. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * 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. + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /* + * Additional information in the form of a string. + */ + @JsonProperty(value = "additionalContext") + private String additionalContext; + + /** + * Creates an instance of DiscoveryNlpRequest class. + */ + public DiscoveryNlpRequest() { + } + + /** + * Get the issueSummary property: Natural language description of the issue. + * + * @return the issueSummary value. + */ + public String issueSummary() { + return this.issueSummary; + } + + /** + * Set the issueSummary property: Natural language description of the issue. + * + * @param issueSummary the issueSummary value to set. + * @return the DiscoveryNlpRequest object itself. + */ + public DiscoveryNlpRequest withIssueSummary(String issueSummary) { + this.issueSummary = issueSummary; + return this; + } + + /** + * Get the resourceId property: ARM resource Id of the resource that is having the issue. Only applicable for + * Discovery Solution NLP Subscription Scope. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: ARM resource Id of the resource that is having the issue. Only applicable for + * Discovery Solution NLP Subscription Scope. + * + * @param resourceId the resourceId value to set. + * @return the DiscoveryNlpRequest object itself. + */ + public DiscoveryNlpRequest withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the serviceId property: 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. + * + * @return the serviceId value. + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the serviceId property: 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. + * + * @param serviceId the serviceId value to set. + * @return the DiscoveryNlpRequest object itself. + */ + public DiscoveryNlpRequest withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the additionalContext property: Additional information in the form of a string. + * + * @return the additionalContext value. + */ + public String additionalContext() { + return this.additionalContext; + } + + /** + * Set the additionalContext property: Additional information in the form of a string. + * + * @param additionalContext the additionalContext value to set. + * @return the DiscoveryNlpRequest object itself. + */ + public DiscoveryNlpRequest withAdditionalContext(String additionalContext) { + this.additionalContext = additionalContext; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (issueSummary() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property issueSummary in model DiscoveryNlpRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiscoveryNlpRequest.class); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpResponse.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpResponse.java new file mode 100644 index 000000000000..982b0ea0f5f4 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoveryNlpResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.models; + +import com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of DiscoveryNlpResponse. + */ +public interface DiscoveryNlpResponse { + /** + * Gets the value property: The list of solution metadata. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.selfhelp.fluent.models.DiscoveryNlpResponseInner object. + * + * @return the inner object. + */ + DiscoveryNlpResponseInner innerModel(); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpSubscriptionScopes.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpSubscriptionScopes.java new file mode 100644 index 000000000000..a35abd8f1856 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpSubscriptionScopes.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DiscoverySolutionNlpSubscriptionScopes. + */ +public interface DiscoverySolutionNlpSubscriptionScopes { + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response}. + */ + Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, Context context); + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary and + * subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata. + */ + DiscoveryNlpResponse post(); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpTenantScopes.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpTenantScopes.java new file mode 100644 index 000000000000..dea6d32775b9 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutionNlpTenantScopes.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DiscoverySolutionNlpTenantScopes. + */ +public interface DiscoverySolutionNlpTenantScopes { + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @param discoverSolutionRequest Request body for discovering solutions using NLP. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata along with {@link Response}. + */ + Response postWithResponse(DiscoveryNlpRequest discoverSolutionRequest, Context context); + + /** + * Search for relevant Azure Diagnostics, Solutions and Troubleshooters using a natural language issue summary. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return successfully fetched list of solution metadata. + */ + DiscoveryNlpResponse post(); +} diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutions.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutions.java index 1f202af7ac44..bf2f8bae7056 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutions.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/DiscoverySolutions.java @@ -12,7 +12,7 @@ */ public interface DiscoverySolutions { /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -22,17 +22,14 @@ public interface DiscoverySolutions { * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return discovery response as paginated response with {@link PagedIterable}. */ - PagedIterable list(String scope); + PagedIterable list(); /** - * Lists the relevant Azure diagnostics and solutions using [problemClassification + * Lists the relevant Azure Diagnostics, Solutions and Troubleshooters using [problemClassification * API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or * resourceType.<br/> Discovery Solutions is the initial entry point within Help API, which identifies * relevant Azure diagnostics and solutions. <br/><br/> Required Input : problemClassificationId (Use @@ -42,8 +39,6 @@ public interface DiscoverySolutions { * Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions * API. * - * @param scope scope = resourceUri of affected resource.<br/> For example: - * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read. * @param filter 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional * 'ResourceType' and 'SolutionType' filters. The * [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports only 'and', 'or' and @@ -55,5 +50,5 @@ public interface DiscoverySolutions { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return discovery response as paginated response with {@link PagedIterable}. */ - PagedIterable list(String scope, String filter, String skiptoken, Context context); + PagedIterable list(String filter, String skiptoken, Context context); } diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationDisplay.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationDisplay.java index 54ce9c133066..e4c1e3de629c 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationDisplay.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationDisplay.java @@ -13,22 +13,19 @@ @Immutable public final class OperationDisplay { /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft - * Compute". + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job - * Schedule Collections". + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual - * Machine", "Restart Virtual Machine". + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationListResult.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationListResult.java index 5fd966ef6b55..79736b17ab6d 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationListResult.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/OperationListResult.java @@ -10,8 +10,8 @@ import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set - * of results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. */ @Immutable public final class OperationListResult { diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/QuestionType.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/QuestionType.java index 5b3bd0d377ae..aca12cd36474 100644 --- a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/QuestionType.java +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/QuestionType.java @@ -32,6 +32,16 @@ public final class QuestionType extends ExpandableStringEnum { */ public static final QuestionType MULTI_LINE_INFO_BOX = fromString("MultiLineInfoBox"); + /** + * Static value DateTimePicker for QuestionType. + */ + public static final QuestionType DATE_TIME_PICKER = fromString("DateTimePicker"); + + /** + * Static value MultiSelect for QuestionType. + */ + public static final QuestionType MULTI_SELECT = fromString("MultiSelect"); + /** * Creates a new instance of QuestionType value. * diff --git a/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ReplacementMapsSelfHelp.java b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ReplacementMapsSelfHelp.java new file mode 100644 index 000000000000..bba5594a13c9 --- /dev/null +++ b/sdk/selfhelp/azure-resourcemanager-selfhelp/src/main/java/com/azure/resourcemanager/selfhelp/models/ReplacementMapsSelfHelp.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.selfhelp.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Solution replacement maps. + */ +@Fluent +public final class ReplacementMapsSelfHelp { + /* + * Solution AzureKB results + */ + @JsonProperty(value = "webResults") + private List webResults; + + /* + * Video solutions, which have the power to engage the customer by stimulating their senses + */ + @JsonProperty(value = "videos") + private List