@azure/arm-azurestackhci 1.1.1 → 2.0.0-alpha.20220111.3

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 (144) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -80
  4. package/dist/index.js +2369 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/azureStackHCIClient.d.ts +21 -0
  9. package/dist-esm/src/azureStackHCIClient.d.ts.map +1 -0
  10. package/dist-esm/src/azureStackHCIClient.js +54 -0
  11. package/dist-esm/src/azureStackHCIClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +864 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +135 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +23 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/dist-esm/src/models/mappers.js +881 -0
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +16 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +137 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/arcSettings.d.ts +72 -0
  33. package/dist-esm/src/operations/arcSettings.d.ts.map +1 -0
  34. package/dist-esm/src/operations/arcSettings.js +281 -0
  35. package/dist-esm/src/operations/arcSettings.js.map +1 -0
  36. package/dist-esm/src/operations/clusters.d.ts +83 -0
  37. package/dist-esm/src/operations/clusters.d.ts.map +1 -0
  38. package/dist-esm/src/operations/clusters.js +356 -0
  39. package/dist-esm/src/operations/clusters.js.map +1 -0
  40. package/dist-esm/src/operations/extensions.d.ts +109 -0
  41. package/dist-esm/src/operations/extensions.d.ts.map +1 -0
  42. package/dist-esm/src/operations/extensions.js +462 -0
  43. package/dist-esm/src/operations/extensions.js.map +1 -0
  44. package/dist-esm/src/operations/index.d.ts +5 -0
  45. package/dist-esm/src/operations/index.d.ts.map +1 -0
  46. package/dist-esm/src/operations/index.js +12 -0
  47. package/dist-esm/src/operations/index.js.map +1 -0
  48. package/dist-esm/src/operations/operations.d.ts +18 -0
  49. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/operations.js +46 -0
  51. package/dist-esm/src/operations/operations.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/arcSettings.d.ts +47 -0
  53. package/dist-esm/src/operationsInterfaces/arcSettings.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/arcSettings.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/arcSettings.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/clusters.d.ts +47 -0
  57. package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/clusters.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/clusters.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/extensions.d.ts +82 -0
  61. package/dist-esm/src/operationsInterfaces/extensions.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/extensions.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/extensions.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
  65. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/index.js +12 -0
  67. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  72. package/dist-esm/test/sampleTest.d.ts +2 -0
  73. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  74. package/dist-esm/test/sampleTest.js +40 -0
  75. package/dist-esm/test/sampleTest.js.map +1 -0
  76. package/package.json +65 -22
  77. package/review/arm-azurestackhci.api.md +650 -0
  78. package/rollup.config.js +181 -30
  79. package/src/azureStackHCIClient.ts +78 -37
  80. package/src/index.ts +12 -0
  81. package/src/lroImpl.ts +34 -0
  82. package/src/models/index.ts +775 -366
  83. package/src/models/mappers.ts +635 -239
  84. package/src/models/parameters.ts +112 -35
  85. package/src/operations/arcSettings.ts +394 -0
  86. package/src/operations/clusters.ts +279 -309
  87. package/src/operations/extensions.ts +672 -0
  88. package/src/operations/index.ts +6 -6
  89. package/src/operations/operations.ts +30 -45
  90. package/src/operationsInterfaces/arcSettings.ts +89 -0
  91. package/src/operationsInterfaces/clusters.ts +91 -0
  92. package/src/operationsInterfaces/extensions.ts +162 -0
  93. package/src/operationsInterfaces/index.ts +12 -0
  94. package/src/operationsInterfaces/operations.ts +21 -0
  95. package/tsconfig.json +3 -3
  96. package/types/arm-azurestackhci.d.ts +1146 -0
  97. package/types/tsdoc-metadata.json +11 -0
  98. package/dist/arm-azurestackhci.js +0 -1151
  99. package/dist/arm-azurestackhci.js.map +0 -1
  100. package/dist/arm-azurestackhci.min.js +0 -1
  101. package/dist/arm-azurestackhci.min.js.map +0 -1
  102. package/esm/azureStackHCIClient.d.ts +0 -25
  103. package/esm/azureStackHCIClient.d.ts.map +0 -1
  104. package/esm/azureStackHCIClient.js +0 -39
  105. package/esm/azureStackHCIClient.js.map +0 -1
  106. package/esm/azureStackHCIClientContext.d.ts +0 -22
  107. package/esm/azureStackHCIClientContext.d.ts.map +0 -1
  108. package/esm/azureStackHCIClientContext.js +0 -61
  109. package/esm/azureStackHCIClientContext.js.map +0 -1
  110. package/esm/models/clustersMappers.d.ts +0 -2
  111. package/esm/models/clustersMappers.d.ts.map +0 -1
  112. package/esm/models/clustersMappers.js +0 -9
  113. package/esm/models/clustersMappers.js.map +0 -1
  114. package/esm/models/index.d.ts +0 -509
  115. package/esm/models/index.d.ts.map +0 -1
  116. package/esm/models/index.js +0 -8
  117. package/esm/models/index.js.map +0 -1
  118. package/esm/models/mappers.d.ts +0 -19
  119. package/esm/models/mappers.d.ts.map +0 -1
  120. package/esm/models/mappers.js +0 -527
  121. package/esm/models/mappers.js.map +0 -1
  122. package/esm/models/operationsMappers.d.ts +0 -2
  123. package/esm/models/operationsMappers.d.ts.map +0 -1
  124. package/esm/models/operationsMappers.js +0 -9
  125. package/esm/models/operationsMappers.js.map +0 -1
  126. package/esm/models/parameters.d.ts +0 -8
  127. package/esm/models/parameters.d.ts.map +0 -1
  128. package/esm/models/parameters.js +0 -82
  129. package/esm/models/parameters.js.map +0 -1
  130. package/esm/operations/clusters.d.ts +0 -169
  131. package/esm/operations/clusters.d.ts.map +0 -1
  132. package/esm/operations/clusters.js +0 -273
  133. package/esm/operations/clusters.js.map +0 -1
  134. package/esm/operations/index.d.ts +0 -3
  135. package/esm/operations/index.d.ts.map +0 -1
  136. package/esm/operations/index.js +0 -12
  137. package/esm/operations/index.js.map +0 -1
  138. package/esm/operations/operations.d.ts +0 -28
  139. package/esm/operations/operations.d.ts.map +0 -1
  140. package/esm/operations/operations.js +0 -51
  141. package/esm/operations/operations.js.map +0 -1
  142. package/src/azureStackHCIClientContext.ts +0 -68
  143. package/src/models/clustersMappers.ts +0 -23
  144. package/src/models/operationsMappers.ts +0 -16
@@ -0,0 +1,672 @@
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
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Extensions } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { AzureStackHCIClient } from "../azureStackHCIClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ Extension,
19
+ ExtensionsListByArcSettingNextOptionalParams,
20
+ ExtensionsListByArcSettingOptionalParams,
21
+ ExtensionsListByArcSettingResponse,
22
+ ExtensionsGetOptionalParams,
23
+ ExtensionsGetResponse,
24
+ ExtensionsCreateOptionalParams,
25
+ ExtensionsCreateResponse,
26
+ ExtensionsUpdateOptionalParams,
27
+ ExtensionsUpdateResponse,
28
+ ExtensionsDeleteOptionalParams,
29
+ ExtensionsListByArcSettingNextResponse
30
+ } from "../models";
31
+
32
+ /// <reference lib="esnext.asynciterable" />
33
+ /** Class containing Extensions operations. */
34
+ export class ExtensionsImpl implements Extensions {
35
+ private readonly client: AzureStackHCIClient;
36
+
37
+ /**
38
+ * Initialize a new instance of the class Extensions class.
39
+ * @param client Reference to the service client
40
+ */
41
+ constructor(client: AzureStackHCIClient) {
42
+ this.client = client;
43
+ }
44
+
45
+ /**
46
+ * List all Extensions under ArcSetting resource.
47
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
48
+ * @param clusterName The name of the cluster.
49
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
50
+ * @param options The options parameters.
51
+ */
52
+ public listByArcSetting(
53
+ resourceGroupName: string,
54
+ clusterName: string,
55
+ arcSettingName: string,
56
+ options?: ExtensionsListByArcSettingOptionalParams
57
+ ): PagedAsyncIterableIterator<Extension> {
58
+ const iter = this.listByArcSettingPagingAll(
59
+ resourceGroupName,
60
+ clusterName,
61
+ arcSettingName,
62
+ options
63
+ );
64
+ return {
65
+ next() {
66
+ return iter.next();
67
+ },
68
+ [Symbol.asyncIterator]() {
69
+ return this;
70
+ },
71
+ byPage: () => {
72
+ return this.listByArcSettingPagingPage(
73
+ resourceGroupName,
74
+ clusterName,
75
+ arcSettingName,
76
+ options
77
+ );
78
+ }
79
+ };
80
+ }
81
+
82
+ private async *listByArcSettingPagingPage(
83
+ resourceGroupName: string,
84
+ clusterName: string,
85
+ arcSettingName: string,
86
+ options?: ExtensionsListByArcSettingOptionalParams
87
+ ): AsyncIterableIterator<Extension[]> {
88
+ let result = await this._listByArcSetting(
89
+ resourceGroupName,
90
+ clusterName,
91
+ arcSettingName,
92
+ options
93
+ );
94
+ yield result.value || [];
95
+ let continuationToken = result.nextLink;
96
+ while (continuationToken) {
97
+ result = await this._listByArcSettingNext(
98
+ resourceGroupName,
99
+ clusterName,
100
+ arcSettingName,
101
+ continuationToken,
102
+ options
103
+ );
104
+ continuationToken = result.nextLink;
105
+ yield result.value || [];
106
+ }
107
+ }
108
+
109
+ private async *listByArcSettingPagingAll(
110
+ resourceGroupName: string,
111
+ clusterName: string,
112
+ arcSettingName: string,
113
+ options?: ExtensionsListByArcSettingOptionalParams
114
+ ): AsyncIterableIterator<Extension> {
115
+ for await (const page of this.listByArcSettingPagingPage(
116
+ resourceGroupName,
117
+ clusterName,
118
+ arcSettingName,
119
+ options
120
+ )) {
121
+ yield* page;
122
+ }
123
+ }
124
+
125
+ /**
126
+ * List all Extensions under ArcSetting resource.
127
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
128
+ * @param clusterName The name of the cluster.
129
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
130
+ * @param options The options parameters.
131
+ */
132
+ private _listByArcSetting(
133
+ resourceGroupName: string,
134
+ clusterName: string,
135
+ arcSettingName: string,
136
+ options?: ExtensionsListByArcSettingOptionalParams
137
+ ): Promise<ExtensionsListByArcSettingResponse> {
138
+ return this.client.sendOperationRequest(
139
+ { resourceGroupName, clusterName, arcSettingName, options },
140
+ listByArcSettingOperationSpec
141
+ );
142
+ }
143
+
144
+ /**
145
+ * Get particular Arc Extension of HCI Cluster.
146
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
147
+ * @param clusterName The name of the cluster.
148
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
149
+ * @param extensionName The name of the machine extension.
150
+ * @param options The options parameters.
151
+ */
152
+ get(
153
+ resourceGroupName: string,
154
+ clusterName: string,
155
+ arcSettingName: string,
156
+ extensionName: string,
157
+ options?: ExtensionsGetOptionalParams
158
+ ): Promise<ExtensionsGetResponse> {
159
+ return this.client.sendOperationRequest(
160
+ {
161
+ resourceGroupName,
162
+ clusterName,
163
+ arcSettingName,
164
+ extensionName,
165
+ options
166
+ },
167
+ getOperationSpec
168
+ );
169
+ }
170
+
171
+ /**
172
+ * Create Extension for HCI cluster.
173
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
174
+ * @param clusterName The name of the cluster.
175
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
176
+ * @param extensionName The name of the machine extension.
177
+ * @param extension Details of the Machine Extension to be created.
178
+ * @param options The options parameters.
179
+ */
180
+ async beginCreate(
181
+ resourceGroupName: string,
182
+ clusterName: string,
183
+ arcSettingName: string,
184
+ extensionName: string,
185
+ extension: Extension,
186
+ options?: ExtensionsCreateOptionalParams
187
+ ): Promise<
188
+ PollerLike<
189
+ PollOperationState<ExtensionsCreateResponse>,
190
+ ExtensionsCreateResponse
191
+ >
192
+ > {
193
+ const directSendOperation = async (
194
+ args: coreClient.OperationArguments,
195
+ spec: coreClient.OperationSpec
196
+ ): Promise<ExtensionsCreateResponse> => {
197
+ return this.client.sendOperationRequest(args, spec);
198
+ };
199
+ const sendOperation = async (
200
+ args: coreClient.OperationArguments,
201
+ spec: coreClient.OperationSpec
202
+ ) => {
203
+ let currentRawResponse:
204
+ | coreClient.FullOperationResponse
205
+ | undefined = undefined;
206
+ const providedCallback = args.options?.onResponse;
207
+ const callback: coreClient.RawResponseCallback = (
208
+ rawResponse: coreClient.FullOperationResponse,
209
+ flatResponse: unknown
210
+ ) => {
211
+ currentRawResponse = rawResponse;
212
+ providedCallback?.(rawResponse, flatResponse);
213
+ };
214
+ const updatedArgs = {
215
+ ...args,
216
+ options: {
217
+ ...args.options,
218
+ onResponse: callback
219
+ }
220
+ };
221
+ const flatResponse = await directSendOperation(updatedArgs, spec);
222
+ return {
223
+ flatResponse,
224
+ rawResponse: {
225
+ statusCode: currentRawResponse!.status,
226
+ body: currentRawResponse!.parsedBody,
227
+ headers: currentRawResponse!.headers.toJSON()
228
+ }
229
+ };
230
+ };
231
+
232
+ const lro = new LroImpl(
233
+ sendOperation,
234
+ {
235
+ resourceGroupName,
236
+ clusterName,
237
+ arcSettingName,
238
+ extensionName,
239
+ extension,
240
+ options
241
+ },
242
+ createOperationSpec
243
+ );
244
+ return new LroEngine(lro, {
245
+ resumeFrom: options?.resumeFrom,
246
+ intervalInMs: options?.updateIntervalInMs,
247
+ lroResourceLocationConfig: "azure-async-operation"
248
+ });
249
+ }
250
+
251
+ /**
252
+ * Create Extension for HCI cluster.
253
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
254
+ * @param clusterName The name of the cluster.
255
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
256
+ * @param extensionName The name of the machine extension.
257
+ * @param extension Details of the Machine Extension to be created.
258
+ * @param options The options parameters.
259
+ */
260
+ async beginCreateAndWait(
261
+ resourceGroupName: string,
262
+ clusterName: string,
263
+ arcSettingName: string,
264
+ extensionName: string,
265
+ extension: Extension,
266
+ options?: ExtensionsCreateOptionalParams
267
+ ): Promise<ExtensionsCreateResponse> {
268
+ const poller = await this.beginCreate(
269
+ resourceGroupName,
270
+ clusterName,
271
+ arcSettingName,
272
+ extensionName,
273
+ extension,
274
+ options
275
+ );
276
+ return poller.pollUntilDone();
277
+ }
278
+
279
+ /**
280
+ * Update Extension for HCI cluster.
281
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
282
+ * @param clusterName The name of the cluster.
283
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
284
+ * @param extensionName The name of the machine extension.
285
+ * @param extension Details of the Machine Extension to be created.
286
+ * @param options The options parameters.
287
+ */
288
+ async beginUpdate(
289
+ resourceGroupName: string,
290
+ clusterName: string,
291
+ arcSettingName: string,
292
+ extensionName: string,
293
+ extension: Extension,
294
+ options?: ExtensionsUpdateOptionalParams
295
+ ): Promise<
296
+ PollerLike<
297
+ PollOperationState<ExtensionsUpdateResponse>,
298
+ ExtensionsUpdateResponse
299
+ >
300
+ > {
301
+ const directSendOperation = async (
302
+ args: coreClient.OperationArguments,
303
+ spec: coreClient.OperationSpec
304
+ ): Promise<ExtensionsUpdateResponse> => {
305
+ return this.client.sendOperationRequest(args, spec);
306
+ };
307
+ const sendOperation = async (
308
+ args: coreClient.OperationArguments,
309
+ spec: coreClient.OperationSpec
310
+ ) => {
311
+ let currentRawResponse:
312
+ | coreClient.FullOperationResponse
313
+ | undefined = undefined;
314
+ const providedCallback = args.options?.onResponse;
315
+ const callback: coreClient.RawResponseCallback = (
316
+ rawResponse: coreClient.FullOperationResponse,
317
+ flatResponse: unknown
318
+ ) => {
319
+ currentRawResponse = rawResponse;
320
+ providedCallback?.(rawResponse, flatResponse);
321
+ };
322
+ const updatedArgs = {
323
+ ...args,
324
+ options: {
325
+ ...args.options,
326
+ onResponse: callback
327
+ }
328
+ };
329
+ const flatResponse = await directSendOperation(updatedArgs, spec);
330
+ return {
331
+ flatResponse,
332
+ rawResponse: {
333
+ statusCode: currentRawResponse!.status,
334
+ body: currentRawResponse!.parsedBody,
335
+ headers: currentRawResponse!.headers.toJSON()
336
+ }
337
+ };
338
+ };
339
+
340
+ const lro = new LroImpl(
341
+ sendOperation,
342
+ {
343
+ resourceGroupName,
344
+ clusterName,
345
+ arcSettingName,
346
+ extensionName,
347
+ extension,
348
+ options
349
+ },
350
+ updateOperationSpec
351
+ );
352
+ return new LroEngine(lro, {
353
+ resumeFrom: options?.resumeFrom,
354
+ intervalInMs: options?.updateIntervalInMs,
355
+ lroResourceLocationConfig: "original-uri"
356
+ });
357
+ }
358
+
359
+ /**
360
+ * Update Extension for HCI cluster.
361
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
362
+ * @param clusterName The name of the cluster.
363
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
364
+ * @param extensionName The name of the machine extension.
365
+ * @param extension Details of the Machine Extension to be created.
366
+ * @param options The options parameters.
367
+ */
368
+ async beginUpdateAndWait(
369
+ resourceGroupName: string,
370
+ clusterName: string,
371
+ arcSettingName: string,
372
+ extensionName: string,
373
+ extension: Extension,
374
+ options?: ExtensionsUpdateOptionalParams
375
+ ): Promise<ExtensionsUpdateResponse> {
376
+ const poller = await this.beginUpdate(
377
+ resourceGroupName,
378
+ clusterName,
379
+ arcSettingName,
380
+ extensionName,
381
+ extension,
382
+ options
383
+ );
384
+ return poller.pollUntilDone();
385
+ }
386
+
387
+ /**
388
+ * Delete particular Arc Extension of HCI Cluster.
389
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
390
+ * @param clusterName The name of the cluster.
391
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
392
+ * @param extensionName The name of the machine extension.
393
+ * @param options The options parameters.
394
+ */
395
+ async beginDelete(
396
+ resourceGroupName: string,
397
+ clusterName: string,
398
+ arcSettingName: string,
399
+ extensionName: string,
400
+ options?: ExtensionsDeleteOptionalParams
401
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
402
+ const directSendOperation = async (
403
+ args: coreClient.OperationArguments,
404
+ spec: coreClient.OperationSpec
405
+ ): Promise<void> => {
406
+ return this.client.sendOperationRequest(args, spec);
407
+ };
408
+ const sendOperation = async (
409
+ args: coreClient.OperationArguments,
410
+ spec: coreClient.OperationSpec
411
+ ) => {
412
+ let currentRawResponse:
413
+ | coreClient.FullOperationResponse
414
+ | undefined = undefined;
415
+ const providedCallback = args.options?.onResponse;
416
+ const callback: coreClient.RawResponseCallback = (
417
+ rawResponse: coreClient.FullOperationResponse,
418
+ flatResponse: unknown
419
+ ) => {
420
+ currentRawResponse = rawResponse;
421
+ providedCallback?.(rawResponse, flatResponse);
422
+ };
423
+ const updatedArgs = {
424
+ ...args,
425
+ options: {
426
+ ...args.options,
427
+ onResponse: callback
428
+ }
429
+ };
430
+ const flatResponse = await directSendOperation(updatedArgs, spec);
431
+ return {
432
+ flatResponse,
433
+ rawResponse: {
434
+ statusCode: currentRawResponse!.status,
435
+ body: currentRawResponse!.parsedBody,
436
+ headers: currentRawResponse!.headers.toJSON()
437
+ }
438
+ };
439
+ };
440
+
441
+ const lro = new LroImpl(
442
+ sendOperation,
443
+ {
444
+ resourceGroupName,
445
+ clusterName,
446
+ arcSettingName,
447
+ extensionName,
448
+ options
449
+ },
450
+ deleteOperationSpec
451
+ );
452
+ return new LroEngine(lro, {
453
+ resumeFrom: options?.resumeFrom,
454
+ intervalInMs: options?.updateIntervalInMs,
455
+ lroResourceLocationConfig: "azure-async-operation"
456
+ });
457
+ }
458
+
459
+ /**
460
+ * Delete particular Arc Extension of HCI Cluster.
461
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
462
+ * @param clusterName The name of the cluster.
463
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
464
+ * @param extensionName The name of the machine extension.
465
+ * @param options The options parameters.
466
+ */
467
+ async beginDeleteAndWait(
468
+ resourceGroupName: string,
469
+ clusterName: string,
470
+ arcSettingName: string,
471
+ extensionName: string,
472
+ options?: ExtensionsDeleteOptionalParams
473
+ ): Promise<void> {
474
+ const poller = await this.beginDelete(
475
+ resourceGroupName,
476
+ clusterName,
477
+ arcSettingName,
478
+ extensionName,
479
+ options
480
+ );
481
+ return poller.pollUntilDone();
482
+ }
483
+
484
+ /**
485
+ * ListByArcSettingNext
486
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
487
+ * @param clusterName The name of the cluster.
488
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
489
+ * @param nextLink The nextLink from the previous successful call to the ListByArcSetting method.
490
+ * @param options The options parameters.
491
+ */
492
+ private _listByArcSettingNext(
493
+ resourceGroupName: string,
494
+ clusterName: string,
495
+ arcSettingName: string,
496
+ nextLink: string,
497
+ options?: ExtensionsListByArcSettingNextOptionalParams
498
+ ): Promise<ExtensionsListByArcSettingNextResponse> {
499
+ return this.client.sendOperationRequest(
500
+ { resourceGroupName, clusterName, arcSettingName, nextLink, options },
501
+ listByArcSettingNextOperationSpec
502
+ );
503
+ }
504
+ }
505
+ // Operation Specifications
506
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
507
+
508
+ const listByArcSettingOperationSpec: coreClient.OperationSpec = {
509
+ path:
510
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions",
511
+ httpMethod: "GET",
512
+ responses: {
513
+ 200: {
514
+ bodyMapper: Mappers.ExtensionList
515
+ },
516
+ default: {
517
+ bodyMapper: Mappers.ErrorResponse
518
+ }
519
+ },
520
+ queryParameters: [Parameters.apiVersion],
521
+ urlParameters: [
522
+ Parameters.$host,
523
+ Parameters.subscriptionId,
524
+ Parameters.resourceGroupName,
525
+ Parameters.clusterName,
526
+ Parameters.arcSettingName
527
+ ],
528
+ headerParameters: [Parameters.accept],
529
+ serializer
530
+ };
531
+ const getOperationSpec: coreClient.OperationSpec = {
532
+ path:
533
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}",
534
+ httpMethod: "GET",
535
+ responses: {
536
+ 200: {
537
+ bodyMapper: Mappers.Extension
538
+ },
539
+ default: {
540
+ bodyMapper: Mappers.ErrorResponse
541
+ }
542
+ },
543
+ queryParameters: [Parameters.apiVersion],
544
+ urlParameters: [
545
+ Parameters.$host,
546
+ Parameters.subscriptionId,
547
+ Parameters.resourceGroupName,
548
+ Parameters.clusterName,
549
+ Parameters.arcSettingName,
550
+ Parameters.extensionName
551
+ ],
552
+ headerParameters: [Parameters.accept],
553
+ serializer
554
+ };
555
+ const createOperationSpec: coreClient.OperationSpec = {
556
+ path:
557
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}",
558
+ httpMethod: "PUT",
559
+ responses: {
560
+ 200: {
561
+ bodyMapper: Mappers.Extension
562
+ },
563
+ 201: {
564
+ bodyMapper: Mappers.Extension
565
+ },
566
+ 202: {
567
+ bodyMapper: Mappers.Extension
568
+ },
569
+ 204: {
570
+ bodyMapper: Mappers.Extension
571
+ },
572
+ default: {
573
+ bodyMapper: Mappers.ErrorResponse
574
+ }
575
+ },
576
+ requestBody: Parameters.extension,
577
+ queryParameters: [Parameters.apiVersion],
578
+ urlParameters: [
579
+ Parameters.$host,
580
+ Parameters.subscriptionId,
581
+ Parameters.resourceGroupName,
582
+ Parameters.clusterName,
583
+ Parameters.arcSettingName,
584
+ Parameters.extensionName
585
+ ],
586
+ headerParameters: [Parameters.accept, Parameters.contentType],
587
+ mediaType: "json",
588
+ serializer
589
+ };
590
+ const updateOperationSpec: coreClient.OperationSpec = {
591
+ path:
592
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}",
593
+ httpMethod: "PATCH",
594
+ responses: {
595
+ 200: {
596
+ bodyMapper: Mappers.Extension
597
+ },
598
+ 201: {
599
+ bodyMapper: Mappers.Extension
600
+ },
601
+ 202: {
602
+ bodyMapper: Mappers.Extension
603
+ },
604
+ 204: {
605
+ bodyMapper: Mappers.Extension
606
+ },
607
+ default: {
608
+ bodyMapper: Mappers.ErrorResponse
609
+ }
610
+ },
611
+ requestBody: Parameters.extension,
612
+ queryParameters: [Parameters.apiVersion],
613
+ urlParameters: [
614
+ Parameters.$host,
615
+ Parameters.subscriptionId,
616
+ Parameters.resourceGroupName,
617
+ Parameters.clusterName,
618
+ Parameters.arcSettingName,
619
+ Parameters.extensionName
620
+ ],
621
+ headerParameters: [Parameters.accept, Parameters.contentType],
622
+ mediaType: "json",
623
+ serializer
624
+ };
625
+ const deleteOperationSpec: coreClient.OperationSpec = {
626
+ path:
627
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}",
628
+ httpMethod: "DELETE",
629
+ responses: {
630
+ 200: {},
631
+ 201: {},
632
+ 202: {},
633
+ 204: {},
634
+ default: {
635
+ bodyMapper: Mappers.ErrorResponse
636
+ }
637
+ },
638
+ queryParameters: [Parameters.apiVersion],
639
+ urlParameters: [
640
+ Parameters.$host,
641
+ Parameters.subscriptionId,
642
+ Parameters.resourceGroupName,
643
+ Parameters.clusterName,
644
+ Parameters.arcSettingName,
645
+ Parameters.extensionName
646
+ ],
647
+ headerParameters: [Parameters.accept],
648
+ serializer
649
+ };
650
+ const listByArcSettingNextOperationSpec: coreClient.OperationSpec = {
651
+ path: "{nextLink}",
652
+ httpMethod: "GET",
653
+ responses: {
654
+ 200: {
655
+ bodyMapper: Mappers.ExtensionList
656
+ },
657
+ default: {
658
+ bodyMapper: Mappers.ErrorResponse
659
+ }
660
+ },
661
+ queryParameters: [Parameters.apiVersion],
662
+ urlParameters: [
663
+ Parameters.$host,
664
+ Parameters.subscriptionId,
665
+ Parameters.resourceGroupName,
666
+ Parameters.clusterName,
667
+ Parameters.arcSettingName,
668
+ Parameters.nextLink
669
+ ],
670
+ headerParameters: [Parameters.accept],
671
+ serializer
672
+ };
@@ -1,12 +1,12 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- export * from "./operations";
9
+ export * from "./arcSettings";
12
10
  export * from "./clusters";
11
+ export * from "./extensions";
12
+ export * from "./operations";