@azure/arm-selfhelp 2.0.0-beta.2 → 2.0.0-beta.4

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 (166) hide show
  1. package/CHANGELOG.md +239 -0
  2. package/LICENSE +1 -1
  3. package/dist/index.js +1582 -856
  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.js +7 -7
  8. package/dist-esm/samples-dev/checkNameAvailabilityPostSample.js.map +1 -1
  9. package/dist-esm/samples-dev/diagnosticsCreateSample.js +4 -13
  10. package/dist-esm/samples-dev/diagnosticsCreateSample.js.map +1 -1
  11. package/dist-esm/samples-dev/diagnosticsGetSample.js +1 -1
  12. package/dist-esm/samples-dev/discoverySolutionListSample.js +6 -41
  13. package/dist-esm/samples-dev/discoverySolutionListSample.js.map +1 -1
  14. package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.d.ts +2 -0
  15. package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.d.ts.map +1 -0
  16. package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.js +44 -0
  17. package/dist-esm/samples-dev/discoverySolutionNlpSubscriptionScopePostSample.js.map +1 -0
  18. package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.d.ts +2 -0
  19. package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.d.ts.map +1 -0
  20. package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.js +42 -0
  21. package/dist-esm/samples-dev/discoverySolutionNlpTenantScopePostSample.js.map +1 -0
  22. package/dist-esm/samples-dev/operationsListSample.js +2 -2
  23. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  24. package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.js +46 -0
  27. package/dist-esm/samples-dev/simplifiedSolutionsCreateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/simplifiedSolutionsGetSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/simplifiedSolutionsGetSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/simplifiedSolutionsGetSample.js +37 -0
  31. package/dist-esm/samples-dev/simplifiedSolutionsGetSample.js.map +1 -0
  32. package/dist-esm/samples-dev/solutionCreateSample.js +8 -5
  33. package/dist-esm/samples-dev/solutionCreateSample.js.map +1 -1
  34. package/dist-esm/samples-dev/solutionGetSample.js +1 -1
  35. package/dist-esm/samples-dev/solutionSelfHelpGetSample.d.ts +2 -0
  36. package/dist-esm/samples-dev/solutionSelfHelpGetSample.d.ts.map +1 -0
  37. package/dist-esm/samples-dev/solutionSelfHelpGetSample.js +36 -0
  38. package/dist-esm/samples-dev/solutionSelfHelpGetSample.js.map +1 -0
  39. package/dist-esm/samples-dev/solutionUpdateSample.js +2 -11
  40. package/dist-esm/samples-dev/solutionUpdateSample.js.map +1 -1
  41. package/dist-esm/samples-dev/solutionWarmUpSample.d.ts +2 -0
  42. package/dist-esm/samples-dev/solutionWarmUpSample.d.ts.map +1 -0
  43. package/dist-esm/samples-dev/solutionWarmUpSample.js +37 -0
  44. package/dist-esm/samples-dev/solutionWarmUpSample.js.map +1 -0
  45. package/dist-esm/samples-dev/troubleshootersContinueSample.js +6 -6
  46. package/dist-esm/samples-dev/troubleshootersContinueSample.js.map +1 -1
  47. package/dist-esm/samples-dev/troubleshootersCreateSample.js +5 -5
  48. package/dist-esm/samples-dev/troubleshootersCreateSample.js.map +1 -1
  49. package/dist-esm/samples-dev/troubleshootersEndSample.js +1 -1
  50. package/dist-esm/samples-dev/troubleshootersGetSample.js +1 -1
  51. package/dist-esm/samples-dev/troubleshootersRestartSample.js +1 -1
  52. package/dist-esm/src/helpRP.d.ts +5 -1
  53. package/dist-esm/src/helpRP.d.ts.map +1 -1
  54. package/dist-esm/src/helpRP.js +15 -9
  55. package/dist-esm/src/helpRP.js.map +1 -1
  56. package/dist-esm/src/lroImpl.js +1 -1
  57. package/dist-esm/src/models/index.d.ts +227 -7
  58. package/dist-esm/src/models/index.d.ts.map +1 -1
  59. package/dist-esm/src/models/index.js +24 -0
  60. package/dist-esm/src/models/index.js.map +1 -1
  61. package/dist-esm/src/models/mappers.d.ts +9 -0
  62. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  63. package/dist-esm/src/models/mappers.js +860 -523
  64. package/dist-esm/src/models/mappers.js.map +1 -1
  65. package/dist-esm/src/models/parameters.d.ts +6 -0
  66. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  67. package/dist-esm/src/models/parameters.js +96 -44
  68. package/dist-esm/src/models/parameters.js.map +1 -1
  69. package/dist-esm/src/operations/checkNameAvailability.js +4 -4
  70. package/dist-esm/src/operations/diagnostics.d.ts +6 -10
  71. package/dist-esm/src/operations/diagnostics.d.ts.map +1 -1
  72. package/dist-esm/src/operations/diagnostics.js +24 -28
  73. package/dist-esm/src/operations/diagnostics.js.map +1 -1
  74. package/dist-esm/src/operations/discoverySolution.d.ts +3 -12
  75. package/dist-esm/src/operations/discoverySolution.d.ts.map +1 -1
  76. package/dist-esm/src/operations/discoverySolution.js +27 -36
  77. package/dist-esm/src/operations/discoverySolution.js.map +1 -1
  78. package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.d.ts +20 -0
  79. package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.d.ts.map +1 -0
  80. package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.js +50 -0
  81. package/dist-esm/src/operations/discoverySolutionNLPSubscriptionScope.js.map +1 -0
  82. package/dist-esm/src/operations/discoverySolutionNLPTenantScope.d.ts +19 -0
  83. package/dist-esm/src/operations/discoverySolutionNLPTenantScope.d.ts.map +1 -0
  84. package/dist-esm/src/operations/discoverySolutionNLPTenantScope.js +49 -0
  85. package/dist-esm/src/operations/discoverySolutionNLPTenantScope.js.map +1 -0
  86. package/dist-esm/src/operations/index.d.ts +4 -0
  87. package/dist-esm/src/operations/index.d.ts.map +1 -1
  88. package/dist-esm/src/operations/index.js +4 -0
  89. package/dist-esm/src/operations/index.js.map +1 -1
  90. package/dist-esm/src/operations/operations.js +9 -9
  91. package/dist-esm/src/operations/operations.js.map +1 -1
  92. package/dist-esm/src/operations/simplifiedSolutions.d.ts +52 -0
  93. package/dist-esm/src/operations/simplifiedSolutions.d.ts.map +1 -0
  94. package/dist-esm/src/operations/simplifiedSolutions.js +159 -0
  95. package/dist-esm/src/operations/simplifiedSolutions.js.map +1 -0
  96. package/dist-esm/src/operations/solution.d.ts +20 -25
  97. package/dist-esm/src/operations/solution.d.ts.map +1 -1
  98. package/dist-esm/src/operations/solution.js +71 -54
  99. package/dist-esm/src/operations/solution.js.map +1 -1
  100. package/dist-esm/src/operations/solutionSelfHelp.d.ts +23 -0
  101. package/dist-esm/src/operations/solutionSelfHelp.d.ts.map +1 -0
  102. package/dist-esm/src/operations/solutionSelfHelp.js +51 -0
  103. package/dist-esm/src/operations/solutionSelfHelp.js.map +1 -0
  104. package/dist-esm/src/operations/troubleshooters.js +26 -26
  105. package/dist-esm/src/operations/troubleshooters.js.map +1 -1
  106. package/dist-esm/src/operationsInterfaces/diagnostics.d.ts +6 -10
  107. package/dist-esm/src/operationsInterfaces/diagnostics.d.ts.map +1 -1
  108. package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts +2 -5
  109. package/dist-esm/src/operationsInterfaces/discoverySolution.d.ts.map +1 -1
  110. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.d.ts +12 -0
  111. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.d.ts.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.js +9 -0
  113. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.js.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.d.ts +11 -0
  115. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.d.ts.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.js +9 -0
  117. package/dist-esm/src/operationsInterfaces/discoverySolutionNLPTenantScope.js.map +1 -0
  118. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  119. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  120. package/dist-esm/src/operationsInterfaces/index.js +4 -0
  121. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  122. package/dist-esm/src/operationsInterfaces/simplifiedSolutions.d.ts +44 -0
  123. package/dist-esm/src/operationsInterfaces/simplifiedSolutions.d.ts.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/simplifiedSolutions.js +9 -0
  125. package/dist-esm/src/operationsInterfaces/simplifiedSolutions.js.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/solution.d.ts +20 -25
  127. package/dist-esm/src/operationsInterfaces/solution.d.ts.map +1 -1
  128. package/dist-esm/src/operationsInterfaces/solutionSelfHelp.d.ts +15 -0
  129. package/dist-esm/src/operationsInterfaces/solutionSelfHelp.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/solutionSelfHelp.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/solutionSelfHelp.js.map +1 -0
  132. package/dist-esm/src/pagingHelper.js.map +1 -1
  133. package/dist-esm/test/selfhelp_operations_test.spec.js +6 -1
  134. package/dist-esm/test/selfhelp_operations_test.spec.js.map +1 -1
  135. package/package.json +8 -9
  136. package/review/arm-selfhelp.api.md +174 -2
  137. package/src/helpRP.ts +36 -17
  138. package/src/lroImpl.ts +3 -3
  139. package/src/models/index.ts +263 -22
  140. package/src/models/mappers.ts +898 -529
  141. package/src/models/parameters.ts +106 -45
  142. package/src/operations/checkNameAvailability.ts +7 -7
  143. package/src/operations/diagnostics.ts +39 -46
  144. package/src/operations/discoverySolution.ts +29 -46
  145. package/src/operations/discoverySolutionNLPSubscriptionScope.ts +69 -0
  146. package/src/operations/discoverySolutionNLPTenantScope.ts +64 -0
  147. package/src/operations/index.ts +4 -0
  148. package/src/operations/operations.ts +16 -16
  149. package/src/operations/simplifiedSolutions.ts +216 -0
  150. package/src/operations/solution.ts +101 -77
  151. package/src/operations/solutionSelfHelp.ts +68 -0
  152. package/src/operations/troubleshooters.ts +42 -47
  153. package/src/operationsInterfaces/checkNameAvailability.ts +2 -2
  154. package/src/operationsInterfaces/diagnostics.ts +10 -14
  155. package/src/operationsInterfaces/discoverySolution.ts +3 -7
  156. package/src/operationsInterfaces/discoverySolutionNLPSubscriptionScope.ts +26 -0
  157. package/src/operationsInterfaces/discoverySolutionNLPTenantScope.ts +24 -0
  158. package/src/operationsInterfaces/index.ts +4 -0
  159. package/src/operationsInterfaces/operations.ts +1 -1
  160. package/src/operationsInterfaces/simplifiedSolutions.ts +74 -0
  161. package/src/operationsInterfaces/solution.ts +30 -30
  162. package/src/operationsInterfaces/solutionSelfHelp.ts +29 -0
  163. package/src/operationsInterfaces/troubleshooters.ts +6 -6
  164. package/src/pagingHelper.ts +1 -1
  165. package/types/arm-selfhelp.d.ts +357 -46
  166. package/types/tsdoc-metadata.json +1 -1
@@ -9,15 +9,18 @@
9
9
  import {
10
10
  OperationParameter,
11
11
  OperationURLParameter,
12
- OperationQueryParameter
12
+ OperationQueryParameter,
13
13
  } from "@azure/core-client";
14
14
  import {
15
15
  CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper,
16
16
  DiagnosticResource as DiagnosticResourceMapper,
17
17
  SolutionResource as SolutionResourceMapper,
18
18
  SolutionPatchRequestBody as SolutionPatchRequestBodyMapper,
19
+ SolutionWarmUpRequestBody as SolutionWarmUpRequestBodyMapper,
20
+ SimplifiedSolutionsResource as SimplifiedSolutionsResourceMapper,
19
21
  TroubleshooterResource as TroubleshooterResourceMapper,
20
- ContinueRequestBody as ContinueRequestBodyMapper
22
+ ContinueRequestBody as ContinueRequestBodyMapper,
23
+ DiscoveryNlpRequest as DiscoveryNlpRequestMapper,
21
24
  } from "../models/mappers";
22
25
 
23
26
  export const accept: OperationParameter = {
@@ -27,9 +30,9 @@ export const accept: OperationParameter = {
27
30
  isConstant: true,
28
31
  serializedName: "Accept",
29
32
  type: {
30
- name: "String"
31
- }
32
- }
33
+ name: "String",
34
+ },
35
+ },
33
36
  };
34
37
 
35
38
  export const $host: OperationURLParameter = {
@@ -38,22 +41,22 @@ export const $host: OperationURLParameter = {
38
41
  serializedName: "$host",
39
42
  required: true,
40
43
  type: {
41
- name: "String"
42
- }
44
+ name: "String",
45
+ },
43
46
  },
44
- skipEncoding: true
47
+ skipEncoding: true,
45
48
  };
46
49
 
47
50
  export const apiVersion: OperationQueryParameter = {
48
51
  parameterPath: "apiVersion",
49
52
  mapper: {
50
- defaultValue: "2023-09-01-preview",
53
+ defaultValue: "2024-03-01-preview",
51
54
  isConstant: true,
52
55
  serializedName: "api-version",
53
56
  type: {
54
- name: "String"
55
- }
56
- }
57
+ name: "String",
58
+ },
59
+ },
57
60
  };
58
61
 
59
62
  export const nextLink: OperationURLParameter = {
@@ -62,10 +65,10 @@ export const nextLink: OperationURLParameter = {
62
65
  serializedName: "nextLink",
63
66
  required: true,
64
67
  type: {
65
- name: "String"
66
- }
68
+ name: "String",
69
+ },
67
70
  },
68
- skipEncoding: true
71
+ skipEncoding: true,
69
72
  };
70
73
 
71
74
  export const contentType: OperationParameter = {
@@ -75,14 +78,14 @@ export const contentType: OperationParameter = {
75
78
  isConstant: true,
76
79
  serializedName: "Content-Type",
77
80
  type: {
78
- name: "String"
79
- }
80
- }
81
+ name: "String",
82
+ },
83
+ },
81
84
  };
82
85
 
83
86
  export const checkNameAvailabilityRequest: OperationParameter = {
84
87
  parameterPath: ["options", "checkNameAvailabilityRequest"],
85
- mapper: CheckNameAvailabilityRequestMapper
88
+ mapper: CheckNameAvailabilityRequestMapper,
86
89
  };
87
90
 
88
91
  export const scope: OperationURLParameter = {
@@ -91,15 +94,15 @@ export const scope: OperationURLParameter = {
91
94
  serializedName: "scope",
92
95
  required: true,
93
96
  type: {
94
- name: "String"
95
- }
97
+ name: "String",
98
+ },
96
99
  },
97
- skipEncoding: true
100
+ skipEncoding: true,
98
101
  };
99
102
 
100
103
  export const diagnosticResourceRequest: OperationParameter = {
101
104
  parameterPath: ["options", "diagnosticResourceRequest"],
102
- mapper: DiagnosticResourceMapper
105
+ mapper: DiagnosticResourceMapper,
103
106
  };
104
107
 
105
108
  export const diagnosticsResourceName: OperationURLParameter = {
@@ -108,14 +111,14 @@ export const diagnosticsResourceName: OperationURLParameter = {
108
111
  constraints: {
109
112
  Pattern: new RegExp("^[A-Za-z0-9-+@()_]+$"),
110
113
  MaxLength: 100,
111
- MinLength: 1
114
+ MinLength: 1,
112
115
  },
113
116
  serializedName: "diagnosticsResourceName",
114
117
  required: true,
115
118
  type: {
116
- name: "String"
117
- }
118
- }
119
+ name: "String",
120
+ },
121
+ },
119
122
  };
120
123
 
121
124
  export const filter: OperationQueryParameter = {
@@ -123,10 +126,10 @@ export const filter: OperationQueryParameter = {
123
126
  mapper: {
124
127
  serializedName: "$filter",
125
128
  type: {
126
- name: "String"
127
- }
129
+ name: "String",
130
+ },
128
131
  },
129
- skipEncoding: true
132
+ skipEncoding: true,
130
133
  };
131
134
 
132
135
  export const skiptoken: OperationQueryParameter = {
@@ -134,14 +137,14 @@ export const skiptoken: OperationQueryParameter = {
134
137
  mapper: {
135
138
  serializedName: "$skiptoken",
136
139
  type: {
137
- name: "String"
138
- }
139
- }
140
+ name: "String",
141
+ },
142
+ },
140
143
  };
141
144
 
142
145
  export const solutionRequestBody: OperationParameter = {
143
146
  parameterPath: ["options", "solutionRequestBody"],
144
- mapper: SolutionResourceMapper
147
+ mapper: SolutionResourceMapper,
145
148
  };
146
149
 
147
150
  export const solutionResourceName: OperationURLParameter = {
@@ -150,24 +153,50 @@ export const solutionResourceName: OperationURLParameter = {
150
153
  constraints: {
151
154
  Pattern: new RegExp("^[A-Za-z0-9-+@()_]+$"),
152
155
  MaxLength: 100,
153
- MinLength: 1
156
+ MinLength: 1,
154
157
  },
155
158
  serializedName: "solutionResourceName",
156
159
  required: true,
157
160
  type: {
158
- name: "String"
159
- }
160
- }
161
+ name: "String",
162
+ },
163
+ },
161
164
  };
162
165
 
163
166
  export const solutionPatchRequestBody: OperationParameter = {
164
167
  parameterPath: ["options", "solutionPatchRequestBody"],
165
- mapper: SolutionPatchRequestBodyMapper
168
+ mapper: SolutionPatchRequestBodyMapper,
169
+ };
170
+
171
+ export const solutionWarmUpRequestBody: OperationParameter = {
172
+ parameterPath: ["options", "solutionWarmUpRequestBody"],
173
+ mapper: SolutionWarmUpRequestBodyMapper,
174
+ };
175
+
176
+ export const simplifiedSolutionsRequestBody: OperationParameter = {
177
+ parameterPath: ["options", "simplifiedSolutionsRequestBody"],
178
+ mapper: SimplifiedSolutionsResourceMapper,
179
+ };
180
+
181
+ export const simplifiedSolutionsResourceName: OperationURLParameter = {
182
+ parameterPath: "simplifiedSolutionsResourceName",
183
+ mapper: {
184
+ constraints: {
185
+ Pattern: new RegExp("^[A-Za-z0-9-+@()_]+$"),
186
+ MaxLength: 100,
187
+ MinLength: 1,
188
+ },
189
+ serializedName: "simplifiedSolutionsResourceName",
190
+ required: true,
191
+ type: {
192
+ name: "String",
193
+ },
194
+ },
166
195
  };
167
196
 
168
197
  export const createTroubleshooterRequestBody: OperationParameter = {
169
198
  parameterPath: ["options", "createTroubleshooterRequestBody"],
170
- mapper: TroubleshooterResourceMapper
199
+ mapper: TroubleshooterResourceMapper,
171
200
  };
172
201
 
173
202
  export const troubleshooterName: OperationURLParameter = {
@@ -176,17 +205,49 @@ export const troubleshooterName: OperationURLParameter = {
176
205
  constraints: {
177
206
  Pattern: new RegExp("([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"),
178
207
  MaxLength: 100,
179
- MinLength: 1
208
+ MinLength: 1,
180
209
  },
181
210
  serializedName: "troubleshooterName",
182
211
  required: true,
183
212
  type: {
184
- name: "String"
185
- }
186
- }
213
+ name: "String",
214
+ },
215
+ },
187
216
  };
188
217
 
189
218
  export const continueRequestBody: OperationParameter = {
190
219
  parameterPath: ["options", "continueRequestBody"],
191
- mapper: ContinueRequestBodyMapper
220
+ mapper: ContinueRequestBodyMapper,
221
+ };
222
+
223
+ export const solutionId: OperationURLParameter = {
224
+ parameterPath: "solutionId",
225
+ mapper: {
226
+ constraints: {
227
+ MaxLength: 100,
228
+ MinLength: 1,
229
+ },
230
+ serializedName: "solutionId",
231
+ required: true,
232
+ type: {
233
+ name: "String",
234
+ },
235
+ },
236
+ };
237
+
238
+ export const discoverSolutionRequest: OperationParameter = {
239
+ parameterPath: ["options", "discoverSolutionRequest"],
240
+ mapper: DiscoveryNlpRequestMapper,
241
+ };
242
+
243
+ export const subscriptionId: OperationURLParameter = {
244
+ parameterPath: "subscriptionId",
245
+ mapper: {
246
+ serializedName: "subscriptionId",
247
+ required: true,
248
+ type: {
249
+ name: "String",
250
+ },
251
+ },
252
+ skipEncoding: true,
192
253
  };
@@ -13,7 +13,7 @@ import * as Parameters from "../models/parameters";
13
13
  import { HelpRP } from "../helpRP";
14
14
  import {
15
15
  CheckNameAvailabilityPostOptionalParams,
16
- CheckNameAvailabilityPostResponse
16
+ CheckNameAvailabilityPostResponse,
17
17
  } from "../models";
18
18
 
19
19
  /** Class containing CheckNameAvailability operations. */
@@ -38,11 +38,11 @@ export class CheckNameAvailabilityImpl implements CheckNameAvailability {
38
38
  */
39
39
  post(
40
40
  scope: string,
41
- options?: CheckNameAvailabilityPostOptionalParams
41
+ options?: CheckNameAvailabilityPostOptionalParams,
42
42
  ): Promise<CheckNameAvailabilityPostResponse> {
43
43
  return this.client.sendOperationRequest(
44
44
  { scope, options },
45
- postOperationSpec
45
+ postOperationSpec,
46
46
  );
47
47
  }
48
48
  }
@@ -54,16 +54,16 @@ const postOperationSpec: coreClient.OperationSpec = {
54
54
  httpMethod: "POST",
55
55
  responses: {
56
56
  200: {
57
- bodyMapper: Mappers.CheckNameAvailabilityResponse
57
+ bodyMapper: Mappers.CheckNameAvailabilityResponse,
58
58
  },
59
59
  default: {
60
- bodyMapper: Mappers.ErrorResponse
61
- }
60
+ bodyMapper: Mappers.ErrorResponse,
61
+ },
62
62
  },
63
63
  requestBody: Parameters.checkNameAvailabilityRequest,
64
64
  queryParameters: [Parameters.apiVersion],
65
65
  urlParameters: [Parameters.$host, Parameters.scope],
66
66
  headerParameters: [Parameters.accept, Parameters.contentType],
67
67
  mediaType: "json",
68
- serializer
68
+ serializer,
69
69
  };
@@ -14,14 +14,14 @@ import { HelpRP } from "../helpRP";
14
14
  import {
15
15
  SimplePollerLike,
16
16
  OperationState,
17
- createHttpPoller
17
+ createHttpPoller,
18
18
  } from "@azure/core-lro";
19
19
  import { createLroSpec } from "../lroImpl";
20
20
  import {
21
21
  DiagnosticsCreateOptionalParams,
22
22
  DiagnosticsCreateResponse,
23
23
  DiagnosticsGetOptionalParams,
24
- DiagnosticsGetResponse
24
+ DiagnosticsGetResponse,
25
25
  } from "../models";
26
26
 
27
27
  /** Class containing Diagnostics operations. */
@@ -37,11 +37,9 @@ export class DiagnosticsImpl implements Diagnostics {
37
37
  }
38
38
 
39
39
  /**
40
- * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery
41
- * solutions. <br/>Diagnostics are powerful solutions that access product resources or other relevant
42
- * data and provide the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note:
43
- * </b> ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as
44
- * an input to Diagnostics API.
40
+ * Creates a diagnostic for the specific resource using solutionId from discovery solutions.
41
+ * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and
42
+ * provide the root cause of the issue and the steps to address the issue.<br/><br/>
45
43
  * @param scope scope = resourceUri of affected resource.<br/> For example:
46
44
  * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
47
45
  *
@@ -51,7 +49,7 @@ export class DiagnosticsImpl implements Diagnostics {
51
49
  async beginCreate(
52
50
  scope: string,
53
51
  diagnosticsResourceName: string,
54
- options?: DiagnosticsCreateOptionalParams
52
+ options?: DiagnosticsCreateOptionalParams,
55
53
  ): Promise<
56
54
  SimplePollerLike<
57
55
  OperationState<DiagnosticsCreateResponse>,
@@ -60,21 +58,20 @@ export class DiagnosticsImpl implements Diagnostics {
60
58
  > {
61
59
  const directSendOperation = async (
62
60
  args: coreClient.OperationArguments,
63
- spec: coreClient.OperationSpec
61
+ spec: coreClient.OperationSpec,
64
62
  ): Promise<DiagnosticsCreateResponse> => {
65
63
  return this.client.sendOperationRequest(args, spec);
66
64
  };
67
65
  const sendOperationFn = async (
68
66
  args: coreClient.OperationArguments,
69
- spec: coreClient.OperationSpec
67
+ spec: coreClient.OperationSpec,
70
68
  ) => {
71
- let currentRawResponse:
72
- | coreClient.FullOperationResponse
73
- | undefined = undefined;
69
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
70
+ undefined;
74
71
  const providedCallback = args.options?.onResponse;
75
72
  const callback: coreClient.RawResponseCallback = (
76
73
  rawResponse: coreClient.FullOperationResponse,
77
- flatResponse: unknown
74
+ flatResponse: unknown,
78
75
  ) => {
79
76
  currentRawResponse = rawResponse;
80
77
  providedCallback?.(rawResponse, flatResponse);
@@ -83,8 +80,8 @@ export class DiagnosticsImpl implements Diagnostics {
83
80
  ...args,
84
81
  options: {
85
82
  ...args.options,
86
- onResponse: callback
87
- }
83
+ onResponse: callback,
84
+ },
88
85
  };
89
86
  const flatResponse = await directSendOperation(updatedArgs, spec);
90
87
  return {
@@ -92,15 +89,15 @@ export class DiagnosticsImpl implements Diagnostics {
92
89
  rawResponse: {
93
90
  statusCode: currentRawResponse!.status,
94
91
  body: currentRawResponse!.parsedBody,
95
- headers: currentRawResponse!.headers.toJSON()
96
- }
92
+ headers: currentRawResponse!.headers.toJSON(),
93
+ },
97
94
  };
98
95
  };
99
96
 
100
97
  const lro = createLroSpec({
101
98
  sendOperationFn,
102
99
  args: { scope, diagnosticsResourceName, options },
103
- spec: createOperationSpec
100
+ spec: createOperationSpec,
104
101
  });
105
102
  const poller = await createHttpPoller<
106
103
  DiagnosticsCreateResponse,
@@ -108,18 +105,16 @@ export class DiagnosticsImpl implements Diagnostics {
108
105
  >(lro, {
109
106
  restoreFrom: options?.resumeFrom,
110
107
  intervalInMs: options?.updateIntervalInMs,
111
- resourceLocationConfig: "azure-async-operation"
108
+ resourceLocationConfig: "azure-async-operation",
112
109
  });
113
110
  await poller.poll();
114
111
  return poller;
115
112
  }
116
113
 
117
114
  /**
118
- * Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery
119
- * solutions. <br/>Diagnostics are powerful solutions that access product resources or other relevant
120
- * data and provide the root cause of the issue and the steps to address the issue.<br/><br/> <b>Note:
121
- * </b> ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as
122
- * an input to Diagnostics API.
115
+ * Creates a diagnostic for the specific resource using solutionId from discovery solutions.
116
+ * <br/>Diagnostics are powerful solutions that access product resources or other relevant data and
117
+ * provide the root cause of the issue and the steps to address the issue.<br/><br/>
123
118
  * @param scope scope = resourceUri of affected resource.<br/> For example:
124
119
  * /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read
125
120
  *
@@ -129,12 +124,12 @@ export class DiagnosticsImpl implements Diagnostics {
129
124
  async beginCreateAndWait(
130
125
  scope: string,
131
126
  diagnosticsResourceName: string,
132
- options?: DiagnosticsCreateOptionalParams
127
+ options?: DiagnosticsCreateOptionalParams,
133
128
  ): Promise<DiagnosticsCreateResponse> {
134
129
  const poller = await this.beginCreate(
135
130
  scope,
136
131
  diagnosticsResourceName,
137
- options
132
+ options,
138
133
  );
139
134
  return poller.pollUntilDone();
140
135
  }
@@ -150,11 +145,11 @@ export class DiagnosticsImpl implements Diagnostics {
150
145
  get(
151
146
  scope: string,
152
147
  diagnosticsResourceName: string,
153
- options?: DiagnosticsGetOptionalParams
148
+ options?: DiagnosticsGetOptionalParams,
154
149
  ): Promise<DiagnosticsGetResponse> {
155
150
  return this.client.sendOperationRequest(
156
151
  { scope, diagnosticsResourceName, options },
157
- getOperationSpec
152
+ getOperationSpec,
158
153
  );
159
154
  }
160
155
  }
@@ -162,55 +157,53 @@ export class DiagnosticsImpl implements Diagnostics {
162
157
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
163
158
 
164
159
  const createOperationSpec: coreClient.OperationSpec = {
165
- path:
166
- "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}",
160
+ path: "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}",
167
161
  httpMethod: "PUT",
168
162
  responses: {
169
163
  200: {
170
- bodyMapper: Mappers.DiagnosticResource
164
+ bodyMapper: Mappers.DiagnosticResource,
171
165
  },
172
166
  201: {
173
- bodyMapper: Mappers.DiagnosticResource
167
+ bodyMapper: Mappers.DiagnosticResource,
174
168
  },
175
169
  202: {
176
- bodyMapper: Mappers.DiagnosticResource
170
+ bodyMapper: Mappers.DiagnosticResource,
177
171
  },
178
172
  204: {
179
- bodyMapper: Mappers.DiagnosticResource
173
+ bodyMapper: Mappers.DiagnosticResource,
180
174
  },
181
175
  default: {
182
- bodyMapper: Mappers.ErrorResponse
183
- }
176
+ bodyMapper: Mappers.ErrorResponse,
177
+ },
184
178
  },
185
179
  requestBody: Parameters.diagnosticResourceRequest,
186
180
  queryParameters: [Parameters.apiVersion],
187
181
  urlParameters: [
188
182
  Parameters.$host,
189
183
  Parameters.scope,
190
- Parameters.diagnosticsResourceName
184
+ Parameters.diagnosticsResourceName,
191
185
  ],
192
186
  headerParameters: [Parameters.accept, Parameters.contentType],
193
187
  mediaType: "json",
194
- serializer
188
+ serializer,
195
189
  };
196
190
  const getOperationSpec: coreClient.OperationSpec = {
197
- path:
198
- "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}",
191
+ path: "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}",
199
192
  httpMethod: "GET",
200
193
  responses: {
201
194
  200: {
202
- bodyMapper: Mappers.DiagnosticResource
195
+ bodyMapper: Mappers.DiagnosticResource,
203
196
  },
204
197
  default: {
205
- bodyMapper: Mappers.ErrorResponse
206
- }
198
+ bodyMapper: Mappers.ErrorResponse,
199
+ },
207
200
  },
208
201
  queryParameters: [Parameters.apiVersion],
209
202
  urlParameters: [
210
203
  Parameters.$host,
211
204
  Parameters.scope,
212
- Parameters.diagnosticsResourceName
205
+ Parameters.diagnosticsResourceName,
213
206
  ],
214
207
  headerParameters: [Parameters.accept],
215
- serializer
208
+ serializer,
216
209
  };