-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathSelfHelpExtensions.cs
77 lines (73 loc) · 5.8 KB
/
SelfHelpExtensions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#nullable disable
using System;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.SelfHelp.Mocking;
using Azure.ResourceManager.SelfHelp.Models;
namespace Azure.ResourceManager.SelfHelp
{
public static partial class SelfHelpExtensions
{
/// <summary>
/// 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.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/{scope}/providers/Microsoft.Help/discoverySolutions</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>DiscoverySolution_List</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-09-01-preview</description>
/// </item>
/// </list>
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="scope"> The scope that the resource will apply against. </param>
/// <param name="filter"> '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'. </param>
/// <param name="skiptoken"> Skiptoken is only used if a previous operation returned a partial result. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
[EditorBrowsable(EditorBrowsableState.Never)]
public static Pageable<SelfHelpSolutionMetadata> GetSelfHelpDiscoverySolutions(this ArmClient client, ResourceIdentifier scope, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default)
{
return GetMockableSelfHelpArmClient(client).GetSelfHelpDiscoverySolutions(scope, filter, skiptoken, cancellationToken);
}
/// <summary>
/// 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.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/{scope}/providers/Microsoft.Help/discoverySolutions</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>DiscoverySolution_List</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-09-01-preview</description>
/// </item>
/// </list>
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="scope"> The scope that the resource will apply against. </param>
/// <param name="filter"> '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'. </param>
/// <param name="skiptoken"> Skiptoken is only used if a previous operation returned a partial result. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
[EditorBrowsable(EditorBrowsableState.Never)]
public static AsyncPageable<SelfHelpSolutionMetadata> GetSelfHelpDiscoverySolutionsAsync(this ArmClient client, ResourceIdentifier scope, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default)
{
return GetMockableSelfHelpArmClient(client).GetSelfHelpDiscoverySolutionsAsync(scope, filter, skiptoken, cancellationToken);
}
}
}