@azure/arm-selfhelp 1.0.1-alpha.20231023.1 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +92 -8
  2. package/README.md +2 -2
  3. package/dist/index.js +2043 -379
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/checkNameAvailabilityPostSample.d.ts +2 -0
  8. package/dist-esm/samples-dev/checkNameAvailabilityPostSample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/{diagnosticsCheckNameAvailabilitySample.js → checkNameAvailabilityPostSample.js} +9 -9
  10. package/dist-esm/samples-dev/checkNameAvailabilityPostSample.js.map +1 -0
  11. package/dist-esm/samples-dev/diagnosticsCreateSample.js +5 -14
  12. package/dist-esm/samples-dev/diagnosticsCreateSample.js.map +1 -1
  13. package/dist-esm/samples-dev/diagnosticsGetSample.js +2 -2
  14. package/dist-esm/samples-dev/discoverySolutionListSample.js +42 -6
  15. package/dist-esm/samples-dev/discoverySolutionListSample.js.map +1 -1
  16. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  17. package/dist-esm/samples-dev/solutionCreateSample.d.ts +2 -0
  18. package/dist-esm/samples-dev/solutionCreateSample.d.ts.map +1 -0
  19. package/dist-esm/samples-dev/solutionCreateSample.js +46 -0
  20. package/dist-esm/samples-dev/solutionCreateSample.js.map +1 -0
  21. package/dist-esm/samples-dev/solutionGetSample.d.ts +2 -0
  22. package/dist-esm/samples-dev/solutionGetSample.d.ts.map +1 -0
  23. package/dist-esm/samples-dev/solutionGetSample.js +37 -0
  24. package/dist-esm/samples-dev/solutionGetSample.js.map +1 -0
  25. package/dist-esm/samples-dev/solutionUpdateSample.d.ts +2 -0
  26. package/dist-esm/samples-dev/solutionUpdateSample.d.ts.map +1 -0
  27. package/dist-esm/samples-dev/solutionUpdateSample.js +37 -0
  28. package/dist-esm/samples-dev/solutionUpdateSample.js.map +1 -0
  29. package/dist-esm/samples-dev/troubleshootersContinueSample.d.ts +2 -0
  30. package/dist-esm/samples-dev/troubleshootersContinueSample.d.ts.map +1 -0
  31. package/dist-esm/samples-dev/troubleshootersContinueSample.js +50 -0
  32. package/dist-esm/samples-dev/troubleshootersContinueSample.js.map +1 -0
  33. package/dist-esm/samples-dev/troubleshootersCreateSample.d.ts +2 -0
  34. package/dist-esm/samples-dev/troubleshootersCreateSample.d.ts.map +1 -0
  35. package/dist-esm/samples-dev/troubleshootersCreateSample.js +46 -0
  36. package/dist-esm/samples-dev/troubleshootersCreateSample.js.map +1 -0
  37. package/dist-esm/samples-dev/troubleshootersEndSample.d.ts +2 -0
  38. package/dist-esm/samples-dev/troubleshootersEndSample.d.ts.map +1 -0
  39. package/dist-esm/samples-dev/troubleshootersEndSample.js +37 -0
  40. package/dist-esm/samples-dev/troubleshootersEndSample.js.map +1 -0
  41. package/dist-esm/samples-dev/troubleshootersGetSample.d.ts +2 -0
  42. package/dist-esm/samples-dev/troubleshootersGetSample.d.ts.map +1 -0
  43. package/dist-esm/samples-dev/troubleshootersGetSample.js +37 -0
  44. package/dist-esm/samples-dev/troubleshootersGetSample.js.map +1 -0
  45. package/dist-esm/samples-dev/troubleshootersRestartSample.d.ts +2 -0
  46. package/dist-esm/samples-dev/troubleshootersRestartSample.d.ts.map +1 -0
  47. package/dist-esm/samples-dev/troubleshootersRestartSample.js +37 -0
  48. package/dist-esm/samples-dev/troubleshootersRestartSample.js.map +1 -0
  49. package/dist-esm/src/helpRP.d.ts +4 -1
  50. package/dist-esm/src/helpRP.d.ts.map +1 -1
  51. package/dist-esm/src/helpRP.js +6 -3
  52. package/dist-esm/src/helpRP.js.map +1 -1
  53. package/dist-esm/src/models/index.d.ts +641 -22
  54. package/dist-esm/src/models/index.d.ts.map +1 -1
  55. package/dist-esm/src/models/index.js +140 -8
  56. package/dist-esm/src/models/index.js.map +1 -1
  57. package/dist-esm/src/models/mappers.d.ts +30 -0
  58. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  59. package/dist-esm/src/models/mappers.js +988 -13
  60. package/dist-esm/src/models/mappers.js.map +1 -1
  61. package/dist-esm/src/models/parameters.d.ts +6 -0
  62. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  63. package/dist-esm/src/models/parameters.js +48 -2
  64. package/dist-esm/src/models/parameters.js.map +1 -1
  65. package/dist-esm/src/operations/checkNameAvailability.d.ts +21 -0
  66. package/dist-esm/src/operations/checkNameAvailability.d.ts.map +1 -0
  67. package/dist-esm/src/operations/checkNameAvailability.js +51 -0
  68. package/dist-esm/src/operations/checkNameAvailability.js.map +1 -0
  69. package/dist-esm/src/operations/diagnostics.d.ts +11 -18
  70. package/dist-esm/src/operations/diagnostics.d.ts.map +1 -1
  71. package/dist-esm/src/operations/diagnostics.js +10 -37
  72. package/dist-esm/src/operations/diagnostics.js.map +1 -1
  73. package/dist-esm/src/operations/discoverySolution.d.ts +20 -14
  74. package/dist-esm/src/operations/discoverySolution.d.ts.map +1 -1
  75. package/dist-esm/src/operations/discoverySolution.js +20 -14
  76. package/dist-esm/src/operations/discoverySolution.js.map +1 -1
  77. package/dist-esm/src/operations/index.d.ts +3 -0
  78. package/dist-esm/src/operations/index.d.ts.map +1 -1
  79. package/dist-esm/src/operations/index.js +3 -0
  80. package/dist-esm/src/operations/index.js.map +1 -1
  81. package/dist-esm/src/operations/solution.d.ts +78 -0
  82. package/dist-esm/src/operations/solution.d.ts.map +1 -0
  83. package/dist-esm/src/operations/solution.js +262 -0
  84. package/dist-esm/src/operations/solution.js.map +1 -0
  85. package/dist-esm/src/operations/troubleshooters.d.ts +70 -0
  86. package/dist-esm/src/operations/troubleshooters.d.ts.map +1 -0
  87. package/dist-esm/src/operations/troubleshooters.js +198 -0
  88. package/dist-esm/src/operations/troubleshooters.js.map +1 -0
  89. package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts +13 -0
  90. package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts.map +1 -0
  91. package/dist-esm/src/operationsInterfaces/checkNameAvailability.js +9 -0
  92. package/dist-esm/src/operationsInterfaces/checkNameAvailability.js.map +1 -0
  93. package/dist-esm/src/operationsInterfaces/diagnostics.d.ts +11 -18
  94. package/dist-esm/src/operationsInterfaces/diagnostics.d.ts.map +1 -1
  95. package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts +10 -7
  96. package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts.map +1 -1
  97. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
  98. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  99. package/dist-esm/src/operationsInterfaces/index.js +3 -0
  100. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  101. package/dist-esm/src/operationsInterfaces/solution.d.ts +70 -0
  102. package/dist-esm/src/operationsInterfaces/solution.d.ts.map +1 -0
  103. package/dist-esm/src/operationsInterfaces/solution.js +9 -0
  104. package/dist-esm/src/operationsInterfaces/solution.js.map +1 -0
  105. package/dist-esm/src/operationsInterfaces/troubleshooters.d.ts +62 -0
  106. package/dist-esm/src/operationsInterfaces/troubleshooters.d.ts.map +1 -0
  107. package/dist-esm/src/operationsInterfaces/troubleshooters.js +9 -0
  108. package/dist-esm/src/operationsInterfaces/troubleshooters.js.map +1 -0
  109. package/dist-esm/test/selfhelp_operations_test.spec.js +2 -12
  110. package/dist-esm/test/selfhelp_operations_test.spec.js.map +1 -1
  111. package/package.json +6 -6
  112. package/review/arm-selfhelp.api.md +469 -17
  113. package/src/helpRP.ts +16 -4
  114. package/src/models/index.ts +712 -22
  115. package/src/models/mappers.ts +1024 -13
  116. package/src/models/parameters.ts +58 -2
  117. package/src/operations/checkNameAvailability.ts +68 -0
  118. package/src/operations/diagnostics.ts +10 -46
  119. package/src/operations/discoverySolution.ts +20 -14
  120. package/src/operations/index.ts +3 -0
  121. package/src/operations/solution.ts +349 -0
  122. package/src/operations/troubleshooters.ts +261 -0
  123. package/src/operationsInterfaces/checkNameAvailability.ts +27 -0
  124. package/src/operationsInterfaces/diagnostics.ts +10 -22
  125. package/src/operationsInterfaces/discoverySolution.ts +10 -7
  126. package/src/operationsInterfaces/index.ts +3 -0
  127. package/src/operationsInterfaces/solution.ts +115 -0
  128. package/src/operationsInterfaces/troubleshooters.ts +101 -0
  129. package/types/arm-selfhelp.d.ts +892 -63
  130. package/dist-esm/samples-dev/diagnosticsCheckNameAvailabilitySample.d.ts +0 -2
  131. package/dist-esm/samples-dev/diagnosticsCheckNameAvailabilitySample.d.ts.map +0 -1
  132. package/dist-esm/samples-dev/diagnosticsCheckNameAvailabilitySample.js.map +0 -1
@@ -0,0 +1,78 @@
1
+ import { Solution } from "../operationsInterfaces";
2
+ import { HelpRP } from "../helpRP";
3
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
4
+ import { SolutionCreateOptionalParams, SolutionCreateResponse, SolutionGetOptionalParams, SolutionGetResponse, SolutionUpdateOptionalParams, SolutionUpdateResponse } from "../models";
5
+ /** Class containing Solution operations. */
6
+ export declare class SolutionImpl implements Solution {
7
+ private readonly client;
8
+ /**
9
+ * Initialize a new instance of the class Solution class.
10
+ * @param client Reference to the service client
11
+ */
12
+ constructor(client: HelpRP);
13
+ /**
14
+ * Creates a solution for the specific Azure resource or subscription using the triggering criteria
15
+ * ‘solutionId and requiredInputs’ from discovery solutions.<br/> Solutions are a rich, insightful and
16
+ * a centralized self help experience that brings all the relevant content to troubleshoot an Azure
17
+ * issue into a unified experience. Solutions include the following components : Text, Diagnostics ,
18
+ * Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with
19
+ * capabilities to support new solutions types in the future. Each solution type may require one or
20
+ * more ‘requiredParameters’ that are required to execute the individual solution component. In the
21
+ * absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution,
22
+ * and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. ‘requiredInputs’ from
23
+ * Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
24
+ * <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in
25
+ * the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions response is the same as
26
+ * ‘properties.parameters’ in the request for Troubleshooters
27
+ * @param scope This is an extension resource provider and only resource level extension is supported
28
+ * at the moment.
29
+ * @param solutionResourceName Solution resource Name.
30
+ * @param options The options parameters.
31
+ */
32
+ beginCreate(scope: string, solutionResourceName: string, options?: SolutionCreateOptionalParams): Promise<SimplePollerLike<OperationState<SolutionCreateResponse>, SolutionCreateResponse>>;
33
+ /**
34
+ * Creates a solution for the specific Azure resource or subscription using the triggering criteria
35
+ * ‘solutionId and requiredInputs’ from discovery solutions.<br/> Solutions are a rich, insightful and
36
+ * a centralized self help experience that brings all the relevant content to troubleshoot an Azure
37
+ * issue into a unified experience. Solutions include the following components : Text, Diagnostics ,
38
+ * Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with
39
+ * capabilities to support new solutions types in the future. Each solution type may require one or
40
+ * more ‘requiredParameters’ that are required to execute the individual solution component. In the
41
+ * absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution,
42
+ * and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. ‘requiredInputs’ from
43
+ * Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
44
+ * <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in
45
+ * the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions response is the same as
46
+ * ‘properties.parameters’ in the request for Troubleshooters
47
+ * @param scope This is an extension resource provider and only resource level extension is supported
48
+ * at the moment.
49
+ * @param solutionResourceName Solution resource Name.
50
+ * @param options The options parameters.
51
+ */
52
+ beginCreateAndWait(scope: string, solutionResourceName: string, options?: SolutionCreateOptionalParams): Promise<SolutionCreateResponse>;
53
+ /**
54
+ * Get the solution using the applicable solutionResourceName while creating the solution.
55
+ * @param scope This is an extension resource provider and only resource level extension is supported
56
+ * at the moment.
57
+ * @param solutionResourceName Solution resource Name.
58
+ * @param options The options parameters.
59
+ */
60
+ get(scope: string, solutionResourceName: string, options?: SolutionGetOptionalParams): Promise<SolutionGetResponse>;
61
+ /**
62
+ * Update the requiredInputs or additional information needed to execute the solution
63
+ * @param scope This is an extension resource provider and only resource level extension is supported
64
+ * at the moment.
65
+ * @param solutionResourceName Solution resource Name.
66
+ * @param options The options parameters.
67
+ */
68
+ beginUpdate(scope: string, solutionResourceName: string, options?: SolutionUpdateOptionalParams): Promise<SimplePollerLike<OperationState<SolutionUpdateResponse>, SolutionUpdateResponse>>;
69
+ /**
70
+ * Update the requiredInputs or additional information needed to execute the solution
71
+ * @param scope This is an extension resource provider and only resource level extension is supported
72
+ * at the moment.
73
+ * @param solutionResourceName Solution resource Name.
74
+ * @param options The options parameters.
75
+ */
76
+ beginUpdateAndWait(scope: string, solutionResourceName: string, options?: SolutionUpdateOptionalParams): Promise<SolutionUpdateResponse>;
77
+ }
78
+ //# sourceMappingURL=solution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solution.d.ts","sourceRoot":"","sources":["../../../src/operations/solution.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,WAAW,CAAC;AAEnB,4CAA4C;AAC5C,qBAAa,YAAa,YAAW,QAAQ;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;;OAGG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;;;;OAkBG;IACG,WAAW,CACf,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,MAAM,EAC5B,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CACR,gBAAgB,CACd,cAAc,CAAC,sBAAsB,CAAC,EACtC,sBAAsB,CACvB,CACF;IAyDD;;;;;;;;;;;;;;;;;;OAkBG;IACG,kBAAkB,CACtB,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,MAAM,EAC5B,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,sBAAsB,CAAC;IAKlC;;;;;;OAMG;IACH,GAAG,CACD,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,MAAM,EAC5B,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,mBAAmB,CAAC;IAO/B;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,MAAM,EAC5B,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CACR,gBAAgB,CACd,cAAc,CAAC,sBAAsB,CAAC,EACtC,sBAAsB,CACvB,CACF;IAyDD;;;;;;OAMG;IACG,kBAAkB,CACtB,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,MAAM,EAC5B,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,sBAAsB,CAAC;CAInC"}
@@ -0,0 +1,262 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as Mappers from "../models/mappers";
11
+ import * as Parameters from "../models/parameters";
12
+ import { createHttpPoller } from "@azure/core-lro";
13
+ import { createLroSpec } from "../lroImpl";
14
+ /** Class containing Solution operations. */
15
+ export class SolutionImpl {
16
+ /**
17
+ * Initialize a new instance of the class Solution class.
18
+ * @param client Reference to the service client
19
+ */
20
+ constructor(client) {
21
+ this.client = client;
22
+ }
23
+ /**
24
+ * Creates a solution for the specific Azure resource or subscription using the triggering criteria
25
+ * ‘solutionId and requiredInputs’ from discovery solutions.<br/> Solutions are a rich, insightful and
26
+ * a centralized self help experience that brings all the relevant content to troubleshoot an Azure
27
+ * issue into a unified experience. Solutions include the following components : Text, Diagnostics ,
28
+ * Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with
29
+ * capabilities to support new solutions types in the future. Each solution type may require one or
30
+ * more ‘requiredParameters’ that are required to execute the individual solution component. In the
31
+ * absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution,
32
+ * and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. ‘requiredInputs’ from
33
+ * Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
34
+ * <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in
35
+ * the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions response is the same as
36
+ * ‘properties.parameters’ in the request for Troubleshooters
37
+ * @param scope This is an extension resource provider and only resource level extension is supported
38
+ * at the moment.
39
+ * @param solutionResourceName Solution resource Name.
40
+ * @param options The options parameters.
41
+ */
42
+ beginCreate(scope, solutionResourceName, options) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
45
+ return this.client.sendOperationRequest(args, spec);
46
+ });
47
+ const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
48
+ var _a;
49
+ let currentRawResponse = undefined;
50
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
51
+ const callback = (rawResponse, flatResponse) => {
52
+ currentRawResponse = rawResponse;
53
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
54
+ };
55
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
56
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
57
+ return {
58
+ flatResponse,
59
+ rawResponse: {
60
+ statusCode: currentRawResponse.status,
61
+ body: currentRawResponse.parsedBody,
62
+ headers: currentRawResponse.headers.toJSON()
63
+ }
64
+ };
65
+ });
66
+ const lro = createLroSpec({
67
+ sendOperationFn,
68
+ args: { scope, solutionResourceName, options },
69
+ spec: createOperationSpec
70
+ });
71
+ const poller = yield createHttpPoller(lro, {
72
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
73
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
74
+ resourceLocationConfig: "azure-async-operation"
75
+ });
76
+ yield poller.poll();
77
+ return poller;
78
+ });
79
+ }
80
+ /**
81
+ * Creates a solution for the specific Azure resource or subscription using the triggering criteria
82
+ * ‘solutionId and requiredInputs’ from discovery solutions.<br/> Solutions are a rich, insightful and
83
+ * a centralized self help experience that brings all the relevant content to troubleshoot an Azure
84
+ * issue into a unified experience. Solutions include the following components : Text, Diagnostics ,
85
+ * Troubleshooters, Images , Video tutorials, Tables , custom charts, images , AzureKB, etc, with
86
+ * capabilities to support new solutions types in the future. Each solution type may require one or
87
+ * more ‘requiredParameters’ that are required to execute the individual solution component. In the
88
+ * absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution,
89
+ * and you might see an empty response. <br/><br/> <b>Note:</b> <br/>1. ‘requiredInputs’ from
90
+ * Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
91
+ * <br/>2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in
92
+ * the request for diagnostics <br/>3. ‘requiredParameters’ from the Solutions response is the same as
93
+ * ‘properties.parameters’ in the request for Troubleshooters
94
+ * @param scope This is an extension resource provider and only resource level extension is supported
95
+ * at the moment.
96
+ * @param solutionResourceName Solution resource Name.
97
+ * @param options The options parameters.
98
+ */
99
+ beginCreateAndWait(scope, solutionResourceName, options) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ const poller = yield this.beginCreate(scope, solutionResourceName, options);
102
+ return poller.pollUntilDone();
103
+ });
104
+ }
105
+ /**
106
+ * Get the solution using the applicable solutionResourceName while creating the solution.
107
+ * @param scope This is an extension resource provider and only resource level extension is supported
108
+ * at the moment.
109
+ * @param solutionResourceName Solution resource Name.
110
+ * @param options The options parameters.
111
+ */
112
+ get(scope, solutionResourceName, options) {
113
+ return this.client.sendOperationRequest({ scope, solutionResourceName, options }, getOperationSpec);
114
+ }
115
+ /**
116
+ * Update the requiredInputs or additional information needed to execute the solution
117
+ * @param scope This is an extension resource provider and only resource level extension is supported
118
+ * at the moment.
119
+ * @param solutionResourceName Solution resource Name.
120
+ * @param options The options parameters.
121
+ */
122
+ beginUpdate(scope, solutionResourceName, options) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
125
+ return this.client.sendOperationRequest(args, spec);
126
+ });
127
+ const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
128
+ var _a;
129
+ let currentRawResponse = undefined;
130
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
131
+ const callback = (rawResponse, flatResponse) => {
132
+ currentRawResponse = rawResponse;
133
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
134
+ };
135
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
136
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
137
+ return {
138
+ flatResponse,
139
+ rawResponse: {
140
+ statusCode: currentRawResponse.status,
141
+ body: currentRawResponse.parsedBody,
142
+ headers: currentRawResponse.headers.toJSON()
143
+ }
144
+ };
145
+ });
146
+ const lro = createLroSpec({
147
+ sendOperationFn,
148
+ args: { scope, solutionResourceName, options },
149
+ spec: updateOperationSpec
150
+ });
151
+ const poller = yield createHttpPoller(lro, {
152
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
153
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
154
+ resourceLocationConfig: "azure-async-operation"
155
+ });
156
+ yield poller.poll();
157
+ return poller;
158
+ });
159
+ }
160
+ /**
161
+ * Update the requiredInputs or additional information needed to execute the solution
162
+ * @param scope This is an extension resource provider and only resource level extension is supported
163
+ * at the moment.
164
+ * @param solutionResourceName Solution resource Name.
165
+ * @param options The options parameters.
166
+ */
167
+ beginUpdateAndWait(scope, solutionResourceName, options) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const poller = yield this.beginUpdate(scope, solutionResourceName, options);
170
+ return poller.pollUntilDone();
171
+ });
172
+ }
173
+ }
174
+ // Operation Specifications
175
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
176
+ const createOperationSpec = {
177
+ path: "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}",
178
+ httpMethod: "PUT",
179
+ responses: {
180
+ 200: {
181
+ bodyMapper: Mappers.SolutionResource
182
+ },
183
+ 201: {
184
+ bodyMapper: Mappers.SolutionResource
185
+ },
186
+ 202: {
187
+ bodyMapper: Mappers.SolutionResource
188
+ },
189
+ 204: {
190
+ bodyMapper: Mappers.SolutionResource
191
+ },
192
+ default: {
193
+ bodyMapper: Mappers.ErrorResponse
194
+ }
195
+ },
196
+ requestBody: Parameters.solutionRequestBody,
197
+ queryParameters: [Parameters.apiVersion],
198
+ urlParameters: [
199
+ Parameters.$host,
200
+ Parameters.scope,
201
+ Parameters.solutionResourceName
202
+ ],
203
+ headerParameters: [Parameters.accept, Parameters.contentType],
204
+ mediaType: "json",
205
+ serializer
206
+ };
207
+ const getOperationSpec = {
208
+ path: "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}",
209
+ httpMethod: "GET",
210
+ responses: {
211
+ 200: {
212
+ bodyMapper: Mappers.SolutionResource
213
+ },
214
+ default: {
215
+ bodyMapper: Mappers.ErrorResponse
216
+ }
217
+ },
218
+ queryParameters: [Parameters.apiVersion],
219
+ urlParameters: [
220
+ Parameters.$host,
221
+ Parameters.scope,
222
+ Parameters.solutionResourceName
223
+ ],
224
+ headerParameters: [Parameters.accept],
225
+ serializer
226
+ };
227
+ const updateOperationSpec = {
228
+ path: "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}",
229
+ httpMethod: "PATCH",
230
+ responses: {
231
+ 200: {
232
+ bodyMapper: Mappers.SolutionResource,
233
+ headersMapper: Mappers.SolutionUpdateHeaders
234
+ },
235
+ 201: {
236
+ bodyMapper: Mappers.SolutionResource,
237
+ headersMapper: Mappers.SolutionUpdateHeaders
238
+ },
239
+ 202: {
240
+ bodyMapper: Mappers.SolutionResource,
241
+ headersMapper: Mappers.SolutionUpdateHeaders
242
+ },
243
+ 204: {
244
+ bodyMapper: Mappers.SolutionResource,
245
+ headersMapper: Mappers.SolutionUpdateHeaders
246
+ },
247
+ default: {
248
+ bodyMapper: Mappers.ErrorResponse
249
+ }
250
+ },
251
+ requestBody: Parameters.solutionPatchRequestBody,
252
+ queryParameters: [Parameters.apiVersion],
253
+ urlParameters: [
254
+ Parameters.$host,
255
+ Parameters.scope,
256
+ Parameters.solutionResourceName
257
+ ],
258
+ headerParameters: [Parameters.accept, Parameters.contentType],
259
+ mediaType: "json",
260
+ serializer
261
+ };
262
+ //# sourceMappingURL=solution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solution.js","sourceRoot":"","sources":["../../../src/operations/solution.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAGL,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAU3C,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,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AC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,oEAAoE;IAC1E,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;YACpC,aAAa,EAAE,OAAO,CAAC,qBAAqB;SAC7C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;YACpC,aAAa,EAAE,OAAO,CAAC,qBAAqB;SAC7C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;YACpC,aAAa,EAAE,OAAO,CAAC,qBAAqB;SAC7C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;YACpC,aAAa,EAAE,OAAO,CAAC,qBAAqB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,wBAAwB;IAChD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,oBAAoB;KAChC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { Troubleshooters } from "../operationsInterfaces";
2
+ import { HelpRP } from "../helpRP";
3
+ import { TroubleshootersCreateOptionalParams, TroubleshootersCreateResponse, TroubleshootersGetOptionalParams, TroubleshootersGetResponse, TroubleshootersContinueOptionalParams, TroubleshootersContinueResponse, TroubleshootersEndOptionalParams, TroubleshootersEndResponse, TroubleshootersRestartOptionalParams, TroubleshootersRestartResponse } from "../models";
4
+ /** Class containing Troubleshooters operations. */
5
+ export declare class TroubleshootersImpl implements Troubleshooters {
6
+ private readonly client;
7
+ /**
8
+ * Initialize a new instance of the class Troubleshooters class.
9
+ * @param client Reference to the service client
10
+ */
11
+ constructor(client: HelpRP);
12
+ /**
13
+ * Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’
14
+ * and ‘properties.parameters’ as the trigger. <br/> Troubleshooters are step-by-step interactive
15
+ * guidance that scope the problem by collecting additional inputs from you in each stage while
16
+ * troubleshooting an Azure issue. You will be guided down decision tree style workflow and the best
17
+ * possible solution will be presented at the end of the workflow. <br/> Create API creates the
18
+ * Troubleshooter API using ‘parameters’ and ‘solutionId’ <br/> After creating the Troubleshooter
19
+ * instance, the following APIs can be used:<br/> CONTINUE API: to move to the next step in the flow
20
+ * <br/>GET API: to identify the next step after executing the CONTINUE API. <br/><br/> <b>Note:</b>
21
+ * ‘requiredParameters’ from solutions response must be passed via ‘properties. parameters’ in the
22
+ * request body of Troubleshooters API.
23
+ * @param scope This is an extension resource provider and only resource level extension is supported
24
+ * at the moment.
25
+ * @param troubleshooterName Troubleshooter resource Name.
26
+ * @param options The options parameters.
27
+ */
28
+ create(scope: string, troubleshooterName: string, options?: TroubleshootersCreateOptionalParams): Promise<TroubleshootersCreateResponse>;
29
+ /**
30
+ * Gets troubleshooter instance result which includes the step status/result of the troubleshooter
31
+ * resource name that is being executed.<br/> Get API is used to retrieve the result of a
32
+ * Troubleshooter instance, which includes the status and result of each step in the Troubleshooter
33
+ * workflow. This API requires the Troubleshooter resource name that was created using the Create API.
34
+ * @param scope This is an extension resource provider and only resource level extension is supported
35
+ * at the moment.
36
+ * @param troubleshooterName Troubleshooter resource Name.
37
+ * @param options The options parameters.
38
+ */
39
+ get(scope: string, troubleshooterName: string, options?: TroubleshootersGetOptionalParams): Promise<TroubleshootersGetResponse>;
40
+ /**
41
+ * Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the
42
+ * respective troubleshooter resource name. <br/>Continue API is used to provide inputs that are
43
+ * required for the specific troubleshooter to progress into the next step in the process. This API is
44
+ * used after the Troubleshooter has been created using the Create API.
45
+ * @param scope This is an extension resource provider and only resource level extension is supported
46
+ * at the moment.
47
+ * @param troubleshooterName Troubleshooter resource Name.
48
+ * @param options The options parameters.
49
+ */
50
+ continue(scope: string, troubleshooterName: string, options?: TroubleshootersContinueOptionalParams): Promise<TroubleshootersContinueResponse>;
51
+ /**
52
+ * Ends the troubleshooter action
53
+ * @param scope This is an extension resource provider and only resource level extension is supported
54
+ * at the moment.
55
+ * @param troubleshooterName Troubleshooter resource Name.
56
+ * @param options The options parameters.
57
+ */
58
+ end(scope: string, troubleshooterName: string, options?: TroubleshootersEndOptionalParams): Promise<TroubleshootersEndResponse>;
59
+ /**
60
+ * Restarts the troubleshooter API using applicable troubleshooter resource name as the input.<br/> It
61
+ * returns new resource name which should be used in subsequent request. The old resource name is
62
+ * obsolete after this API is invoked.
63
+ * @param scope This is an extension resource provider and only resource level extension is supported
64
+ * at the moment.
65
+ * @param troubleshooterName Troubleshooter resource Name.
66
+ * @param options The options parameters.
67
+ */
68
+ restart(scope: string, troubleshooterName: string, options?: TroubleshootersRestartOptionalParams): Promise<TroubleshootersRestartResponse>;
69
+ }
70
+ //# sourceMappingURL=troubleshooters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"troubleshooters.d.ts","sourceRoot":"","sources":["../../../src/operations/troubleshooters.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,gCAAgC,EAChC,0BAA0B,EAC1B,qCAAqC,EACrC,+BAA+B,EAC/B,gCAAgC,EAChC,0BAA0B,EAC1B,oCAAoC,EACpC,8BAA8B,EAC/B,MAAM,WAAW,CAAC;AAEnB,mDAAmD;AACnD,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;;OAGG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,KAAK,EAAE,MAAM,EACb,kBAAkB,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,mCAAmC,GAC5C,OAAO,CAAC,6BAA6B,CAAC;IAOzC;;;;;;;;;OASG;IACH,GAAG,CACD,KAAK,EAAE,MAAM,EACb,kBAAkB,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC;IAOtC;;;;;;;;;OASG;IACH,QAAQ,CACN,KAAK,EAAE,MAAM,EACb,kBAAkB,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,qCAAqC,GAC9C,OAAO,CAAC,+BAA+B,CAAC;IAO3C;;;;;;OAMG;IACH,GAAG,CACD,KAAK,EAAE,MAAM,EACb,kBAAkB,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC;IAOtC;;;;;;;;OAQG;IACH,OAAO,CACL,KAAK,EAAE,MAAM,EACb,kBAAkB,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,oCAAoC,GAC7C,OAAO,CAAC,8BAA8B,CAAC;CAM3C"}
@@ -0,0 +1,198 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import * as coreClient from "@azure/core-client";
9
+ import * as Mappers from "../models/mappers";
10
+ import * as Parameters from "../models/parameters";
11
+ /** Class containing Troubleshooters operations. */
12
+ export class TroubleshootersImpl {
13
+ /**
14
+ * Initialize a new instance of the class Troubleshooters class.
15
+ * @param client Reference to the service client
16
+ */
17
+ constructor(client) {
18
+ this.client = client;
19
+ }
20
+ /**
21
+ * Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’
22
+ * and ‘properties.parameters’ as the trigger. <br/> Troubleshooters are step-by-step interactive
23
+ * guidance that scope the problem by collecting additional inputs from you in each stage while
24
+ * troubleshooting an Azure issue. You will be guided down decision tree style workflow and the best
25
+ * possible solution will be presented at the end of the workflow. <br/> Create API creates the
26
+ * Troubleshooter API using ‘parameters’ and ‘solutionId’ <br/> After creating the Troubleshooter
27
+ * instance, the following APIs can be used:<br/> CONTINUE API: to move to the next step in the flow
28
+ * <br/>GET API: to identify the next step after executing the CONTINUE API. <br/><br/> <b>Note:</b>
29
+ * ‘requiredParameters’ from solutions response must be passed via ‘properties. parameters’ in the
30
+ * request body of Troubleshooters API.
31
+ * @param scope This is an extension resource provider and only resource level extension is supported
32
+ * at the moment.
33
+ * @param troubleshooterName Troubleshooter resource Name.
34
+ * @param options The options parameters.
35
+ */
36
+ create(scope, troubleshooterName, options) {
37
+ return this.client.sendOperationRequest({ scope, troubleshooterName, options }, createOperationSpec);
38
+ }
39
+ /**
40
+ * Gets troubleshooter instance result which includes the step status/result of the troubleshooter
41
+ * resource name that is being executed.<br/> Get API is used to retrieve the result of a
42
+ * Troubleshooter instance, which includes the status and result of each step in the Troubleshooter
43
+ * workflow. This API requires the Troubleshooter resource name that was created using the Create API.
44
+ * @param scope This is an extension resource provider and only resource level extension is supported
45
+ * at the moment.
46
+ * @param troubleshooterName Troubleshooter resource Name.
47
+ * @param options The options parameters.
48
+ */
49
+ get(scope, troubleshooterName, options) {
50
+ return this.client.sendOperationRequest({ scope, troubleshooterName, options }, getOperationSpec);
51
+ }
52
+ /**
53
+ * Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the
54
+ * respective troubleshooter resource name. <br/>Continue API is used to provide inputs that are
55
+ * required for the specific troubleshooter to progress into the next step in the process. This API is
56
+ * used after the Troubleshooter has been created using the Create API.
57
+ * @param scope This is an extension resource provider and only resource level extension is supported
58
+ * at the moment.
59
+ * @param troubleshooterName Troubleshooter resource Name.
60
+ * @param options The options parameters.
61
+ */
62
+ continue(scope, troubleshooterName, options) {
63
+ return this.client.sendOperationRequest({ scope, troubleshooterName, options }, continueOperationSpec);
64
+ }
65
+ /**
66
+ * Ends the troubleshooter action
67
+ * @param scope This is an extension resource provider and only resource level extension is supported
68
+ * at the moment.
69
+ * @param troubleshooterName Troubleshooter resource Name.
70
+ * @param options The options parameters.
71
+ */
72
+ end(scope, troubleshooterName, options) {
73
+ return this.client.sendOperationRequest({ scope, troubleshooterName, options }, endOperationSpec);
74
+ }
75
+ /**
76
+ * Restarts the troubleshooter API using applicable troubleshooter resource name as the input.<br/> It
77
+ * returns new resource name which should be used in subsequent request. The old resource name is
78
+ * obsolete after this API is invoked.
79
+ * @param scope This is an extension resource provider and only resource level extension is supported
80
+ * at the moment.
81
+ * @param troubleshooterName Troubleshooter resource Name.
82
+ * @param options The options parameters.
83
+ */
84
+ restart(scope, troubleshooterName, options) {
85
+ return this.client.sendOperationRequest({ scope, troubleshooterName, options }, restartOperationSpec);
86
+ }
87
+ }
88
+ // Operation Specifications
89
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
90
+ const createOperationSpec = {
91
+ path: "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}",
92
+ httpMethod: "PUT",
93
+ responses: {
94
+ 200: {
95
+ bodyMapper: Mappers.TroubleshooterResource
96
+ },
97
+ 201: {
98
+ bodyMapper: Mappers.TroubleshooterResource
99
+ },
100
+ default: {
101
+ bodyMapper: Mappers.ErrorResponse
102
+ }
103
+ },
104
+ requestBody: Parameters.createTroubleshooterRequestBody,
105
+ queryParameters: [Parameters.apiVersion],
106
+ urlParameters: [
107
+ Parameters.$host,
108
+ Parameters.scope,
109
+ Parameters.troubleshooterName
110
+ ],
111
+ headerParameters: [Parameters.accept, Parameters.contentType],
112
+ mediaType: "json",
113
+ serializer
114
+ };
115
+ const getOperationSpec = {
116
+ path: "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}",
117
+ httpMethod: "GET",
118
+ responses: {
119
+ 200: {
120
+ bodyMapper: Mappers.TroubleshooterResource
121
+ },
122
+ default: {
123
+ bodyMapper: Mappers.ErrorResponse
124
+ }
125
+ },
126
+ queryParameters: [Parameters.apiVersion],
127
+ urlParameters: [
128
+ Parameters.$host,
129
+ Parameters.scope,
130
+ Parameters.troubleshooterName
131
+ ],
132
+ headerParameters: [Parameters.accept],
133
+ serializer
134
+ };
135
+ const continueOperationSpec = {
136
+ path: "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue",
137
+ httpMethod: "POST",
138
+ responses: {
139
+ 204: {
140
+ headersMapper: Mappers.TroubleshootersContinueHeaders
141
+ },
142
+ default: {
143
+ bodyMapper: Mappers.ErrorResponse
144
+ }
145
+ },
146
+ requestBody: Parameters.continueRequestBody,
147
+ queryParameters: [Parameters.apiVersion],
148
+ urlParameters: [
149
+ Parameters.$host,
150
+ Parameters.scope,
151
+ Parameters.troubleshooterName
152
+ ],
153
+ headerParameters: [Parameters.accept, Parameters.contentType],
154
+ mediaType: "json",
155
+ serializer
156
+ };
157
+ const endOperationSpec = {
158
+ path: "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end",
159
+ httpMethod: "POST",
160
+ responses: {
161
+ 204: {
162
+ headersMapper: Mappers.TroubleshootersEndHeaders
163
+ },
164
+ default: {
165
+ bodyMapper: Mappers.ErrorResponse
166
+ }
167
+ },
168
+ queryParameters: [Parameters.apiVersion],
169
+ urlParameters: [
170
+ Parameters.$host,
171
+ Parameters.scope,
172
+ Parameters.troubleshooterName
173
+ ],
174
+ headerParameters: [Parameters.accept],
175
+ serializer
176
+ };
177
+ const restartOperationSpec = {
178
+ path: "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart",
179
+ httpMethod: "POST",
180
+ responses: {
181
+ 200: {
182
+ bodyMapper: Mappers.RestartTroubleshooterResponse,
183
+ headersMapper: Mappers.TroubleshootersRestartHeaders
184
+ },
185
+ default: {
186
+ bodyMapper: Mappers.ErrorResponse
187
+ }
188
+ },
189
+ queryParameters: [Parameters.apiVersion],
190
+ urlParameters: [
191
+ Parameters.$host,
192
+ Parameters.scope,
193
+ Parameters.troubleshooterName
194
+ ],
195
+ headerParameters: [Parameters.accept],
196
+ serializer
197
+ };
198
+ //# sourceMappingURL=troubleshooters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"troubleshooters.js","sourceRoot":"","sources":["../../../src/operations/troubleshooters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,KAAa,EACb,kBAA0B,EAC1B,OAA6C;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,EACtC,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,GAAG,CACD,KAAa,EACb,kBAA0B,EAC1B,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,EACtC,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CACN,KAAa,EACb,kBAA0B,EAC1B,OAA+C;QAE/C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,EACtC,qBAAqB,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,GAAG,CACD,K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C;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EACF,gFAAgF;IAClF,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,6BAA6B;YACjD,aAAa,EAAE,OAAO,CAAC,6BAA6B;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;KAC9B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { CheckNameAvailabilityPostOptionalParams, CheckNameAvailabilityPostResponse } from "../models";
2
+ /** Interface representing a CheckNameAvailability. */
3
+ export interface CheckNameAvailability {
4
+ /**
5
+ * This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or
6
+ * solutions
7
+ * @param scope This is an extension resource provider and only resource level extension is supported
8
+ * at the moment.
9
+ * @param options The options parameters.
10
+ */
11
+ post(scope: string, options?: CheckNameAvailabilityPostOptionalParams): Promise<CheckNameAvailabilityPostResponse>;
12
+ }
13
+ //# sourceMappingURL=checkNameAvailability.d.ts.map