From aaf43284c6f42b6292b1bd2fdce6ba242abe1825 Mon Sep 17 00:00:00 2001 From: Sahil Pawar Date: Mon, 9 Oct 2023 10:24:21 -0400 Subject: [PATCH 01/27] update 2023-09-01 autorest --- .../Sample_SelfHelpDiagnosticCollection.cs | 20 ++++++++++++++++++- .../Sample_SelfHelpDiagnosticResource.cs | 20 ++++++++++++++++++- .../src/autorest.md | 9 +++++++-- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs index a9a120a6ad0df..fbd233dcb83db 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs @@ -12,6 +12,7 @@ using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.SelfHelp; +using Azure.ResourceManager.SelfHelp.Models; namespace Azure.ResourceManager.SelfHelp.Samples { @@ -40,7 +41,24 @@ public async Task CreateOrUpdate_CreatesADiagnosticForAKeyVaultResource() // invoke the operation string diagnosticsResourceName = "VMNotWorkingInsight"; - SelfHelpDiagnosticData data = new SelfHelpDiagnosticData(); + SelfHelpDiagnosticData data = new SelfHelpDiagnosticData() + { + GlobalParameters = +{ +["startTime"] = "2020-07-01", +}, + Insights = +{ +new SelfHelpDiagnosticInvocation() +{ +SolutionId = "SampleSolutionId", +AdditionalParameters = +{ +["serverName"] = "testServer", +}, +} +}, + }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diagnosticsResourceName, data); SelfHelpDiagnosticResource result = lro.Value; diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs index 9671d2921dfbf..09a5a8224bfeb 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs @@ -12,6 +12,7 @@ using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.SelfHelp; +using Azure.ResourceManager.SelfHelp.Models; namespace Azure.ResourceManager.SelfHelp.Samples { @@ -38,7 +39,24 @@ public async Task Update_CreatesADiagnosticForAKeyVaultResource() SelfHelpDiagnosticResource selfHelpDiagnostic = client.GetSelfHelpDiagnosticResource(selfHelpDiagnosticResourceId); // invoke the operation - SelfHelpDiagnosticData data = new SelfHelpDiagnosticData(); + SelfHelpDiagnosticData data = new SelfHelpDiagnosticData() + { + GlobalParameters = +{ +["startTime"] = "2020-07-01", +}, + Insights = +{ +new SelfHelpDiagnosticInvocation() +{ +SolutionId = "SampleSolutionId", +AdditionalParameters = +{ +["serverName"] = "testServer", +}, +} +}, + }; ArmOperation lro = await selfHelpDiagnostic.UpdateAsync(WaitUntil.Completed, data); SelfHelpDiagnosticResource result = lro.Value; diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md index 5c1c5fc8ed81f..1c6656aafdbc4 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md @@ -7,8 +7,8 @@ azure-arm: true csharp: true library-name: SelfHelp namespace: Azure.ResourceManager.SelfHelp -require: https://github.com/Azure/azure-rest-api-specs/blob/2ced92ea3d86dbe78f1927a8c4c89767cb48e46a/specification/help/resource-manager/readme.md -tag: package-2023-06-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/help/resource-manager/readme.md +tag: package-2023-09-01-preview output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -80,4 +80,9 @@ override-operation-name: Diagnostics_CheckNameAvailability: CheckSelfHelpNameAvailability DiscoverySolution_List: GetSelfHelpDiscoverySolutions + directive: + - from: help.json + where: $.definitions + transform: > + $.SolutionResource.properties.properties.solutionResourceProperties.properties.replacementMaps.properties.metricsBasedChart.properties.timeSpanDuration['format'] = 'duration'; ``` From 0949dfbf8f9a17ac6f1f9f1ee4cea4926d30f3d1 Mon Sep 17 00:00:00 2001 From: Wei Hu Date: Tue, 10 Oct 2023 11:23:50 +0800 Subject: [PATCH 02/27] mitigate configuration --- .../Azure.ResourceManager.SelfHelp/src/autorest.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md index 1c6656aafdbc4..d9274ce3b226b 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/autorest.md @@ -80,9 +80,13 @@ override-operation-name: Diagnostics_CheckNameAvailability: CheckSelfHelpNameAvailability DiscoverySolution_List: GetSelfHelpDiscoverySolutions - directive: +directive: - from: help.json - where: $.definitions + where: $.definitions.MetricsBasedChart transform: > - $.SolutionResource.properties.properties.solutionResourceProperties.properties.replacementMaps.properties.metricsBasedChart.properties.timeSpanDuration['format'] = 'duration'; + $.properties.timeSpanDuration['format'] = 'duration'; + - from: help.json + where: $.definitions.Step.properties.type + transform: > + $["x-ms-client-name"] = 'StepType'; ``` From 687b35cdc39842a1db9894191e3fd29f6d72fef1 Mon Sep 17 00:00:00 2001 From: Sahil Pawar Date: Tue, 10 Oct 2023 11:11:16 -0400 Subject: [PATCH 03/27] generating API --- ...ResourceManager.SelfHelp.netstandard2.0.cs | 546 +++++++++++++++++- .../Samples/Sample_ArmResourceExtensions.cs | 71 +++ .../Sample_SelfHelpDiagnosticCollection.cs | 32 +- .../Sample_SelfHelpDiagnosticResource.cs | 28 +- .../Samples/Sample_SolutionResource.cs | 83 +++ .../Sample_SolutionResourceCollection.cs | 132 +++++ .../Samples/Sample_TroubleshooterResource.cs | 181 ++++++ ...Sample_TroubleshooterResourceCollection.cs | 121 ++++ .../src/Generated/ArmSelfHelpModelFactory.cs | 141 ++++- .../Extensions/ArmResourceExtensionClient.cs | 54 +- .../Extensions/SelfHelpExtensions.cs | 184 +++++- .../SolutionResourceOperationSource.cs | 40 ++ .../src/Generated/Models/AggregationType.cs | 60 ++ .../AutomatedCheckResult.Serialization.cs | 43 ++ .../Generated/Models/AutomatedCheckResult.cs | 32 + .../Models/AutomatedCheckResultType.cs | 57 ++ .../src/Generated/Models/Confidence.cs | 54 ++ .../ContinueRequestBody.Serialization.cs | 36 ++ .../Generated/Models/ContinueRequestBody.cs | 27 + .../Models/DiagnosticProvisioningState.cs | 57 ++ .../src/Generated/Models/ExecutionStatus.cs | 57 ++ .../Generated/Models/Filter.Serialization.cs | 66 +++ .../src/Generated/Models/Filter.cs | 36 ++ .../Models/FilterGroup.Serialization.cs | 59 ++ .../src/Generated/Models/FilterGroup.cs | 32 + .../Models/MetricsBasedChart.Serialization.cs | 112 ++++ .../src/Generated/Models/MetricsBasedChart.cs | 62 ++ .../src/Generated/Models/Name.cs | 54 ++ .../Generated/Models/QuestionContentType.cs | 54 ++ .../src/Generated/Models/QuestionType.cs | 57 ++ .../Models/ReplacementMaps.Serialization.cs | 184 ++++++ .../src/Generated/Models/ReplacementMaps.cs | 57 ++ .../Models/ResponseOption.Serialization.cs | 39 ++ .../src/Generated/Models/ResponseOption.cs | 32 + ...ponseValidationProperties.Serialization.cs | 59 ++ .../Models/ResponseValidationProperties.cs | 40 ++ ...artTroubleshooterResponse.Serialization.cs | 33 ++ .../Models/RestartTroubleshooterResponse.cs | 28 + .../src/Generated/Models/ResultType.cs | 51 ++ .../Models/SearchResult.Serialization.cs | 133 +++++ .../src/Generated/Models/SearchResult.cs | 56 ++ .../Generated/Models/Section.Serialization.cs | 70 +++ .../src/Generated/Models/Section.cs | 36 ++ .../SelfHelpDiagnosticData.Serialization.cs | 4 +- ...SelfHelpDiagnosticInsight.Serialization.cs | 28 +- .../Models/SelfHelpDiagnosticInsight.cs | 12 +- .../Models/SelfHelpDiscoverySolutionResult.cs | 4 +- .../SelfHelpSolutionMetadata.Serialization.cs | 75 +-- .../Models/SelfHelpSolutionMetadata.cs | 26 +- ...olutionMetadataProperties.Serialization.cs | 76 +++ .../Models/SolutionMetadataProperties.cs | 44 ++ .../Models/SolutionProvisioningState.cs | 54 ++ .../SolutionResourceData.Serialization.cs | 78 +++ .../SolutionResourcePatch.Serialization.cs | 26 + .../Generated/Models/SolutionResourcePatch.cs | 21 + ...olutionResourceProperties.Serialization.cs | 173 ++++++ .../Models/SolutionResourceProperties.cs | 62 ++ .../src/Generated/Models/SolutionType.cs | 51 ++ .../SolutionsDiagnostic.Serialization.cs | 132 +++++ .../Generated/Models/SolutionsDiagnostic.cs | 53 ++ .../SolutionsTroubleshooters.Serialization.cs | 66 +++ .../Models/SolutionsTroubleshooters.cs | 36 ++ .../Generated/Models/Step.Serialization.cs | 139 +++++ .../src/Generated/Models/Step.cs | 78 +++ .../Models/StepInput.Serialization.cs | 99 ++++ .../src/Generated/Models/StepInput.cs | 64 ++ .../Models/TriggerCriterion.Serialization.cs | 59 ++ .../src/Generated/Models/TriggerCriterion.cs | 32 + .../Models/TroubleshooterProvisioningState.cs | 60 ++ ...roubleshooterResourceData.Serialization.cs | 141 +++++ .../TroubleshooterResponse.Serialization.cs | 36 ++ .../Models/TroubleshooterResponse.cs | 25 + .../src/Generated/Models/Type.cs | 57 ++ .../Generated/Models/Video.Serialization.cs | 66 +++ .../src/Generated/Models/Video.cs | 30 + .../Models/VideoGroup.Serialization.cs | 70 +++ .../src/Generated/Models/VideoGroup.cs | 36 ++ .../Models/VideoGroupVideo.Serialization.cs | 55 ++ .../src/Generated/Models/VideoGroupVideo.cs | 32 + .../Models/WebResult.Serialization.cs | 70 +++ .../src/Generated/Models/WebResult.cs | 36 ++ .../CheckNameAvailabilityRestOperations.cs | 114 ++++ .../DiagnosticsRestOperations.cs | 81 +-- .../DiscoverySolutionRestOperations.cs | 26 +- .../RestOperations/SolutionRestOperations.cs | 260 +++++++++ .../TroubleshootersRestOperations.cs | 406 +++++++++++++ .../Generated/SelfHelpDiagnosticCollection.cs | 4 +- .../src/Generated/SelfHelpDiagnosticData.cs | 4 +- .../Generated/SelfHelpDiagnosticResource.cs | 4 +- .../src/Generated/SolutionResource.cs | 230 ++++++++ .../Generated/SolutionResourceCollection.cs | 269 +++++++++ .../src/Generated/SolutionResourceData.cs | 39 ++ .../src/Generated/TroubleshooterResource.cs | 412 +++++++++++++ .../TroubleshooterResourceCollection.cs | 269 +++++++++ .../Generated/TroubleshooterResourceData.cs | 54 ++ .../src/autorest.md | 2 + 96 files changed, 7449 insertions(+), 317 deletions(-) create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_ArmResourceExtensions.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResource.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResourceCollection.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResource.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResourceCollection.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/LongRunningOperation/SolutionResourceOperationSource.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AggregationType.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResultType.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Confidence.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiagnosticProvisioningState.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ExecutionStatus.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Name.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionContentType.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionType.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ReplacementMaps.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ReplacementMaps.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ResponseOption.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ResponseOption.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ResponseValidationProperties.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ResponseValidationProperties.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/RestartTroubleshooterResponse.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/RestartTroubleshooterResponse.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ResultType.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SearchResult.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SearchResult.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Section.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Section.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionMetadataProperties.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionMetadataProperties.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionProvisioningState.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionResourceData.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionResourcePatch.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionResourcePatch.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionResourceProperties.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionResourceProperties.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionType.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionsDiagnostic.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionsDiagnostic.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionsTroubleshooters.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/SolutionsTroubleshooters.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Step.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Step.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/StepInput.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/StepInput.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/TriggerCriterion.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/TriggerCriterion.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/TroubleshooterProvisioningState.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/TroubleshooterResourceData.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/TroubleshooterResponse.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/TroubleshooterResponse.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Type.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Video.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Video.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/VideoGroup.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/VideoGroup.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/VideoGroupVideo.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/VideoGroupVideo.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/WebResult.Serialization.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/WebResult.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/SolutionRestOperations.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/RestOperations/TroubleshootersRestOperations.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SolutionResource.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SolutionResourceCollection.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SolutionResourceData.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/TroubleshooterResource.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/TroubleshooterResourceCollection.cs create mode 100644 sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/TroubleshooterResourceData.cs diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs index 45b0299d41fd0..f0fe2af3c4709 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/api/Azure.ResourceManager.SelfHelp.netstandard2.0.cs @@ -17,7 +17,7 @@ public SelfHelpDiagnosticData() { } public System.Collections.Generic.IReadOnlyList Diagnostics { get { throw null; } } public System.Collections.Generic.IDictionary GlobalParameters { get { throw null; } } public System.Collections.Generic.IList Insights { get { throw null; } } - public Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState? ProvisioningState { get { throw null; } } } public partial class SelfHelpDiagnosticResource : Azure.ResourceManager.ArmResource { @@ -33,26 +33,358 @@ protected SelfHelpDiagnosticResource() { } } public static partial class SelfHelpExtensions { - public static Azure.Response CheckSelfHelpNameAvailability(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SelfHelp.Models.SelfHelpNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckSelfHelpNameAvailabilityAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SelfHelp.Models.SelfHelpNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetSelfHelpDiagnostic(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string diagnosticsResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSelfHelpDiagnosticAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string diagnosticsResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SelfHelp.SelfHelpDiagnosticResource GetSelfHelpDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.SelfHelp.SelfHelpDiagnosticCollection GetSelfHelpDiagnostics(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } public static Azure.Pageable GetSelfHelpDiscoverySolutions(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSelfHelpDiscoverySolutionsAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SelfHelp.SolutionResource GetSolutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetSolutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string solutionResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSolutionResourceAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string solutionResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SelfHelp.SolutionResourceCollection GetSolutionResources(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.ResourceManager.SelfHelp.TroubleshooterResource GetTroubleshooterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetTroubleshooterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string troubleshooterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetTroubleshooterResourceAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string troubleshooterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SelfHelp.TroubleshooterResourceCollection GetTroubleshooterResources(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.Response PostCheckNameAvailability(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SelfHelp.Models.SelfHelpNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> PostCheckNameAvailabilityAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.SelfHelp.Models.SelfHelpNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SolutionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SolutionResource() { } + public virtual Azure.ResourceManager.SelfHelp.SolutionResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string scope, string solutionResourceName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SelfHelp.Models.SolutionResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SelfHelp.Models.SolutionResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SolutionResourceCollection : Azure.ResourceManager.ArmCollection + { + protected SolutionResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string solutionResourceName, Azure.ResourceManager.SelfHelp.SolutionResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string solutionResourceName, Azure.ResourceManager.SelfHelp.SolutionResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string solutionResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string solutionResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string solutionResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string solutionResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SolutionResourceData : Azure.ResourceManager.Models.ResourceData + { + public SolutionResourceData() { } + public Azure.ResourceManager.SelfHelp.Models.SolutionResourceProperties Properties { get { throw null; } set { } } + } + public partial class TroubleshooterResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TroubleshooterResource() { } + public virtual Azure.ResourceManager.SelfHelp.TroubleshooterResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response Continue(Azure.ResourceManager.SelfHelp.Models.ContinueRequestBody continueRequestBody = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ContinueAsync(Azure.ResourceManager.SelfHelp.Models.ContinueRequestBody continueRequestBody = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string scope, string troubleshooterName) { throw null; } + public virtual Azure.Response End(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EndAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Restart(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RestartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SelfHelp.TroubleshooterResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SelfHelp.TroubleshooterResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TroubleshooterResourceCollection : Azure.ResourceManager.ArmCollection + { + protected TroubleshooterResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string troubleshooterName, Azure.ResourceManager.SelfHelp.TroubleshooterResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string troubleshooterName, Azure.ResourceManager.SelfHelp.TroubleshooterResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string troubleshooterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string troubleshooterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string troubleshooterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string troubleshooterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TroubleshooterResourceData : Azure.ResourceManager.Models.ResourceData + { + public TroubleshooterResourceData() { } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState? ProvisioningState { get { throw null; } } + public string SolutionId { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Steps { get { throw null; } } } } namespace Azure.ResourceManager.SelfHelp.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AggregationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AggregationType(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.AggregationType Avg { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.AggregationType Count { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.AggregationType Max { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.AggregationType Min { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.AggregationType Sum { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.AggregationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.AggregationType left, Azure.ResourceManager.SelfHelp.Models.AggregationType right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.AggregationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.AggregationType left, Azure.ResourceManager.SelfHelp.Models.AggregationType right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmSelfHelpModelFactory { - public static Azure.ResourceManager.SelfHelp.SelfHelpDiagnosticData SelfHelpDiagnosticData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary globalParameters = null, System.Collections.Generic.IEnumerable insights = null, System.DateTimeOffset? acceptedOn = default(System.DateTimeOffset?), Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState? provisioningState = default(Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState?), System.Collections.Generic.IEnumerable diagnostics = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResult AutomatedCheckResult(string result = null, Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType? resultType = default(Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType?)) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.ResponseOption ResponseOption(string key = null, string value = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.ResponseValidationProperties ResponseValidationProperties(string regex = null, bool? isRequired = default(bool?), string validationErrorMessage = null, long? maxLength = default(long?)) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.RestartTroubleshooterResponse RestartTroubleshooterResponse(string troubleshooterResourceName = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.SelfHelpDiagnosticData SelfHelpDiagnosticData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary globalParameters = null, System.Collections.Generic.IEnumerable insights = null, System.DateTimeOffset? acceptedOn = default(System.DateTimeOffset?), Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState? provisioningState = default(Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState?), System.Collections.Generic.IEnumerable diagnostics = null) { throw null; } public static Azure.ResourceManager.SelfHelp.Models.SelfHelpDiagnosticInfo SelfHelpDiagnosticInfo(string solutionId = null, Azure.ResourceManager.SelfHelp.Models.SelfHelpDiagnosticStatus? status = default(Azure.ResourceManager.SelfHelp.Models.SelfHelpDiagnosticStatus?), System.Collections.Generic.IEnumerable insights = null, Azure.ResourceManager.SelfHelp.Models.SelfHelpError error = null) { throw null; } - public static Azure.ResourceManager.SelfHelp.Models.SelfHelpDiagnosticInsight SelfHelpDiagnosticInsight(string id = null, string title = null, string results = null, Azure.ResourceManager.SelfHelp.Models.SelfHelpImportanceLevel? insightImportanceLevel = default(Azure.ResourceManager.SelfHelp.Models.SelfHelpImportanceLevel?)) { throw null; } public static Azure.ResourceManager.SelfHelp.Models.SelfHelpError SelfHelpError(string code = null, string errorType = null, string message = null, System.Collections.Generic.IEnumerable details = null) { throw null; } public static Azure.ResourceManager.SelfHelp.Models.SelfHelpNameAvailabilityResult SelfHelpNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } - public static Azure.ResourceManager.SelfHelp.Models.SelfHelpSolutionMetadata SelfHelpSolutionMetadata(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string solutionId = null, string solutionType = null, string description = null, System.Collections.Generic.IEnumerable> requiredParameterSets = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.SelfHelpSolutionMetadata SelfHelpSolutionMetadata(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable solutions = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.SolutionMetadataProperties SolutionMetadataProperties(string solutionId = null, Azure.ResourceManager.SelfHelp.Models.SolutionType? solutionType = default(Azure.ResourceManager.SelfHelp.Models.SolutionType?), string description = null, System.Collections.Generic.IEnumerable requiredInputs = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.SolutionResourceData SolutionResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SelfHelp.Models.SolutionResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.Step Step(string id = null, string title = null, string description = null, string guidance = null, Azure.ResourceManager.SelfHelp.Models.ExecutionStatus? executionStatus = default(Azure.ResourceManager.SelfHelp.Models.ExecutionStatus?), string executionStatusDescription = null, Azure.ResourceManager.SelfHelp.Models.Type? stepType = default(Azure.ResourceManager.SelfHelp.Models.Type?), bool? isLastStep = default(bool?), System.Collections.Generic.IEnumerable inputs = null, Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResult automatedCheckResults = null, System.Collections.Generic.IEnumerable insights = null, Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.StepInput StepInput(string questionId = null, string questionType = null, string questionContent = null, Azure.ResourceManager.SelfHelp.Models.QuestionContentType? questionContentType = default(Azure.ResourceManager.SelfHelp.Models.QuestionContentType?), string responseHint = null, string recommendedOption = null, string selectedOptionValue = null, Azure.ResourceManager.SelfHelp.Models.ResponseValidationProperties responseValidationProperties = null, System.Collections.Generic.IEnumerable responseOptions = null) { throw null; } + public static Azure.ResourceManager.SelfHelp.TroubleshooterResourceData TroubleshooterResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string solutionId = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState? provisioningState = default(Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState?), System.Collections.Generic.IEnumerable steps = null) { throw null; } + } + public partial class AutomatedCheckResult + { + internal AutomatedCheckResult() { } + public string Result { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType? ResultType { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutomatedCheckResultType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutomatedCheckResultType(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType Error { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType Information { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType Success { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType left, Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType left, Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResultType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Confidence : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Confidence(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.Confidence High { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.Confidence Low { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.Confidence Medium { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.Confidence other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.Confidence left, Azure.ResourceManager.SelfHelp.Models.Confidence right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.Confidence (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.Confidence left, Azure.ResourceManager.SelfHelp.Models.Confidence right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContinueRequestBody + { + public ContinueRequestBody() { } + public System.Collections.Generic.IList Responses { get { throw null; } } + public string StepId { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DiagnosticProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DiagnosticProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState PartialComplete { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState left, Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState left, Azure.ResourceManager.SelfHelp.Models.DiagnosticProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExecutionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExecutionStatus(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.ExecutionStatus Failed { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.ExecutionStatus Running { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.ExecutionStatus Success { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.ExecutionStatus Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.ExecutionStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.ExecutionStatus left, Azure.ResourceManager.SelfHelp.Models.ExecutionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.ExecutionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.ExecutionStatus left, Azure.ResourceManager.SelfHelp.Models.ExecutionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Filter + { + public Filter() { } + public string Name { get { throw null; } set { } } + public string Operator { get { throw null; } set { } } + public string Values { get { throw null; } set { } } + } + public partial class MetricsBasedChart + { + public MetricsBasedChart() { } + public Azure.ResourceManager.SelfHelp.Models.AggregationType? AggregationType { get { throw null; } set { } } + public System.Collections.Generic.IList Filter { get { throw null; } } + public string Name { get { throw null; } set { } } + public string ReplacementKey { get { throw null; } set { } } + public System.TimeSpan? TimeSpanDuration { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Name : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Name(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.Name ProblemClassificationId { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.Name ReplacementKey { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.Name SolutionId { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.Name other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.Name left, Azure.ResourceManager.SelfHelp.Models.Name right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.Name (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.Name left, Azure.ResourceManager.SelfHelp.Models.Name right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct QuestionContentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public QuestionContentType(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.QuestionContentType Html { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.QuestionContentType Markdown { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.QuestionContentType Text { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.QuestionContentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.QuestionContentType left, Azure.ResourceManager.SelfHelp.Models.QuestionContentType right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.QuestionContentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.QuestionContentType left, Azure.ResourceManager.SelfHelp.Models.QuestionContentType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct QuestionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public QuestionType(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.QuestionType Dropdown { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.QuestionType MultiLineInfoBox { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.QuestionType RadioButton { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.QuestionType TextInput { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.QuestionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.QuestionType left, Azure.ResourceManager.SelfHelp.Models.QuestionType right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.QuestionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.QuestionType left, Azure.ResourceManager.SelfHelp.Models.QuestionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ReplacementMaps + { + public ReplacementMaps() { } + public System.Collections.Generic.IList Diagnostics { get { throw null; } } + public System.Collections.Generic.IList MetricsBasedCharts { get { throw null; } } + public System.Collections.Generic.IList Troubleshooters { get { throw null; } } + public System.Collections.Generic.IList VideoGroups { get { throw null; } } + public System.Collections.Generic.IList Videos { get { throw null; } } + public System.Collections.Generic.IList WebResults { get { throw null; } } + } + public partial class ResponseOption + { + internal ResponseOption() { } + public string Key { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class ResponseValidationProperties + { + internal ResponseValidationProperties() { } + public bool? IsRequired { get { throw null; } } + public long? MaxLength { get { throw null; } } + public string Regex { get { throw null; } } + public string ValidationErrorMessage { get { throw null; } } + } + public partial class RestartTroubleshooterResponse + { + internal RestartTroubleshooterResponse() { } + public string TroubleshooterResourceName { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResultType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResultType(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.ResultType Community { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.ResultType Documentation { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.ResultType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.ResultType left, Azure.ResourceManager.SelfHelp.Models.ResultType right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.ResultType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.ResultType left, Azure.ResourceManager.SelfHelp.Models.ResultType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SearchResult + { + public SearchResult() { } + public Azure.ResourceManager.SelfHelp.Models.Confidence? Confidence { get { throw null; } set { } } + public string Content { get { throw null; } set { } } + public string Link { get { throw null; } set { } } + public int? Rank { get { throw null; } set { } } + public Azure.ResourceManager.SelfHelp.Models.ResultType? ResultType { get { throw null; } set { } } + public string SolutionId { get { throw null; } set { } } + public string Source { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + } + public partial class Section + { + public Section() { } + public string Content { get { throw null; } set { } } + public Azure.ResourceManager.SelfHelp.Models.ReplacementMaps ReplacementMaps { get { throw null; } set { } } + public string Title { get { throw null; } set { } } } public partial class SelfHelpDiagnosticInfo { @@ -64,11 +396,11 @@ internal SelfHelpDiagnosticInfo() { } } public partial class SelfHelpDiagnosticInsight { - internal SelfHelpDiagnosticInsight() { } - public string Id { get { throw null; } } - public Azure.ResourceManager.SelfHelp.Models.SelfHelpImportanceLevel? InsightImportanceLevel { get { throw null; } } - public string Results { get { throw null; } } - public string Title { get { throw null; } } + public SelfHelpDiagnosticInsight() { } + public string Id { get { throw null; } set { } } + public Azure.ResourceManager.SelfHelp.Models.SelfHelpImportanceLevel? InsightImportanceLevel { get { throw null; } set { } } + public string Results { get { throw null; } set { } } + public string Title { get { throw null; } set { } } } public partial class SelfHelpDiagnosticInvocation { @@ -137,32 +469,194 @@ internal SelfHelpNameAvailabilityResult() { } public string Message { get { throw null; } } public string Reason { get { throw null; } } } + public partial class SelfHelpSolutionMetadata : Azure.ResourceManager.Models.ResourceData + { + public SelfHelpSolutionMetadata() { } + public System.Collections.Generic.IList Solutions { get { throw null; } } + } + public partial class SolutionMetadataProperties + { + public SolutionMetadataProperties() { } + public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredInputs { get { throw null; } } + public string SolutionId { get { throw null; } set { } } + public Azure.ResourceManager.SelfHelp.Models.SolutionType? SolutionType { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SelfHelpProvisioningState : System.IEquatable + public readonly partial struct SolutionProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SelfHelpProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState PartialComplete { get { throw null; } } - public static Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState other) { throw null; } + public SolutionProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState left, Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState left, Azure.ResourceManager.SelfHelp.Models.SelfHelpProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState left, Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState left, Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class SelfHelpSolutionMetadata : Azure.ResourceManager.Models.ResourceData + public partial class SolutionResourcePatch { - public SelfHelpSolutionMetadata() { } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IList> RequiredParameterSets { get { throw null; } } + public SolutionResourcePatch() { } + public Azure.ResourceManager.SelfHelp.Models.SolutionResourceProperties Properties { get { throw null; } set { } } + } + public partial class SolutionResourceProperties + { + public SolutionResourceProperties() { } + public string Content { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.SolutionProvisioningState? ProvisioningState { get { throw null; } set { } } + public Azure.ResourceManager.SelfHelp.Models.ReplacementMaps ReplacementMaps { get { throw null; } set { } } + public System.Collections.Generic.IList Sections { get { throw null; } } + public string SolutionId { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + public System.Collections.Generic.IList TriggerCriteria { get { throw null; } } + } + public partial class SolutionsDiagnostic + { + public SolutionsDiagnostic() { } + public System.Collections.Generic.IList Insights { get { throw null; } } + public string ReplacementKey { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredParameters { get { throw null; } } + public string SolutionId { get { throw null; } set { } } + public Azure.ResourceManager.SelfHelp.Models.SelfHelpDiagnosticStatus? Status { get { throw null; } set { } } + public string StatusDetails { get { throw null; } set { } } + } + public partial class SolutionsTroubleshooters + { + public SolutionsTroubleshooters() { } public string SolutionId { get { throw null; } set { } } - public string SolutionType { get { throw null; } set { } } + public string Summary { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SolutionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SolutionType(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.SolutionType Diagnostics { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.SolutionType Solutions { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.SolutionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.SolutionType left, Azure.ResourceManager.SelfHelp.Models.SolutionType right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.SolutionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.SolutionType left, Azure.ResourceManager.SelfHelp.Models.SolutionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Step + { + internal Step() { } + public Azure.ResourceManager.SelfHelp.Models.AutomatedCheckResult AutomatedCheckResults { get { throw null; } } + public string Description { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.ExecutionStatus? ExecutionStatus { get { throw null; } } + public string ExecutionStatusDescription { get { throw null; } } + public string Guidance { get { throw null; } } + public string Id { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Inputs { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Insights { get { throw null; } } + public bool? IsLastStep { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.Type? StepType { get { throw null; } } + public string Title { get { throw null; } } + } + public partial class StepInput + { + internal StepInput() { } + public string QuestionContent { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.QuestionContentType? QuestionContentType { get { throw null; } } + public string QuestionId { get { throw null; } } + public string QuestionType { get { throw null; } } + public string RecommendedOption { get { throw null; } } + public string ResponseHint { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResponseOptions { get { throw null; } } + public Azure.ResourceManager.SelfHelp.Models.ResponseValidationProperties ResponseValidationProperties { get { throw null; } } + public string SelectedOptionValue { get { throw null; } } + } + public partial class TriggerCriterion + { + public TriggerCriterion() { } + public Azure.ResourceManager.SelfHelp.Models.Name? Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TroubleshooterProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TroubleshooterProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState AutoContinue { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState Running { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState left, Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState left, Azure.ResourceManager.SelfHelp.Models.TroubleshooterProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TroubleshooterResponse + { + public TroubleshooterResponse() { } + public string QuestionId { get { throw null; } set { } } + public Azure.ResourceManager.SelfHelp.Models.QuestionType? QuestionType { get { throw null; } set { } } + public string Response { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Type : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Type(string value) { throw null; } + public static Azure.ResourceManager.SelfHelp.Models.Type AutomatedCheck { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.Type Decision { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.Type Insight { get { throw null; } } + public static Azure.ResourceManager.SelfHelp.Models.Type Solution { get { throw null; } } + public bool Equals(Azure.ResourceManager.SelfHelp.Models.Type other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SelfHelp.Models.Type left, Azure.ResourceManager.SelfHelp.Models.Type right) { throw null; } + public static implicit operator Azure.ResourceManager.SelfHelp.Models.Type (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SelfHelp.Models.Type left, Azure.ResourceManager.SelfHelp.Models.Type right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Video : Azure.ResourceManager.SelfHelp.Models.VideoGroupVideo + { + public Video() { } + public string ReplacementKey { get { throw null; } set { } } + } + public partial class VideoGroup + { + public VideoGroup() { } + public string ReplacementKey { get { throw null; } set { } } + public System.Collections.Generic.IList Videos { get { throw null; } } + } + public partial class VideoGroupVideo + { + public VideoGroupVideo() { } + public string Src { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + } + public partial class WebResult + { + public WebResult() { } + public string ReplacementKey { get { throw null; } set { } } + public System.Collections.Generic.IList SearchResults { get { throw null; } } } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_ArmResourceExtensions.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_ArmResourceExtensions.cs new file mode 100644 index 0000000000000..259d2d862f3cc --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_ArmResourceExtensions.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.SelfHelp.Models; + +namespace Azure.ResourceManager.SelfHelp.Samples +{ + public partial class Sample_ArmResourceExtensions + { + // Example when name is available for a Diagnostic resource + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task PostCheckNameAvailability_ExampleWhenNameIsAvailableForADiagnosticResource() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json + // this example is just showing the usage of "CheckNameAvailability_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // invoke the operation + string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; + ResourceIdentifier scope0 = new ResourceIdentifier(string.Format("/{0}", scope)); + SelfHelpNameAvailabilityContent content = new SelfHelpNameAvailabilityContent() + { + ResourceName = "sampleName", + ResourceType = new ResourceType("Microsoft.Help/diagnostics"), + }; + SelfHelpNameAvailabilityResult result = await client.PostCheckNameAvailabilityAsync(scope0, content: content); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Example when name is not available for a Diagnostic resource + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task PostCheckNameAvailability_ExampleWhenNameIsNotAvailableForADiagnosticResource() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json + // this example is just showing the usage of "CheckNameAvailability_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // invoke the operation + string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6"; + ResourceIdentifier scope0 = new ResourceIdentifier(string.Format("/{0}", scope)); + SelfHelpNameAvailabilityContent content = new SelfHelpNameAvailabilityContent() + { + ResourceName = "sampleName", + ResourceType = new ResourceType("Microsoft.Help/diagnostics"), + }; + SelfHelpNameAvailabilityResult result = await client.PostCheckNameAvailabilityAsync(scope0, content: content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs index fbd233dcb83db..174edcff459ee 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticCollection.cs @@ -12,7 +12,6 @@ using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.SelfHelp; -using Azure.ResourceManager.SelfHelp.Models; namespace Azure.ResourceManager.SelfHelp.Samples { @@ -23,7 +22,7 @@ public partial class Sample_SelfHelpDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesADiagnosticForAKeyVaultResource() { - // Generated from example definition: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CreateDiagnosticForKeyVaultResource.json + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/CreateDiagnosticForKeyVaultResource.json // this example is just showing the usage of "Diagnostics_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -35,30 +34,13 @@ public async Task CreateOrUpdate_CreatesADiagnosticForAKeyVaultResource() // for more information of creating ArmResource, please refer to the document of ArmResource // get the collection of this SelfHelpDiagnosticResource - string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; + string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); SelfHelpDiagnosticCollection collection = client.GetSelfHelpDiagnostics(scopeId); // invoke the operation string diagnosticsResourceName = "VMNotWorkingInsight"; - SelfHelpDiagnosticData data = new SelfHelpDiagnosticData() - { - GlobalParameters = -{ -["startTime"] = "2020-07-01", -}, - Insights = -{ -new SelfHelpDiagnosticInvocation() -{ -SolutionId = "SampleSolutionId", -AdditionalParameters = -{ -["serverName"] = "testServer", -}, -} -}, - }; + SelfHelpDiagnosticData data = new SelfHelpDiagnosticData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diagnosticsResourceName, data); SelfHelpDiagnosticResource result = lro.Value; @@ -74,7 +56,7 @@ public async Task CreateOrUpdate_CreatesADiagnosticForAKeyVaultResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsADiagnosticForAKeyVaultResource() { - // Generated from example definition: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/GetDiagnosticForKeyVaultResource.json + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/GetDiagnosticForKeyVaultResource.json // this example is just showing the usage of "Diagnostics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +68,7 @@ public async Task Get_GetsADiagnosticForAKeyVaultResource() // for more information of creating ArmResource, please refer to the document of ArmResource // get the collection of this SelfHelpDiagnosticResource - string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; + string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); SelfHelpDiagnosticCollection collection = client.GetSelfHelpDiagnostics(scopeId); @@ -106,7 +88,7 @@ public async Task Get_GetsADiagnosticForAKeyVaultResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsADiagnosticForAKeyVaultResource() { - // Generated from example definition: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/GetDiagnosticForKeyVaultResource.json + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/GetDiagnosticForKeyVaultResource.json // this example is just showing the usage of "Diagnostics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +100,7 @@ public async Task Exists_GetsADiagnosticForAKeyVaultResource() // for more information of creating ArmResource, please refer to the document of ArmResource // get the collection of this SelfHelpDiagnosticResource - string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; + string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); SelfHelpDiagnosticCollection collection = client.GetSelfHelpDiagnostics(scopeId); diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs index 09a5a8224bfeb..2a6077cd3dd96 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SelfHelpDiagnosticResource.cs @@ -12,7 +12,6 @@ using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.SelfHelp; -using Azure.ResourceManager.SelfHelp.Models; namespace Azure.ResourceManager.SelfHelp.Samples { @@ -23,7 +22,7 @@ public partial class Sample_SelfHelpDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatesADiagnosticForAKeyVaultResource() { - // Generated from example definition: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CreateDiagnosticForKeyVaultResource.json + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/CreateDiagnosticForKeyVaultResource.json // this example is just showing the usage of "Diagnostics_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -33,30 +32,13 @@ public async Task Update_CreatesADiagnosticForAKeyVaultResource() // this example assumes you already have this SelfHelpDiagnosticResource created on azure // for more information of creating SelfHelpDiagnosticResource, please refer to the document of SelfHelpDiagnosticResource - string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; + string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; string diagnosticsResourceName = "VMNotWorkingInsight"; ResourceIdentifier selfHelpDiagnosticResourceId = SelfHelpDiagnosticResource.CreateResourceIdentifier(scope, diagnosticsResourceName); SelfHelpDiagnosticResource selfHelpDiagnostic = client.GetSelfHelpDiagnosticResource(selfHelpDiagnosticResourceId); // invoke the operation - SelfHelpDiagnosticData data = new SelfHelpDiagnosticData() - { - GlobalParameters = -{ -["startTime"] = "2020-07-01", -}, - Insights = -{ -new SelfHelpDiagnosticInvocation() -{ -SolutionId = "SampleSolutionId", -AdditionalParameters = -{ -["serverName"] = "testServer", -}, -} -}, - }; + SelfHelpDiagnosticData data = new SelfHelpDiagnosticData(); ArmOperation lro = await selfHelpDiagnostic.UpdateAsync(WaitUntil.Completed, data); SelfHelpDiagnosticResource result = lro.Value; @@ -72,7 +54,7 @@ public async Task Update_CreatesADiagnosticForAKeyVaultResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsADiagnosticForAKeyVaultResource() { - // Generated from example definition: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/GetDiagnosticForKeyVaultResource.json + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/GetDiagnosticForKeyVaultResource.json // this example is just showing the usage of "Diagnostics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +64,7 @@ public async Task Get_GetsADiagnosticForAKeyVaultResource() // this example assumes you already have this SelfHelpDiagnosticResource created on azure // for more information of creating SelfHelpDiagnosticResource, please refer to the document of SelfHelpDiagnosticResource - string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; + string scope = "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read"; string diagnosticsResourceName = "VMNotWorkingInsight"; ResourceIdentifier selfHelpDiagnosticResourceId = SelfHelpDiagnosticResource.CreateResourceIdentifier(scope, diagnosticsResourceName); SelfHelpDiagnosticResource selfHelpDiagnostic = client.GetSelfHelpDiagnosticResource(selfHelpDiagnosticResourceId); diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResource.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResource.cs new file mode 100644 index 0000000000000..d0132d4178227 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResource.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.SelfHelp; +using Azure.ResourceManager.SelfHelp.Models; + +namespace Azure.ResourceManager.SelfHelp.Samples +{ + public partial class Sample_SolutionResource + { + // Solution_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_SolutionGet() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Get.json + // this example is just showing the usage of "Solution_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SolutionResource created on azure + // for more information of creating SolutionResource, please refer to the document of SolutionResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + string solutionResourceName = "SolutionResource1"; + ResourceIdentifier solutionResourceId = SolutionResource.CreateResourceIdentifier(scope, solutionResourceName); + SolutionResource solutionResource = client.GetSolutionResource(solutionResourceId); + + // invoke the operation + SolutionResource result = await solutionResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SolutionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Solution_Update + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_SolutionUpdate() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Update.json + // this example is just showing the usage of "Solution_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SolutionResource created on azure + // for more information of creating SolutionResource, please refer to the document of SolutionResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + string solutionResourceName = "SolutionResourceName1"; + ResourceIdentifier solutionResourceId = SolutionResource.CreateResourceIdentifier(scope, solutionResourceName); + SolutionResource solutionResource = client.GetSolutionResource(solutionResourceId); + + // invoke the operation + SolutionResourcePatch patch = new SolutionResourcePatch(); + ArmOperation lro = await solutionResource.UpdateAsync(WaitUntil.Completed, patch); + SolutionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SolutionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResourceCollection.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResourceCollection.cs new file mode 100644 index 0000000000000..593b85199321e --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_SolutionResourceCollection.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.SelfHelp; +using Azure.ResourceManager.SelfHelp.Models; + +namespace Azure.ResourceManager.SelfHelp.Samples +{ + public partial class Sample_SolutionResourceCollection + { + // Solution_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_SolutionCreate() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Create.json + // this example is just showing the usage of "Solution_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this SolutionResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); + SolutionResourceCollection collection = client.GetSolutionResources(scopeId); + + // invoke the operation + string solutionResourceName = "SolutionResourceName1"; + SolutionResourceData data = new SolutionResourceData() + { + Properties = new SolutionResourceProperties() + { + TriggerCriteria = +{ +new TriggerCriterion() +{ +Name = Name.SolutionId, +Value = "SolutionId1", +} +}, + Parameters = +{ +["resourceUri"] = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", +}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, solutionResourceName, data); + SolutionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SolutionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Solution_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_SolutionGet() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Get.json + // this example is just showing the usage of "Solution_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this SolutionResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); + SolutionResourceCollection collection = client.GetSolutionResources(scopeId); + + // invoke the operation + string solutionResourceName = "SolutionResource1"; + SolutionResource result = await collection.GetAsync(solutionResourceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SolutionResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Solution_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_SolutionGet() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Solution_Get.json + // this example is just showing the usage of "Solution_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this SolutionResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); + SolutionResourceCollection collection = client.GetSolutionResources(scopeId); + + // invoke the operation + string solutionResourceName = "SolutionResource1"; + bool result = await collection.ExistsAsync(solutionResourceName); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResource.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResource.cs new file mode 100644 index 0000000000000..f40fb9efb4789 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResource.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.SelfHelp; +using Azure.ResourceManager.SelfHelp.Models; + +namespace Azure.ResourceManager.SelfHelp.Samples +{ + public partial class Sample_TroubleshooterResource + { + // Troubleshooters_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_TroubleshootersCreate() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Create.json + // this example is just showing the usage of "Troubleshooters_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TroubleshooterResource created on azure + // for more information of creating TroubleshooterResource, please refer to the document of TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + ResourceIdentifier troubleshooterResourceId = TroubleshooterResource.CreateResourceIdentifier(scope, troubleshooterName); + TroubleshooterResource troubleshooterResource = client.GetTroubleshooterResource(troubleshooterResourceId); + + // invoke the operation + TroubleshooterResourceData data = new TroubleshooterResourceData() + { + SolutionId = "SampleTroubleshooterSolutionId", + Parameters = +{ +["ResourceURI"] = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", +}, + }; + ArmOperation lro = await troubleshooterResource.UpdateAsync(WaitUntil.Completed, data); + TroubleshooterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TroubleshooterResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Troubleshooters_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_TroubleshootersGet() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Get.json + // this example is just showing the usage of "Troubleshooters_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TroubleshooterResource created on azure + // for more information of creating TroubleshooterResource, please refer to the document of TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + ResourceIdentifier troubleshooterResourceId = TroubleshooterResource.CreateResourceIdentifier(scope, troubleshooterName); + TroubleshooterResource troubleshooterResource = client.GetTroubleshooterResource(troubleshooterResourceId); + + // invoke the operation + TroubleshooterResource result = await troubleshooterResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TroubleshooterResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Troubleshooter_Continue + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Continue_TroubleshooterContinue() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Continue.json + // this example is just showing the usage of "Troubleshooters_Continue" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TroubleshooterResource created on azure + // for more information of creating TroubleshooterResource, please refer to the document of TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + ResourceIdentifier troubleshooterResourceId = TroubleshooterResource.CreateResourceIdentifier(scope, troubleshooterName); + TroubleshooterResource troubleshooterResource = client.GetTroubleshooterResource(troubleshooterResourceId); + + // invoke the operation + ContinueRequestBody continueRequestBody = new ContinueRequestBody() + { + StepId = "SampleStepId", + Responses = +{ +new TroubleshooterResponse() +{ +QuestionId = "SampleQuestionId", +QuestionType = new QuestionType("Text"), +Response = "Connection exception", +} +}, + }; + await troubleshooterResource.ContinueAsync(continueRequestBody: continueRequestBody); + + Console.WriteLine($"Succeeded"); + } + + // Troubleshooters_End + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task End_TroubleshootersEnd() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_End.json + // this example is just showing the usage of "Troubleshooters_End" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TroubleshooterResource created on azure + // for more information of creating TroubleshooterResource, please refer to the document of TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + ResourceIdentifier troubleshooterResourceId = TroubleshooterResource.CreateResourceIdentifier(scope, troubleshooterName); + TroubleshooterResource troubleshooterResource = client.GetTroubleshooterResource(troubleshooterResourceId); + + // invoke the operation + await troubleshooterResource.EndAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Troubleshooters_Restart + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Restart_TroubleshootersRestart() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Restart.json + // this example is just showing the usage of "Troubleshooters_Restart" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TroubleshooterResource created on azure + // for more information of creating TroubleshooterResource, please refer to the document of TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + ResourceIdentifier troubleshooterResourceId = TroubleshooterResource.CreateResourceIdentifier(scope, troubleshooterName); + TroubleshooterResource troubleshooterResource = client.GetTroubleshooterResource(troubleshooterResourceId); + + // invoke the operation + RestartTroubleshooterResponse result = await troubleshooterResource.RestartAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResourceCollection.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResourceCollection.cs new file mode 100644 index 0000000000000..62b639f2394fe --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/samples/Generated/Samples/Sample_TroubleshooterResourceCollection.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.SelfHelp; + +namespace Azure.ResourceManager.SelfHelp.Samples +{ + public partial class Sample_TroubleshooterResourceCollection + { + // Troubleshooters_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_TroubleshootersCreate() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Create.json + // this example is just showing the usage of "Troubleshooters_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); + TroubleshooterResourceCollection collection = client.GetTroubleshooterResources(scopeId); + + // invoke the operation + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + TroubleshooterResourceData data = new TroubleshooterResourceData() + { + SolutionId = "SampleTroubleshooterSolutionId", + Parameters = +{ +["ResourceURI"] = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, troubleshooterName, data); + TroubleshooterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TroubleshooterResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Troubleshooters_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_TroubleshootersGet() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Get.json + // this example is just showing the usage of "Troubleshooters_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); + TroubleshooterResourceCollection collection = client.GetTroubleshooterResources(scopeId); + + // invoke the operation + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + TroubleshooterResource result = await collection.GetAsync(troubleshooterName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TroubleshooterResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Troubleshooters_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_TroubleshootersGet() + { + // Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2023-09-01-preview/examples/Troubleshooter_Get.json + // this example is just showing the usage of "Troubleshooters_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this TroubleshooterResource + string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", scope)); + TroubleshooterResourceCollection collection = client.GetTroubleshooterResources(scopeId); + + // invoke the operation + string troubleshooterName = "abf168ed-1b54-454a-86f6-e4b62253d3b1"; + bool result = await collection.ExistsAsync(troubleshooterName); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs index 22047ec637985..c261f41cf00c9 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/ArmSelfHelpModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.SelfHelp; @@ -38,7 +39,7 @@ public static SelfHelpNameAvailabilityResult SelfHelpNameAvailabilityResult(bool /// Status of diagnostic provisioning. /// Array of Diagnostics. /// A new instance for mocking. - public static SelfHelpDiagnosticData SelfHelpDiagnosticData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary globalParameters = null, IEnumerable insights = null, DateTimeOffset? acceptedOn = null, SelfHelpProvisioningState? provisioningState = null, IEnumerable diagnostics = null) + public static SelfHelpDiagnosticData SelfHelpDiagnosticData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary globalParameters = null, IEnumerable insights = null, DateTimeOffset? acceptedOn = null, DiagnosticProvisioningState? provisioningState = null, IEnumerable diagnostics = null) { globalParameters ??= new Dictionary(); insights ??= new List(); @@ -60,17 +61,6 @@ public static SelfHelpDiagnosticInfo SelfHelpDiagnosticInfo(string solutionId = return new SelfHelpDiagnosticInfo(solutionId, status, insights?.ToList(), error); } - /// Initializes a new instance of SelfHelpDiagnosticInsight. - /// Article id. - /// This insight's title. - /// Detailed result content. - /// Importance level of the insight. - /// A new instance for mocking. - public static SelfHelpDiagnosticInsight SelfHelpDiagnosticInsight(string id = null, string title = null, string results = null, SelfHelpImportanceLevel? insightImportanceLevel = null) - { - return new SelfHelpDiagnosticInsight(id, title, results, insightImportanceLevel); - } - /// Initializes a new instance of SelfHelpError. /// Service specific error code which serves as the substatus for the HTTP error code. /// Service specific error type which serves as additional context for the error herein. @@ -89,16 +79,133 @@ public static SelfHelpError SelfHelpError(string code = null, string errorType = /// The name. /// The resourceType. /// The systemData. + /// List of metadata. + /// A new instance for mocking. + public static SelfHelpSolutionMetadata SelfHelpSolutionMetadata(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable solutions = null) + { + solutions ??= new List(); + + return new SelfHelpSolutionMetadata(id, name, resourceType, systemData, solutions?.ToList()); + } + + /// Initializes a new instance of SolutionMetadataProperties. /// Solution Id. /// Solution Type. /// A detailed description of solution. - /// Required parameters for invoking this particular solution. - /// A new instance for mocking. - public static SelfHelpSolutionMetadata SelfHelpSolutionMetadata(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string solutionId = null, string solutionType = null, string description = null, IEnumerable> requiredParameterSets = null) + /// Required parameters for invoking this particular solution. + /// A new instance for mocking. + public static SolutionMetadataProperties SolutionMetadataProperties(string solutionId = null, SolutionType? solutionType = null, string description = null, IEnumerable requiredInputs = null) { - requiredParameterSets ??= new List>(); + requiredInputs ??= new List(); - return new SelfHelpSolutionMetadata(id, name, resourceType, systemData, solutionId, solutionType, description, requiredParameterSets?.ToList()); + return new SolutionMetadataProperties(solutionId, solutionType, description, requiredInputs?.ToList()); + } + + /// Initializes a new instance of SolutionResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Solution result. + /// A new instance for mocking. + public static SolutionResourceData SolutionResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SolutionResourceProperties properties = null) + { + return new SolutionResourceData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of TroubleshooterResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Solution Id to identify single troubleshooter. + /// Client input parameters to run Troubleshooter Resource. + /// Status of troubleshooter provisioning. + /// List of step object. + /// A new instance for mocking. + public static TroubleshooterResourceData TroubleshooterResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string solutionId = null, IDictionary parameters = null, TroubleshooterProvisioningState? provisioningState = null, IEnumerable steps = null) + { + parameters ??= new Dictionary(); + steps ??= new List(); + + return new TroubleshooterResourceData(id, name, resourceType, systemData, solutionId, parameters, provisioningState, steps?.ToList()); + } + + /// Initializes a new instance of Step. + /// Unique step id. + /// Step title. + /// Step description. + /// Get or sets the Step guidance. + /// Status of Troubleshooter Step execution. + /// This field has more detailed status description of the execution status. + /// Type of Troubleshooting step. + /// is this last step of the workflow. + /// + /// Only for AutomatedStep type. + /// + /// The error detail. + /// A new instance for mocking. + public static Step Step(string id = null, string title = null, string description = null, string guidance = null, ExecutionStatus? executionStatus = null, string executionStatusDescription = null, Type? stepType = null, bool? isLastStep = null, IEnumerable inputs = null, AutomatedCheckResult automatedCheckResults = null, IEnumerable insights = null, ResponseError error = null) + { + inputs ??= new List(); + insights ??= new List(); + + return new Step(id, title, description, guidance, executionStatus, executionStatusDescription, stepType, isLastStep, inputs?.ToList(), automatedCheckResults, insights?.ToList(), error); + } + + /// Initializes a new instance of StepInput. + /// Use Index as QuestionId. + /// Text Input. Will be a single line input. + /// User question content. + /// Default is Text. + /// Place holder text for response hints. + /// Result of Automate step. + /// Text of response that was selected. + /// Troubleshooter step input response validation properties. + /// + /// A new instance for mocking. + public static StepInput StepInput(string questionId = null, string questionType = null, string questionContent = null, QuestionContentType? questionContentType = null, string responseHint = null, string recommendedOption = null, string selectedOptionValue = null, ResponseValidationProperties responseValidationProperties = null, IEnumerable responseOptions = null) + { + responseOptions ??= new List(); + + return new StepInput(questionId, questionType, questionContent, questionContentType, responseHint, recommendedOption, selectedOptionValue, responseValidationProperties, responseOptions?.ToList()); + } + + /// Initializes a new instance of ResponseValidationProperties. + /// Regex used for the input validation. + /// Default True. + /// Validation Error Message. + /// Max text input (open Ended Text). + /// A new instance for mocking. + public static ResponseValidationProperties ResponseValidationProperties(string regex = null, bool? isRequired = null, string validationErrorMessage = null, long? maxLength = null) + { + return new ResponseValidationProperties(regex, isRequired, validationErrorMessage, maxLength); + } + + /// Initializes a new instance of ResponseOption. + /// Unique string. + /// Option description. + /// A new instance for mocking. + public static ResponseOption ResponseOption(string key = null, string value = null) + { + return new ResponseOption(key, value); + } + + /// Initializes a new instance of AutomatedCheckResult. + /// Insight Article Content. + /// Type of Result. + /// A new instance for mocking. + public static AutomatedCheckResult AutomatedCheckResult(string result = null, AutomatedCheckResultType? resultType = null) + { + return new AutomatedCheckResult(result, resultType); + } + + /// Initializes a new instance of RestartTroubleshooterResponse. + /// Updated TroubleshooterResource Name . + /// A new instance for mocking. + public static RestartTroubleshooterResponse RestartTroubleshooterResponse(string troubleshooterResourceName = null) + { + return new RestartTroubleshooterResponse(troubleshooterResourceName); } } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/ArmResourceExtensionClient.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/ArmResourceExtensionClient.cs index a7ff29fc7b837..23fd697c58e85 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/ArmResourceExtensionClient.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/ArmResourceExtensionClient.cs @@ -20,8 +20,8 @@ namespace Azure.ResourceManager.SelfHelp /// A class to add extension methods to ArmResource. internal partial class ArmResourceExtensionClient : ArmResource { - private ClientDiagnostics _selfHelpDiagnosticDiagnosticsClientDiagnostics; - private DiagnosticsRestOperations _selfHelpDiagnosticDiagnosticsRestClient; + private ClientDiagnostics _checkNameAvailabilityClientDiagnostics; + private CheckNameAvailabilityRestOperations _checkNameAvailabilityRestClient; private ClientDiagnostics _discoverySolutionClientDiagnostics; private DiscoverySolutionRestOperations _discoverySolutionRestClient; @@ -37,8 +37,8 @@ internal ArmResourceExtensionClient(ArmClient client, ResourceIdentifier id) : b { } - private ClientDiagnostics SelfHelpDiagnosticDiagnosticsClientDiagnostics => _selfHelpDiagnosticDiagnosticsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", SelfHelpDiagnosticResource.ResourceType.Namespace, Diagnostics); - private DiagnosticsRestOperations SelfHelpDiagnosticDiagnosticsRestClient => _selfHelpDiagnosticDiagnosticsRestClient ??= new DiagnosticsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SelfHelpDiagnosticResource.ResourceType)); + private ClientDiagnostics CheckNameAvailabilityClientDiagnostics => _checkNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckNameAvailabilityRestOperations CheckNameAvailabilityRestClient => _checkNameAvailabilityRestClient ??= new CheckNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics DiscoverySolutionClientDiagnostics => _discoverySolutionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics); private DiscoverySolutionRestOperations DiscoverySolutionRestClient => _discoverySolutionRestClient ??= new DiscoverySolutionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); @@ -55,8 +55,22 @@ public virtual SelfHelpDiagnosticCollection GetSelfHelpDiagnostics() return GetCachedClient(Client => new SelfHelpDiagnosticCollection(Client, Id)); } + /// Gets a collection of SolutionResources in the ArmResource. + /// An object representing collection of SolutionResources and their operations over a SolutionResource. + public virtual SolutionResourceCollection GetSolutionResources() + { + return GetCachedClient(Client => new SolutionResourceCollection(Client, Id)); + } + + /// Gets a collection of TroubleshooterResources in the ArmResource. + /// An object representing collection of TroubleshooterResources and their operations over a TroubleshooterResource. + public virtual TroubleshooterResourceCollection GetTroubleshooterResources() + { + return GetCachedClient(Client => new TroubleshooterResourceCollection(Client, Id)); + } + /// - /// This API is used to check the uniqueness of a resource name used for a diagnostic check. + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions /// /// /// Request Path @@ -64,19 +78,19 @@ public virtual SelfHelpDiagnosticCollection GetSelfHelpDiagnostics() /// /// /// Operation Id - /// Diagnostics_CheckNameAvailability + /// CheckNameAvailability_Post /// /// /// /// The required parameters for availability check. /// The cancellation token to use. - public virtual async Task> CheckSelfHelpNameAvailabilityAsync(SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> PostCheckNameAvailabilityAsync(SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - using var scope = SelfHelpDiagnosticDiagnosticsClientDiagnostics.CreateScope("ArmResourceExtensionClient.CheckSelfHelpNameAvailability"); + using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("ArmResourceExtensionClient.PostCheckNameAvailability"); scope.Start(); try { - var response = await SelfHelpDiagnosticDiagnosticsRestClient.CheckNameAvailabilityAsync(Id, content, cancellationToken).ConfigureAwait(false); + var response = await CheckNameAvailabilityRestClient.PostAsync(Id, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -87,7 +101,7 @@ public virtual async Task> CheckSelfHel } /// - /// This API is used to check the uniqueness of a resource name used for a diagnostic check. + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions /// /// /// Request Path @@ -95,19 +109,19 @@ public virtual async Task> CheckSelfHel /// /// /// Operation Id - /// Diagnostics_CheckNameAvailability + /// CheckNameAvailability_Post /// /// /// /// The required parameters for availability check. /// The cancellation token to use. - public virtual Response CheckSelfHelpNameAvailability(SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + public virtual Response PostCheckNameAvailability(SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - using var scope = SelfHelpDiagnosticDiagnosticsClientDiagnostics.CreateScope("ArmResourceExtensionClient.CheckSelfHelpNameAvailability"); + using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("ArmResourceExtensionClient.PostCheckNameAvailability"); scope.Start(); try { - var response = SelfHelpDiagnosticDiagnosticsRestClient.CheckNameAvailability(Id, content, cancellationToken); + var response = CheckNameAvailabilityRestClient.Post(Id, content, cancellationToken); return response; } catch (Exception e) @@ -118,7 +132,7 @@ public virtual Response CheckSelfHelpNameAvailab } /// - /// Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.<br/><br/> You can discover solutions using resourceUri OR resourceUri + problemClassificationId.<br/><br/>We will do our best in returning relevant diagnostics for your Azure issue.<br/><br/> Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).<br/><br/> <b>Note: </b> ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. + /// Lists the relevant Azure diagnostics and solutions 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. We will do our best to return the most effective solutions based on the type of inputs, in the request URL <br/><br/> Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) <br/>Optional input: resourceUri OR resource Type <br/><br/> <b>Note: </b> ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. /// /// /// Request Path @@ -130,8 +144,8 @@ public virtual Response CheckSelfHelpNameAvailab /// /// /// - /// Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'. - /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'. + /// Skiptoken is only used if a previous operation returned a partial result. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetSelfHelpDiscoverySolutionsAsync(string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) @@ -142,7 +156,7 @@ public virtual AsyncPageable GetSelfHelpDiscoverySolut } /// - /// Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.<br/><br/> You can discover solutions using resourceUri OR resourceUri + problemClassificationId.<br/><br/>We will do our best in returning relevant diagnostics for your Azure issue.<br/><br/> Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).<br/><br/> <b>Note: </b> ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. + /// Lists the relevant Azure diagnostics and solutions 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. We will do our best to return the most effective solutions based on the type of inputs, in the request URL <br/><br/> Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) <br/>Optional input: resourceUri OR resource Type <br/><br/> <b>Note: </b> ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. /// /// /// Request Path @@ -154,8 +168,8 @@ public virtual AsyncPageable GetSelfHelpDiscoverySolut /// /// /// - /// Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'. - /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'. + /// Skiptoken is only used if a previous operation returned a partial result. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetSelfHelpDiscoverySolutions(string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs index 6014931d31f7c..1e04b5fa2b85c 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Extensions/SelfHelpExtensions.cs @@ -52,6 +52,44 @@ public static SelfHelpDiagnosticResource GetSelfHelpDiagnosticResource(this ArmC } #endregion + #region SolutionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static SolutionResource GetSolutionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SolutionResource.ValidateResourceId(id); + return new SolutionResource(client, id); + } + ); + } + #endregion + + #region TroubleshooterResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static TroubleshooterResource GetTroubleshooterResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + TroubleshooterResource.ValidateResourceId(id); + return new TroubleshooterResource(client, id); + } + ); + } + #endregion + /// Gets a collection of SelfHelpDiagnosticResources in the ArmResource. /// The instance the method will execute against. /// The scope that the resource will apply against. @@ -111,8 +149,126 @@ public static Response GetSelfHelpDiagnostic(this Ar return client.GetSelfHelpDiagnostics(scope).Get(diagnosticsResourceName, cancellationToken); } + /// Gets a collection of SolutionResources in the ArmResource. + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// An object representing collection of SolutionResources and their operations over a SolutionResource. + public static SolutionResourceCollection GetSolutionResources(this ArmClient client, ResourceIdentifier scope) + { + return GetArmResourceExtensionClient(client, scope).GetSolutionResources(); + } + + /// + /// Get the solution using the applicable solutionResourceName while creating the solution. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Help/solutions/{solutionResourceName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// Solution resource Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetSolutionResourceAsync(this ArmClient client, ResourceIdentifier scope, string solutionResourceName, CancellationToken cancellationToken = default) + { + return await client.GetSolutionResources(scope).GetAsync(solutionResourceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the solution using the applicable solutionResourceName while creating the solution. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Help/solutions/{solutionResourceName} + /// + /// + /// Operation Id + /// Solution_Get + /// + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// Solution resource Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetSolutionResource(this ArmClient client, ResourceIdentifier scope, string solutionResourceName, CancellationToken cancellationToken = default) + { + return client.GetSolutionResources(scope).Get(solutionResourceName, cancellationToken); + } + + /// Gets a collection of TroubleshooterResources in the ArmResource. + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// An object representing collection of TroubleshooterResources and their operations over a TroubleshooterResource. + public static TroubleshooterResourceCollection GetTroubleshooterResources(this ArmClient client, ResourceIdentifier scope) + { + return GetArmResourceExtensionClient(client, scope).GetTroubleshooterResources(); + } + + /// + /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.<br/> Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName} + /// + /// + /// Operation Id + /// Troubleshooters_Get + /// + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// Troubleshooter resource Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetTroubleshooterResourceAsync(this ArmClient client, ResourceIdentifier scope, string troubleshooterName, CancellationToken cancellationToken = default) + { + return await client.GetTroubleshooterResources(scope).GetAsync(troubleshooterName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.<br/> Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName} + /// + /// + /// Operation Id + /// Troubleshooters_Get + /// + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. + /// Troubleshooter resource Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetTroubleshooterResource(this ArmClient client, ResourceIdentifier scope, string troubleshooterName, CancellationToken cancellationToken = default) + { + return client.GetTroubleshooterResources(scope).Get(troubleshooterName, cancellationToken); + } + /// - /// This API is used to check the uniqueness of a resource name used for a diagnostic check. + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions /// /// /// Request Path @@ -120,7 +276,7 @@ public static Response GetSelfHelpDiagnostic(this Ar /// /// /// Operation Id - /// Diagnostics_CheckNameAvailability + /// CheckNameAvailability_Post /// /// /// @@ -128,13 +284,13 @@ public static Response GetSelfHelpDiagnostic(this Ar /// The scope that the resource will apply against. /// The required parameters for availability check. /// The cancellation token to use. - public static async Task> CheckSelfHelpNameAvailabilityAsync(this ArmClient client, ResourceIdentifier scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + public static async Task> PostCheckNameAvailabilityAsync(this ArmClient client, ResourceIdentifier scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - return await GetArmResourceExtensionClient(client, scope).CheckSelfHelpNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); + return await GetArmResourceExtensionClient(client, scope).PostCheckNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); } /// - /// This API is used to check the uniqueness of a resource name used for a diagnostic check. + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions /// /// /// Request Path @@ -142,7 +298,7 @@ public static async Task> CheckSelfHelp /// /// /// Operation Id - /// Diagnostics_CheckNameAvailability + /// CheckNameAvailability_Post /// /// /// @@ -150,13 +306,13 @@ public static async Task> CheckSelfHelp /// The scope that the resource will apply against. /// The required parameters for availability check. /// The cancellation token to use. - public static Response CheckSelfHelpNameAvailability(this ArmClient client, ResourceIdentifier scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + public static Response PostCheckNameAvailability(this ArmClient client, ResourceIdentifier scope, SelfHelpNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - return GetArmResourceExtensionClient(client, scope).CheckSelfHelpNameAvailability(content, cancellationToken); + return GetArmResourceExtensionClient(client, scope).PostCheckNameAvailability(content, cancellationToken); } /// - /// Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.<br/><br/> You can discover solutions using resourceUri OR resourceUri + problemClassificationId.<br/><br/>We will do our best in returning relevant diagnostics for your Azure issue.<br/><br/> Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).<br/><br/> <b>Note: </b> ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. + /// Lists the relevant Azure diagnostics and solutions 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. We will do our best to return the most effective solutions based on the type of inputs, in the request URL <br/><br/> Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) <br/>Optional input: resourceUri OR resource Type <br/><br/> <b>Note: </b> ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. /// /// /// Request Path @@ -170,8 +326,8 @@ public static Response CheckSelfHelpNameAvailabi /// /// The instance the method will execute against. /// The scope that the resource will apply against. - /// Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'. - /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'. + /// Skiptoken is only used if a previous operation returned a partial result. /// The cancellation token to use. public static AsyncPageable GetSelfHelpDiscoverySolutionsAsync(this ArmClient client, ResourceIdentifier scope, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) { @@ -179,7 +335,7 @@ public static AsyncPageable GetSelfHelpDiscoverySoluti } /// - /// Solutions Discovery is the initial point of entry within Help API, which helps you identify the relevant solutions for your Azure issue.<br/><br/> You can discover solutions using resourceUri OR resourceUri + problemClassificationId.<br/><br/>We will do our best in returning relevant diagnostics for your Azure issue.<br/><br/> Get the problemClassificationId(s) using this [reference](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP).<br/><br/> <b>Note: </b> ‘requiredParameterSets’ from Solutions Discovery API response must be passed via ‘additionalParameters’ as an input to Diagnostics API. + /// Lists the relevant Azure diagnostics and solutions 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. We will do our best to return the most effective solutions based on the type of inputs, in the request URL <br/><br/> Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) <br/>Optional input: resourceUri OR resource Type <br/><br/> <b>Note: </b> ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API. /// /// /// Request Path @@ -193,8 +349,8 @@ public static AsyncPageable GetSelfHelpDiscoverySoluti /// /// The instance the method will execute against. /// The scope that the resource will apply against. - /// Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'. - /// Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. + /// 'ProblemClassificationId' or 'Id' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' and 'SolutionType' filters. The filter supports only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e'. + /// Skiptoken is only used if a previous operation returned a partial result. /// The cancellation token to use. public static Pageable GetSelfHelpDiscoverySolutions(this ArmClient client, ResourceIdentifier scope, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) { diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/LongRunningOperation/SolutionResourceOperationSource.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/LongRunningOperation/SolutionResourceOperationSource.cs new file mode 100644 index 0000000000000..edeeea88bd866 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/LongRunningOperation/SolutionResourceOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.SelfHelp +{ + internal class SolutionResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SolutionResourceOperationSource(ArmClient client) + { + _client = client; + } + + SolutionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = SolutionResourceData.DeserializeSolutionResourceData(document.RootElement); + return new SolutionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = SolutionResourceData.DeserializeSolutionResourceData(document.RootElement); + return new SolutionResource(_client, data); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AggregationType.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AggregationType.cs new file mode 100644 index 0000000000000..14e269e3b03d8 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AggregationType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum. + public readonly partial struct AggregationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AggregationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SumValue = "Sum"; + private const string AvgValue = "Avg"; + private const string CountValue = "Count"; + private const string MinValue = "Min"; + private const string MaxValue = "Max"; + + /// Sum. + public static AggregationType Sum { get; } = new AggregationType(SumValue); + /// Avg. + public static AggregationType Avg { get; } = new AggregationType(AvgValue); + /// Count. + public static AggregationType Count { get; } = new AggregationType(CountValue); + /// Min. + public static AggregationType Min { get; } = new AggregationType(MinValue); + /// Max. + public static AggregationType Max { get; } = new AggregationType(MaxValue); + /// Determines if two values are the same. + public static bool operator ==(AggregationType left, AggregationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AggregationType left, AggregationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AggregationType(string value) => new AggregationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AggregationType other && Equals(other); + /// + public bool Equals(AggregationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.Serialization.cs new file mode 100644 index 0000000000000..07d05ab014e3c --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + public partial class AutomatedCheckResult + { + internal static AutomatedCheckResult DeserializeAutomatedCheckResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional result = default; + Optional type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("result"u8)) + { + result = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new AutomatedCheckResultType(property.Value.GetString()); + continue; + } + } + return new AutomatedCheckResult(result.Value, Optional.ToNullable(type)); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.cs new file mode 100644 index 0000000000000..4a5e2557fe5ae --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Only for AutomatedStep type. + public partial class AutomatedCheckResult + { + /// Initializes a new instance of AutomatedCheckResult. + internal AutomatedCheckResult() + { + } + + /// Initializes a new instance of AutomatedCheckResult. + /// Insight Article Content. + /// Type of Result. + internal AutomatedCheckResult(string result, AutomatedCheckResultType? resultType) + { + Result = result; + ResultType = resultType; + } + + /// Insight Article Content. + public string Result { get; } + /// Type of Result. + public AutomatedCheckResultType? ResultType { get; } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResultType.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResultType.cs new file mode 100644 index 0000000000000..775c367fd0b6d --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/AutomatedCheckResultType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Type of Result. + public readonly partial struct AutomatedCheckResultType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutomatedCheckResultType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SuccessValue = "Success"; + private const string WarningValue = "Warning"; + private const string ErrorValue = "Error"; + private const string InformationValue = "Information"; + + /// Success. + public static AutomatedCheckResultType Success { get; } = new AutomatedCheckResultType(SuccessValue); + /// Warning. + public static AutomatedCheckResultType Warning { get; } = new AutomatedCheckResultType(WarningValue); + /// Error. + public static AutomatedCheckResultType Error { get; } = new AutomatedCheckResultType(ErrorValue); + /// Information. + public static AutomatedCheckResultType Information { get; } = new AutomatedCheckResultType(InformationValue); + /// Determines if two values are the same. + public static bool operator ==(AutomatedCheckResultType left, AutomatedCheckResultType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutomatedCheckResultType left, AutomatedCheckResultType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AutomatedCheckResultType(string value) => new AutomatedCheckResultType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutomatedCheckResultType other && Equals(other); + /// + public bool Equals(AutomatedCheckResultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Confidence.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Confidence.cs new file mode 100644 index 0000000000000..2be749b95d77b --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Confidence.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Confidence of the search result. + public readonly partial struct Confidence : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Confidence(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LowValue = "Low"; + private const string MediumValue = "Medium"; + private const string HighValue = "High"; + + /// Low. + public static Confidence Low { get; } = new Confidence(LowValue); + /// Medium. + public static Confidence Medium { get; } = new Confidence(MediumValue); + /// High. + public static Confidence High { get; } = new Confidence(HighValue); + /// Determines if two values are the same. + public static bool operator ==(Confidence left, Confidence right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Confidence left, Confidence right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Confidence(string value) => new Confidence(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Confidence other && Equals(other); + /// + public bool Equals(Confidence other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.Serialization.cs new file mode 100644 index 0000000000000..043b2bf24629d --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + public partial class ContinueRequestBody : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(StepId)) + { + writer.WritePropertyName("stepId"u8); + writer.WriteStringValue(StepId); + } + if (Optional.IsCollectionDefined(Responses)) + { + writer.WritePropertyName("responses"u8); + writer.WriteStartArray(); + foreach (var item in Responses) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.cs new file mode 100644 index 0000000000000..5b93df217c056 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ContinueRequestBody.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Troubleshooter ContinueRequest body. + public partial class ContinueRequestBody + { + /// Initializes a new instance of ContinueRequestBody. + public ContinueRequestBody() + { + Responses = new ChangeTrackingList(); + } + + /// Unique id of the result. + public string StepId { get; set; } + /// Gets the responses. + public IList Responses { get; } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiagnosticProvisioningState.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiagnosticProvisioningState.cs new file mode 100644 index 0000000000000..43436c9e91948 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/DiagnosticProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Status of diagnostic provisioning. + public readonly partial struct DiagnosticProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiagnosticProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string PartialCompleteValue = "PartialComplete"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// All Diagnostics in the Batch succeeded. + public static DiagnosticProvisioningState Succeeded { get; } = new DiagnosticProvisioningState(SucceededValue); + /// Some Diagnostics are still running or failed. + public static DiagnosticProvisioningState PartialComplete { get; } = new DiagnosticProvisioningState(PartialCompleteValue); + /// All Diagnostics failed to run. + public static DiagnosticProvisioningState Failed { get; } = new DiagnosticProvisioningState(FailedValue); + /// When Diagnostic request gets canceled. + public static DiagnosticProvisioningState Canceled { get; } = new DiagnosticProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(DiagnosticProvisioningState left, DiagnosticProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiagnosticProvisioningState left, DiagnosticProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DiagnosticProvisioningState(string value) => new DiagnosticProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiagnosticProvisioningState other && Equals(other); + /// + public bool Equals(DiagnosticProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ExecutionStatus.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ExecutionStatus.cs new file mode 100644 index 0000000000000..90526d16c3266 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ExecutionStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Status of Troubleshooter Step execution. + public readonly partial struct ExecutionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExecutionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SuccessValue = "Success"; + private const string RunningValue = "Running"; + private const string FailedValue = "Failed"; + private const string WarningValue = "Warning"; + + /// Success. + public static ExecutionStatus Success { get; } = new ExecutionStatus(SuccessValue); + /// Running. + public static ExecutionStatus Running { get; } = new ExecutionStatus(RunningValue); + /// Failed. + public static ExecutionStatus Failed { get; } = new ExecutionStatus(FailedValue); + /// Warning. + public static ExecutionStatus Warning { get; } = new ExecutionStatus(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(ExecutionStatus left, ExecutionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExecutionStatus left, ExecutionStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ExecutionStatus(string value) => new ExecutionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExecutionStatus other && Equals(other); + /// + public bool Equals(ExecutionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.Serialization.cs new file mode 100644 index 0000000000000..bc388c559f9fb --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + public partial class Filter : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStringValue(Values); + } + if (Optional.IsDefined(Operator)) + { + writer.WritePropertyName("operator"u8); + writer.WriteStringValue(Operator); + } + writer.WriteEndObject(); + } + + internal static Filter DeserializeFilter(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional values = default; + Optional @operator = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + values = property.Value.GetString(); + continue; + } + if (property.NameEquals("operator"u8)) + { + @operator = property.Value.GetString(); + continue; + } + } + return new Filter(name.Value, values.Value, @operator.Value); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.cs new file mode 100644 index 0000000000000..314f4691cc0ac --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Filter.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Filter criterion. + public partial class Filter + { + /// Initializes a new instance of Filter. + public Filter() + { + } + + /// Initializes a new instance of Filter. + /// Filter name. + /// Filter values. + /// Filter operator. + internal Filter(string name, string values, string @operator) + { + Name = name; + Values = values; + Operator = @operator; + } + + /// Filter name. + public string Name { get; set; } + /// Filter values. + public string Values { get; set; } + /// Filter operator. + public string Operator { get; set; } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.Serialization.cs new file mode 100644 index 0000000000000..1ef96199f48e4 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + internal partial class FilterGroup : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Filter)) + { + writer.WritePropertyName("filter"u8); + writer.WriteStartArray(); + foreach (var item in Filter) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static FilterGroup DeserializeFilterGroup(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> filter = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Filter.DeserializeFilter(item)); + } + filter = array; + continue; + } + } + return new FilterGroup(Optional.ToList(filter)); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.cs new file mode 100644 index 0000000000000..fdbadc51d498c --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/FilterGroup.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Filter group. + internal partial class FilterGroup + { + /// Initializes a new instance of FilterGroup. + public FilterGroup() + { + Filter = new ChangeTrackingList(); + } + + /// Initializes a new instance of FilterGroup. + /// List of filters. + internal FilterGroup(IList filter) + { + Filter = filter; + } + + /// List of filters. + public IList Filter { get; } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.Serialization.cs new file mode 100644 index 0000000000000..3ae41aa753842 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.Serialization.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + public partial class MetricsBasedChart : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(AggregationType)) + { + writer.WritePropertyName("aggregationType"u8); + writer.WriteStringValue(AggregationType.Value.ToString()); + } + if (Optional.IsDefined(TimeSpanDuration)) + { + writer.WritePropertyName("timeSpanDuration"u8); + writer.WriteStringValue(TimeSpanDuration.Value, "P"); + } + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(FilterGroup)) + { + writer.WritePropertyName("filterGroup"u8); + writer.WriteObjectValue(FilterGroup); + } + if (Optional.IsDefined(ReplacementKey)) + { + writer.WritePropertyName("replacementKey"u8); + writer.WriteStringValue(ReplacementKey); + } + writer.WriteEndObject(); + } + + internal static MetricsBasedChart DeserializeMetricsBasedChart(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional aggregationType = default; + Optional timeSpanDuration = default; + Optional title = default; + Optional filterGroup = default; + Optional replacementKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("aggregationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aggregationType = new AggregationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeSpanDuration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeSpanDuration = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("filterGroup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filterGroup = FilterGroup.DeserializeFilterGroup(property.Value); + continue; + } + if (property.NameEquals("replacementKey"u8)) + { + replacementKey = property.Value.GetString(); + continue; + } + } + return new MetricsBasedChart(name.Value, Optional.ToNullable(aggregationType), Optional.ToNullable(timeSpanDuration), title.Value, filterGroup.Value, replacementKey.Value); + } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.cs new file mode 100644 index 0000000000000..182ffd2e7d254 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/MetricsBasedChart.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Solutions metrics based chart. + public partial class MetricsBasedChart + { + /// Initializes a new instance of MetricsBasedChart. + public MetricsBasedChart() + { + } + + /// Initializes a new instance of MetricsBasedChart. + /// Chart name. + /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum. + /// Time span duration. + /// Chart title. + /// Filter group. + /// Place holder used in HTML Content replace control with the content. + internal MetricsBasedChart(string name, AggregationType? aggregationType, TimeSpan? timeSpanDuration, string title, FilterGroup filterGroup, string replacementKey) + { + Name = name; + AggregationType = aggregationType; + TimeSpanDuration = timeSpanDuration; + Title = title; + FilterGroup = filterGroup; + ReplacementKey = replacementKey; + } + + /// Chart name. + public string Name { get; set; } + /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum. + public AggregationType? AggregationType { get; set; } + /// Time span duration. + public TimeSpan? TimeSpanDuration { get; set; } + /// Chart title. + public string Title { get; set; } + /// Filter group. + internal FilterGroup FilterGroup { get; set; } + /// List of filters. + public IList Filter + { + get + { + if (FilterGroup is null) + FilterGroup = new FilterGroup(); + return FilterGroup.Filter; + } + } + + /// Place holder used in HTML Content replace control with the content. + public string ReplacementKey { get; set; } + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Name.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Name.cs new file mode 100644 index 0000000000000..0c1ba8048c652 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/Name.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Trigger criterion name. + public readonly partial struct Name : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Name(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SolutionIdValue = "SolutionId"; + private const string ProblemClassificationIdValue = "ProblemClassificationId"; + private const string ReplacementKeyValue = "ReplacementKey"; + + /// SolutionId. + public static Name SolutionId { get; } = new Name(SolutionIdValue); + /// ProblemClassificationId. + public static Name ProblemClassificationId { get; } = new Name(ProblemClassificationIdValue); + /// ReplacementKey. + public static Name ReplacementKey { get; } = new Name(ReplacementKeyValue); + /// Determines if two values are the same. + public static bool operator ==(Name left, Name right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Name left, Name right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Name(string value) => new Name(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Name other && Equals(other); + /// + public bool Equals(Name other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionContentType.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionContentType.cs new file mode 100644 index 0000000000000..684ef0bfb50b0 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionContentType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Default is Text. + public readonly partial struct QuestionContentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public QuestionContentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "Text"; + private const string HtmlValue = "Html"; + private const string MarkdownValue = "Markdown"; + + /// Text. + public static QuestionContentType Text { get; } = new QuestionContentType(TextValue); + /// Html. + public static QuestionContentType Html { get; } = new QuestionContentType(HtmlValue); + /// Markdown. + public static QuestionContentType Markdown { get; } = new QuestionContentType(MarkdownValue); + /// Determines if two values are the same. + public static bool operator ==(QuestionContentType left, QuestionContentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(QuestionContentType left, QuestionContentType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator QuestionContentType(string value) => new QuestionContentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is QuestionContentType other && Equals(other); + /// + public bool Equals(QuestionContentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionType.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionType.cs new file mode 100644 index 0000000000000..d15407ed224a0 --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/QuestionType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + /// Text Input. Will be a single line input. + public readonly partial struct QuestionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public QuestionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RadioButtonValue = "RadioButton"; + private const string DropdownValue = "Dropdown"; + private const string TextInputValue = "TextInput"; + private const string MultiLineInfoBoxValue = "MultiLineInfoBox"; + + /// SingleChoice radio button. + public static QuestionType RadioButton { get; } = new QuestionType(RadioButtonValue); + /// SingleChoice dropdown. + public static QuestionType Dropdown { get; } = new QuestionType(DropdownValue); + /// Text Input. + public static QuestionType TextInput { get; } = new QuestionType(TextInputValue); + /// MultiLineInfoBox. + public static QuestionType MultiLineInfoBox { get; } = new QuestionType(MultiLineInfoBoxValue); + /// Determines if two values are the same. + public static bool operator ==(QuestionType left, QuestionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(QuestionType left, QuestionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator QuestionType(string value) => new QuestionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is QuestionType other && Equals(other); + /// + public bool Equals(QuestionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ReplacementMaps.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ReplacementMaps.Serialization.cs new file mode 100644 index 0000000000000..40fa5284c77ed --- /dev/null +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/Models/ReplacementMaps.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SelfHelp.Models +{ + public partial class ReplacementMaps : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(WebResults)) + { + writer.WritePropertyName("webResults"u8); + writer.WriteStartArray(); + foreach (var item in WebResults) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Diagnostics)) + { + writer.WritePropertyName("diagnostics"u8); + writer.WriteStartArray(); + foreach (var item in Diagnostics) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Troubleshooters)) + { + writer.WritePropertyName("troubleshooters"u8); + writer.WriteStartArray(); + foreach (var item in Troubleshooters) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MetricsBasedCharts)) + { + writer.WritePropertyName("metricsBasedCharts"u8); + writer.WriteStartArray(); + foreach (var item in MetricsBasedCharts) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Videos)) + { + writer.WritePropertyName("videos"u8); + writer.WriteStartArray(); + foreach (var item in Videos) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(VideoGroups)) + { + writer.WritePropertyName("videoGroups"u8); + writer.WriteStartArray(); + foreach (var item in VideoGroups) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static ReplacementMaps DeserializeReplacementMaps(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> webResults = default; + Optional> diagnostics = default; + Optional> troubleshooters = default; + Optional> metricsBasedCharts = default; + Optional> videos = default; + Optional> videoGroups = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("webResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebResult.DeserializeWebResult(item)); + } + webResults = array; + continue; + } + if (property.NameEquals("diagnostics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SolutionsDiagnostic.DeserializeSolutionsDiagnostic(item)); + } + diagnostics = array; + continue; + } + if (property.NameEquals("troubleshooters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SolutionsTroubleshooters.DeserializeSolutionsTroubleshooters(item)); + } + troubleshooters = array; + continue; + } + if (property.NameEquals("metricsBasedCharts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetricsBasedChart.DeserializeMetricsBasedChart(item)); + } + metricsBasedCharts = array; + continue; + } + if (property.NameEquals("videos"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List