@azure/arm-resourceconnector 1.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 (107) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +1754 -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/samples-dev/appliancesCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.js +36 -0
  11. package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/appliancesDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/appliancesDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/appliancesDeleteSample.js +31 -0
  15. package/dist-esm/samples-dev/appliancesDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/appliancesGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/appliancesGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/appliancesGetSample.js +31 -0
  19. package/dist-esm/samples-dev/appliancesGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.js +32 -0
  23. package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.js.map +1 -0
  24. package/dist-esm/samples-dev/appliancesListByResourceGroupSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/appliancesListByResourceGroupSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/appliancesListByResourceGroupSample.js +44 -0
  27. package/dist-esm/samples-dev/appliancesListByResourceGroupSample.js.map +1 -0
  28. package/dist-esm/samples-dev/appliancesListBySubscriptionSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/appliancesListBySubscriptionSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/appliancesListBySubscriptionSample.js +43 -0
  31. package/dist-esm/samples-dev/appliancesListBySubscriptionSample.js.map +1 -0
  32. package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.js +31 -0
  35. package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.js.map +1 -0
  36. package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.js +31 -0
  39. package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.js.map +1 -0
  40. package/dist-esm/samples-dev/appliancesListOperationsSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/appliancesListOperationsSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/appliancesListOperationsSample.js +43 -0
  43. package/dist-esm/samples-dev/appliancesListOperationsSample.js.map +1 -0
  44. package/dist-esm/samples-dev/appliancesUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/appliancesUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/appliancesUpdateSample.js +33 -0
  47. package/dist-esm/samples-dev/appliancesUpdateSample.js.map +1 -0
  48. package/dist-esm/src/index.d.ts +5 -0
  49. package/dist-esm/src/index.d.ts.map +1 -0
  50. package/dist-esm/src/index.js +12 -0
  51. package/dist-esm/src/index.js.map +1 -0
  52. package/dist-esm/src/lroImpl.d.ts +16 -0
  53. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  54. package/dist-esm/src/lroImpl.js +29 -0
  55. package/dist-esm/src/lroImpl.js.map +1 -0
  56. package/dist-esm/src/models/index.d.ts +617 -0
  57. package/dist-esm/src/models/index.d.ts.map +1 -0
  58. package/dist-esm/src/models/index.js +102 -0
  59. package/dist-esm/src/models/index.js.map +1 -0
  60. package/dist-esm/src/models/mappers.d.ts +26 -0
  61. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  62. package/dist-esm/src/models/mappers.js +709 -0
  63. package/dist-esm/src/models/mappers.js.map +1 -0
  64. package/dist-esm/src/models/parameters.d.ts +13 -0
  65. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  66. package/dist-esm/src/models/parameters.js +124 -0
  67. package/dist-esm/src/models/parameters.js.map +1 -0
  68. package/dist-esm/src/operations/appliances.d.ts +144 -0
  69. package/dist-esm/src/operations/appliances.d.ts.map +1 -0
  70. package/dist-esm/src/operations/appliances.js +651 -0
  71. package/dist-esm/src/operations/appliances.js.map +1 -0
  72. package/dist-esm/src/operations/index.d.ts +2 -0
  73. package/dist-esm/src/operations/index.d.ts.map +1 -0
  74. package/dist-esm/src/operations/index.js +9 -0
  75. package/dist-esm/src/operations/index.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/appliances.d.ts +93 -0
  77. package/dist-esm/src/operationsInterfaces/appliances.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/appliances.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/appliances.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
  81. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/index.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  84. package/dist-esm/src/resourceConnectorManagementClient.d.ts +20 -0
  85. package/dist-esm/src/resourceConnectorManagementClient.d.ts.map +1 -0
  86. package/dist-esm/src/resourceConnectorManagementClient.js +95 -0
  87. package/dist-esm/src/resourceConnectorManagementClient.js.map +1 -0
  88. package/dist-esm/test/sampleTest.d.ts +2 -0
  89. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  90. package/dist-esm/test/sampleTest.js +38 -0
  91. package/dist-esm/test/sampleTest.js.map +1 -0
  92. package/package.json +121 -0
  93. package/review/arm-resourceconnector.api.md +400 -0
  94. package/rollup.config.js +122 -0
  95. package/src/index.ts +12 -0
  96. package/src/lroImpl.ts +34 -0
  97. package/src/models/index.ts +684 -0
  98. package/src/models/mappers.ts +748 -0
  99. package/src/models/parameters.ts +145 -0
  100. package/src/operations/appliances.ts +839 -0
  101. package/src/operations/index.ts +9 -0
  102. package/src/operationsInterfaces/appliances.ts +172 -0
  103. package/src/operationsInterfaces/index.ts +9 -0
  104. package/src/resourceConnectorManagementClient.ts +131 -0
  105. package/tsconfig.json +33 -0
  106. package/types/arm-resourceconnector.d.ts +792 -0
  107. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,839 @@
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 { Appliances } 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 { ResourceConnectorManagementClient } from "../resourceConnectorManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ ApplianceOperation,
19
+ AppliancesListOperationsNextOptionalParams,
20
+ AppliancesListOperationsOptionalParams,
21
+ Appliance,
22
+ AppliancesListBySubscriptionNextOptionalParams,
23
+ AppliancesListBySubscriptionOptionalParams,
24
+ AppliancesListByResourceGroupNextOptionalParams,
25
+ AppliancesListByResourceGroupOptionalParams,
26
+ AppliancesListOperationsResponse,
27
+ AppliancesListBySubscriptionResponse,
28
+ AppliancesListByResourceGroupResponse,
29
+ AppliancesGetOptionalParams,
30
+ AppliancesGetResponse,
31
+ AppliancesCreateOrUpdateOptionalParams,
32
+ AppliancesCreateOrUpdateResponse,
33
+ AppliancesDeleteOptionalParams,
34
+ AppliancesUpdateOptionalParams,
35
+ AppliancesUpdateResponse,
36
+ AppliancesListClusterCustomerUserCredentialOptionalParams,
37
+ AppliancesListClusterCustomerUserCredentialResponse,
38
+ AppliancesListClusterUserCredentialOptionalParams,
39
+ AppliancesListClusterUserCredentialResponse,
40
+ AppliancesGetUpgradeGraphOptionalParams,
41
+ AppliancesGetUpgradeGraphResponse,
42
+ AppliancesListOperationsNextResponse,
43
+ AppliancesListBySubscriptionNextResponse,
44
+ AppliancesListByResourceGroupNextResponse
45
+ } from "../models";
46
+
47
+ /// <reference lib="esnext.asynciterable" />
48
+ /** Class containing Appliances operations. */
49
+ export class AppliancesImpl implements Appliances {
50
+ private readonly client: ResourceConnectorManagementClient;
51
+
52
+ /**
53
+ * Initialize a new instance of the class Appliances class.
54
+ * @param client Reference to the service client
55
+ */
56
+ constructor(client: ResourceConnectorManagementClient) {
57
+ this.client = client;
58
+ }
59
+
60
+ /**
61
+ * Lists all available Appliances operations.
62
+ * @param options The options parameters.
63
+ */
64
+ public listOperations(
65
+ options?: AppliancesListOperationsOptionalParams
66
+ ): PagedAsyncIterableIterator<ApplianceOperation> {
67
+ const iter = this.listOperationsPagingAll(options);
68
+ return {
69
+ next() {
70
+ return iter.next();
71
+ },
72
+ [Symbol.asyncIterator]() {
73
+ return this;
74
+ },
75
+ byPage: () => {
76
+ return this.listOperationsPagingPage(options);
77
+ }
78
+ };
79
+ }
80
+
81
+ private async *listOperationsPagingPage(
82
+ options?: AppliancesListOperationsOptionalParams
83
+ ): AsyncIterableIterator<ApplianceOperation[]> {
84
+ let result = await this._listOperations(options);
85
+ yield result.value || [];
86
+ let continuationToken = result.nextLink;
87
+ while (continuationToken) {
88
+ result = await this._listOperationsNext(continuationToken, options);
89
+ continuationToken = result.nextLink;
90
+ yield result.value || [];
91
+ }
92
+ }
93
+
94
+ private async *listOperationsPagingAll(
95
+ options?: AppliancesListOperationsOptionalParams
96
+ ): AsyncIterableIterator<ApplianceOperation> {
97
+ for await (const page of this.listOperationsPagingPage(options)) {
98
+ yield* page;
99
+ }
100
+ }
101
+
102
+ /**
103
+ * Gets a list of Appliances in the specified subscription. The operation returns properties of each
104
+ * Appliance
105
+ * @param options The options parameters.
106
+ */
107
+ public listBySubscription(
108
+ options?: AppliancesListBySubscriptionOptionalParams
109
+ ): PagedAsyncIterableIterator<Appliance> {
110
+ const iter = this.listBySubscriptionPagingAll(options);
111
+ return {
112
+ next() {
113
+ return iter.next();
114
+ },
115
+ [Symbol.asyncIterator]() {
116
+ return this;
117
+ },
118
+ byPage: () => {
119
+ return this.listBySubscriptionPagingPage(options);
120
+ }
121
+ };
122
+ }
123
+
124
+ private async *listBySubscriptionPagingPage(
125
+ options?: AppliancesListBySubscriptionOptionalParams
126
+ ): AsyncIterableIterator<Appliance[]> {
127
+ let result = await this._listBySubscription(options);
128
+ yield result.value || [];
129
+ let continuationToken = result.nextLink;
130
+ while (continuationToken) {
131
+ result = await this._listBySubscriptionNext(continuationToken, options);
132
+ continuationToken = result.nextLink;
133
+ yield result.value || [];
134
+ }
135
+ }
136
+
137
+ private async *listBySubscriptionPagingAll(
138
+ options?: AppliancesListBySubscriptionOptionalParams
139
+ ): AsyncIterableIterator<Appliance> {
140
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
141
+ yield* page;
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Gets a list of Appliances in the specified subscription and resource group. The operation returns
147
+ * properties of each Appliance.
148
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
149
+ * @param options The options parameters.
150
+ */
151
+ public listByResourceGroup(
152
+ resourceGroupName: string,
153
+ options?: AppliancesListByResourceGroupOptionalParams
154
+ ): PagedAsyncIterableIterator<Appliance> {
155
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
156
+ return {
157
+ next() {
158
+ return iter.next();
159
+ },
160
+ [Symbol.asyncIterator]() {
161
+ return this;
162
+ },
163
+ byPage: () => {
164
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
165
+ }
166
+ };
167
+ }
168
+
169
+ private async *listByResourceGroupPagingPage(
170
+ resourceGroupName: string,
171
+ options?: AppliancesListByResourceGroupOptionalParams
172
+ ): AsyncIterableIterator<Appliance[]> {
173
+ let result = await this._listByResourceGroup(resourceGroupName, options);
174
+ yield result.value || [];
175
+ let continuationToken = result.nextLink;
176
+ while (continuationToken) {
177
+ result = await this._listByResourceGroupNext(
178
+ resourceGroupName,
179
+ continuationToken,
180
+ options
181
+ );
182
+ continuationToken = result.nextLink;
183
+ yield result.value || [];
184
+ }
185
+ }
186
+
187
+ private async *listByResourceGroupPagingAll(
188
+ resourceGroupName: string,
189
+ options?: AppliancesListByResourceGroupOptionalParams
190
+ ): AsyncIterableIterator<Appliance> {
191
+ for await (const page of this.listByResourceGroupPagingPage(
192
+ resourceGroupName,
193
+ options
194
+ )) {
195
+ yield* page;
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Lists all available Appliances operations.
201
+ * @param options The options parameters.
202
+ */
203
+ private _listOperations(
204
+ options?: AppliancesListOperationsOptionalParams
205
+ ): Promise<AppliancesListOperationsResponse> {
206
+ return this.client.sendOperationRequest(
207
+ { options },
208
+ listOperationsOperationSpec
209
+ );
210
+ }
211
+
212
+ /**
213
+ * Gets a list of Appliances in the specified subscription. The operation returns properties of each
214
+ * Appliance
215
+ * @param options The options parameters.
216
+ */
217
+ private _listBySubscription(
218
+ options?: AppliancesListBySubscriptionOptionalParams
219
+ ): Promise<AppliancesListBySubscriptionResponse> {
220
+ return this.client.sendOperationRequest(
221
+ { options },
222
+ listBySubscriptionOperationSpec
223
+ );
224
+ }
225
+
226
+ /**
227
+ * Gets a list of Appliances in the specified subscription and resource group. The operation returns
228
+ * properties of each Appliance.
229
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
230
+ * @param options The options parameters.
231
+ */
232
+ private _listByResourceGroup(
233
+ resourceGroupName: string,
234
+ options?: AppliancesListByResourceGroupOptionalParams
235
+ ): Promise<AppliancesListByResourceGroupResponse> {
236
+ return this.client.sendOperationRequest(
237
+ { resourceGroupName, options },
238
+ listByResourceGroupOperationSpec
239
+ );
240
+ }
241
+
242
+ /**
243
+ * Gets the details of an Appliance with a specified resource group and name.
244
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
245
+ * @param resourceName Appliances name.
246
+ * @param options The options parameters.
247
+ */
248
+ get(
249
+ resourceGroupName: string,
250
+ resourceName: string,
251
+ options?: AppliancesGetOptionalParams
252
+ ): Promise<AppliancesGetResponse> {
253
+ return this.client.sendOperationRequest(
254
+ { resourceGroupName, resourceName, options },
255
+ getOperationSpec
256
+ );
257
+ }
258
+
259
+ /**
260
+ * Creates or updates an Appliance in the specified Subscription and Resource Group.
261
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
262
+ * @param resourceName Appliances name.
263
+ * @param parameters Parameters supplied to create or update an Appliance.
264
+ * @param options The options parameters.
265
+ */
266
+ async beginCreateOrUpdate(
267
+ resourceGroupName: string,
268
+ resourceName: string,
269
+ parameters: Appliance,
270
+ options?: AppliancesCreateOrUpdateOptionalParams
271
+ ): Promise<
272
+ PollerLike<
273
+ PollOperationState<AppliancesCreateOrUpdateResponse>,
274
+ AppliancesCreateOrUpdateResponse
275
+ >
276
+ > {
277
+ const directSendOperation = async (
278
+ args: coreClient.OperationArguments,
279
+ spec: coreClient.OperationSpec
280
+ ): Promise<AppliancesCreateOrUpdateResponse> => {
281
+ return this.client.sendOperationRequest(args, spec);
282
+ };
283
+ const sendOperation = async (
284
+ args: coreClient.OperationArguments,
285
+ spec: coreClient.OperationSpec
286
+ ) => {
287
+ let currentRawResponse:
288
+ | coreClient.FullOperationResponse
289
+ | undefined = undefined;
290
+ const providedCallback = args.options?.onResponse;
291
+ const callback: coreClient.RawResponseCallback = (
292
+ rawResponse: coreClient.FullOperationResponse,
293
+ flatResponse: unknown
294
+ ) => {
295
+ currentRawResponse = rawResponse;
296
+ providedCallback?.(rawResponse, flatResponse);
297
+ };
298
+ const updatedArgs = {
299
+ ...args,
300
+ options: {
301
+ ...args.options,
302
+ onResponse: callback
303
+ }
304
+ };
305
+ const flatResponse = await directSendOperation(updatedArgs, spec);
306
+ return {
307
+ flatResponse,
308
+ rawResponse: {
309
+ statusCode: currentRawResponse!.status,
310
+ body: currentRawResponse!.parsedBody,
311
+ headers: currentRawResponse!.headers.toJSON()
312
+ }
313
+ };
314
+ };
315
+
316
+ const lro = new LroImpl(
317
+ sendOperation,
318
+ { resourceGroupName, resourceName, parameters, options },
319
+ createOrUpdateOperationSpec
320
+ );
321
+ const poller = new LroEngine(lro, {
322
+ resumeFrom: options?.resumeFrom,
323
+ intervalInMs: options?.updateIntervalInMs,
324
+ lroResourceLocationConfig: "azure-async-operation"
325
+ });
326
+ await poller.poll();
327
+ return poller;
328
+ }
329
+
330
+ /**
331
+ * Creates or updates an Appliance in the specified Subscription and Resource Group.
332
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
333
+ * @param resourceName Appliances name.
334
+ * @param parameters Parameters supplied to create or update an Appliance.
335
+ * @param options The options parameters.
336
+ */
337
+ async beginCreateOrUpdateAndWait(
338
+ resourceGroupName: string,
339
+ resourceName: string,
340
+ parameters: Appliance,
341
+ options?: AppliancesCreateOrUpdateOptionalParams
342
+ ): Promise<AppliancesCreateOrUpdateResponse> {
343
+ const poller = await this.beginCreateOrUpdate(
344
+ resourceGroupName,
345
+ resourceName,
346
+ parameters,
347
+ options
348
+ );
349
+ return poller.pollUntilDone();
350
+ }
351
+
352
+ /**
353
+ * Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id.
354
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
355
+ * @param resourceName Appliances name.
356
+ * @param options The options parameters.
357
+ */
358
+ async beginDelete(
359
+ resourceGroupName: string,
360
+ resourceName: string,
361
+ options?: AppliancesDeleteOptionalParams
362
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
363
+ const directSendOperation = async (
364
+ args: coreClient.OperationArguments,
365
+ spec: coreClient.OperationSpec
366
+ ): Promise<void> => {
367
+ return this.client.sendOperationRequest(args, spec);
368
+ };
369
+ const sendOperation = async (
370
+ args: coreClient.OperationArguments,
371
+ spec: coreClient.OperationSpec
372
+ ) => {
373
+ let currentRawResponse:
374
+ | coreClient.FullOperationResponse
375
+ | undefined = undefined;
376
+ const providedCallback = args.options?.onResponse;
377
+ const callback: coreClient.RawResponseCallback = (
378
+ rawResponse: coreClient.FullOperationResponse,
379
+ flatResponse: unknown
380
+ ) => {
381
+ currentRawResponse = rawResponse;
382
+ providedCallback?.(rawResponse, flatResponse);
383
+ };
384
+ const updatedArgs = {
385
+ ...args,
386
+ options: {
387
+ ...args.options,
388
+ onResponse: callback
389
+ }
390
+ };
391
+ const flatResponse = await directSendOperation(updatedArgs, spec);
392
+ return {
393
+ flatResponse,
394
+ rawResponse: {
395
+ statusCode: currentRawResponse!.status,
396
+ body: currentRawResponse!.parsedBody,
397
+ headers: currentRawResponse!.headers.toJSON()
398
+ }
399
+ };
400
+ };
401
+
402
+ const lro = new LroImpl(
403
+ sendOperation,
404
+ { resourceGroupName, resourceName, options },
405
+ deleteOperationSpec
406
+ );
407
+ const poller = new LroEngine(lro, {
408
+ resumeFrom: options?.resumeFrom,
409
+ intervalInMs: options?.updateIntervalInMs,
410
+ lroResourceLocationConfig: "azure-async-operation"
411
+ });
412
+ await poller.poll();
413
+ return poller;
414
+ }
415
+
416
+ /**
417
+ * Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id.
418
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
419
+ * @param resourceName Appliances name.
420
+ * @param options The options parameters.
421
+ */
422
+ async beginDeleteAndWait(
423
+ resourceGroupName: string,
424
+ resourceName: string,
425
+ options?: AppliancesDeleteOptionalParams
426
+ ): Promise<void> {
427
+ const poller = await this.beginDelete(
428
+ resourceGroupName,
429
+ resourceName,
430
+ options
431
+ );
432
+ return poller.pollUntilDone();
433
+ }
434
+
435
+ /**
436
+ * Updates an Appliance with the specified Resource Name in the specified Resource Group and
437
+ * Subscription.
438
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
439
+ * @param resourceName Appliances name.
440
+ * @param options The options parameters.
441
+ */
442
+ update(
443
+ resourceGroupName: string,
444
+ resourceName: string,
445
+ options?: AppliancesUpdateOptionalParams
446
+ ): Promise<AppliancesUpdateResponse> {
447
+ return this.client.sendOperationRequest(
448
+ { resourceGroupName, resourceName, options },
449
+ updateOperationSpec
450
+ );
451
+ }
452
+
453
+ /**
454
+ * Returns the cluster customer user credentials for the dedicated appliance.
455
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
456
+ * @param resourceName Appliances name.
457
+ * @param options The options parameters.
458
+ */
459
+ listClusterCustomerUserCredential(
460
+ resourceGroupName: string,
461
+ resourceName: string,
462
+ options?: AppliancesListClusterCustomerUserCredentialOptionalParams
463
+ ): Promise<AppliancesListClusterCustomerUserCredentialResponse> {
464
+ return this.client.sendOperationRequest(
465
+ { resourceGroupName, resourceName, options },
466
+ listClusterCustomerUserCredentialOperationSpec
467
+ );
468
+ }
469
+
470
+ /**
471
+ * Returns the cluster user credentials for the dedicated appliance.
472
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
473
+ * @param resourceName Appliances name.
474
+ * @param options The options parameters.
475
+ */
476
+ listClusterUserCredential(
477
+ resourceGroupName: string,
478
+ resourceName: string,
479
+ options?: AppliancesListClusterUserCredentialOptionalParams
480
+ ): Promise<AppliancesListClusterUserCredentialResponse> {
481
+ return this.client.sendOperationRequest(
482
+ { resourceGroupName, resourceName, options },
483
+ listClusterUserCredentialOperationSpec
484
+ );
485
+ }
486
+
487
+ /**
488
+ * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release
489
+ * train.
490
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
491
+ * @param resourceName Appliances name.
492
+ * @param upgradeGraph Upgrade graph version, ex - stable
493
+ * @param options The options parameters.
494
+ */
495
+ getUpgradeGraph(
496
+ resourceGroupName: string,
497
+ resourceName: string,
498
+ upgradeGraph: string,
499
+ options?: AppliancesGetUpgradeGraphOptionalParams
500
+ ): Promise<AppliancesGetUpgradeGraphResponse> {
501
+ return this.client.sendOperationRequest(
502
+ { resourceGroupName, resourceName, upgradeGraph, options },
503
+ getUpgradeGraphOperationSpec
504
+ );
505
+ }
506
+
507
+ /**
508
+ * ListOperationsNext
509
+ * @param nextLink The nextLink from the previous successful call to the ListOperations method.
510
+ * @param options The options parameters.
511
+ */
512
+ private _listOperationsNext(
513
+ nextLink: string,
514
+ options?: AppliancesListOperationsNextOptionalParams
515
+ ): Promise<AppliancesListOperationsNextResponse> {
516
+ return this.client.sendOperationRequest(
517
+ { nextLink, options },
518
+ listOperationsNextOperationSpec
519
+ );
520
+ }
521
+
522
+ /**
523
+ * ListBySubscriptionNext
524
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
525
+ * @param options The options parameters.
526
+ */
527
+ private _listBySubscriptionNext(
528
+ nextLink: string,
529
+ options?: AppliancesListBySubscriptionNextOptionalParams
530
+ ): Promise<AppliancesListBySubscriptionNextResponse> {
531
+ return this.client.sendOperationRequest(
532
+ { nextLink, options },
533
+ listBySubscriptionNextOperationSpec
534
+ );
535
+ }
536
+
537
+ /**
538
+ * ListByResourceGroupNext
539
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
540
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
541
+ * @param options The options parameters.
542
+ */
543
+ private _listByResourceGroupNext(
544
+ resourceGroupName: string,
545
+ nextLink: string,
546
+ options?: AppliancesListByResourceGroupNextOptionalParams
547
+ ): Promise<AppliancesListByResourceGroupNextResponse> {
548
+ return this.client.sendOperationRequest(
549
+ { resourceGroupName, nextLink, options },
550
+ listByResourceGroupNextOperationSpec
551
+ );
552
+ }
553
+ }
554
+ // Operation Specifications
555
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
556
+
557
+ const listOperationsOperationSpec: coreClient.OperationSpec = {
558
+ path: "/providers/Microsoft.ResourceConnector/operations",
559
+ httpMethod: "GET",
560
+ responses: {
561
+ 200: {
562
+ bodyMapper: Mappers.ApplianceOperationsList
563
+ },
564
+ default: {
565
+ bodyMapper: Mappers.ErrorResponse
566
+ }
567
+ },
568
+ queryParameters: [Parameters.apiVersion],
569
+ urlParameters: [Parameters.$host],
570
+ headerParameters: [Parameters.accept],
571
+ serializer
572
+ };
573
+ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
574
+ path:
575
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/appliances",
576
+ httpMethod: "GET",
577
+ responses: {
578
+ 200: {
579
+ bodyMapper: Mappers.ApplianceListResult
580
+ },
581
+ default: {
582
+ bodyMapper: Mappers.ErrorResponse
583
+ }
584
+ },
585
+ queryParameters: [Parameters.apiVersion],
586
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
587
+ headerParameters: [Parameters.accept],
588
+ serializer
589
+ };
590
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
591
+ path:
592
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances",
593
+ httpMethod: "GET",
594
+ responses: {
595
+ 200: {
596
+ bodyMapper: Mappers.ApplianceListResult
597
+ },
598
+ default: {
599
+ bodyMapper: Mappers.ErrorResponse
600
+ }
601
+ },
602
+ queryParameters: [Parameters.apiVersion],
603
+ urlParameters: [
604
+ Parameters.$host,
605
+ Parameters.subscriptionId,
606
+ Parameters.resourceGroupName
607
+ ],
608
+ headerParameters: [Parameters.accept],
609
+ serializer
610
+ };
611
+ const getOperationSpec: coreClient.OperationSpec = {
612
+ path:
613
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}",
614
+ httpMethod: "GET",
615
+ responses: {
616
+ 200: {
617
+ bodyMapper: Mappers.Appliance
618
+ },
619
+ default: {
620
+ bodyMapper: Mappers.ErrorResponse
621
+ }
622
+ },
623
+ queryParameters: [Parameters.apiVersion],
624
+ urlParameters: [
625
+ Parameters.$host,
626
+ Parameters.subscriptionId,
627
+ Parameters.resourceGroupName,
628
+ Parameters.resourceName
629
+ ],
630
+ headerParameters: [Parameters.accept],
631
+ serializer
632
+ };
633
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
634
+ path:
635
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}",
636
+ httpMethod: "PUT",
637
+ responses: {
638
+ 200: {
639
+ bodyMapper: Mappers.Appliance
640
+ },
641
+ 201: {
642
+ bodyMapper: Mappers.Appliance
643
+ },
644
+ 202: {
645
+ bodyMapper: Mappers.Appliance
646
+ },
647
+ 204: {
648
+ bodyMapper: Mappers.Appliance
649
+ },
650
+ default: {
651
+ bodyMapper: Mappers.ErrorResponse
652
+ }
653
+ },
654
+ requestBody: Parameters.parameters,
655
+ queryParameters: [Parameters.apiVersion],
656
+ urlParameters: [
657
+ Parameters.$host,
658
+ Parameters.subscriptionId,
659
+ Parameters.resourceGroupName,
660
+ Parameters.resourceName
661
+ ],
662
+ headerParameters: [Parameters.accept, Parameters.contentType],
663
+ mediaType: "json",
664
+ serializer
665
+ };
666
+ const deleteOperationSpec: coreClient.OperationSpec = {
667
+ path:
668
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}",
669
+ httpMethod: "DELETE",
670
+ responses: {
671
+ 200: {},
672
+ 201: {},
673
+ 202: {},
674
+ 204: {},
675
+ default: {
676
+ bodyMapper: Mappers.ErrorResponse
677
+ }
678
+ },
679
+ queryParameters: [Parameters.apiVersion],
680
+ urlParameters: [
681
+ Parameters.$host,
682
+ Parameters.subscriptionId,
683
+ Parameters.resourceGroupName,
684
+ Parameters.resourceName
685
+ ],
686
+ headerParameters: [Parameters.accept],
687
+ serializer
688
+ };
689
+ const updateOperationSpec: coreClient.OperationSpec = {
690
+ path:
691
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}",
692
+ httpMethod: "PATCH",
693
+ responses: {
694
+ 200: {
695
+ bodyMapper: Mappers.Appliance
696
+ },
697
+ default: {
698
+ bodyMapper: Mappers.ErrorResponse
699
+ }
700
+ },
701
+ requestBody: {
702
+ parameterPath: { tags: ["options", "tags"] },
703
+ mapper: { ...Mappers.PatchableAppliance, required: true }
704
+ },
705
+ queryParameters: [Parameters.apiVersion],
706
+ urlParameters: [
707
+ Parameters.$host,
708
+ Parameters.subscriptionId,
709
+ Parameters.resourceGroupName,
710
+ Parameters.resourceName
711
+ ],
712
+ headerParameters: [Parameters.accept, Parameters.contentType],
713
+ mediaType: "json",
714
+ serializer
715
+ };
716
+ const listClusterCustomerUserCredentialOperationSpec: coreClient.OperationSpec = {
717
+ path:
718
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterCustomerUserCredential",
719
+ httpMethod: "POST",
720
+ responses: {
721
+ 200: {
722
+ bodyMapper: Mappers.ApplianceListClusterCustomerUserCredentialResults
723
+ },
724
+ default: {
725
+ bodyMapper: Mappers.ErrorResponse
726
+ }
727
+ },
728
+ queryParameters: [Parameters.apiVersion],
729
+ urlParameters: [
730
+ Parameters.$host,
731
+ Parameters.subscriptionId,
732
+ Parameters.resourceGroupName,
733
+ Parameters.resourceName
734
+ ],
735
+ headerParameters: [Parameters.accept],
736
+ serializer
737
+ };
738
+ const listClusterUserCredentialOperationSpec: coreClient.OperationSpec = {
739
+ path:
740
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential",
741
+ httpMethod: "POST",
742
+ responses: {
743
+ 200: {
744
+ bodyMapper: Mappers.ApplianceListCredentialResults
745
+ },
746
+ default: {
747
+ bodyMapper: Mappers.ErrorResponse
748
+ }
749
+ },
750
+ queryParameters: [Parameters.apiVersion],
751
+ urlParameters: [
752
+ Parameters.$host,
753
+ Parameters.subscriptionId,
754
+ Parameters.resourceGroupName,
755
+ Parameters.resourceName
756
+ ],
757
+ headerParameters: [Parameters.accept],
758
+ serializer
759
+ };
760
+ const getUpgradeGraphOperationSpec: coreClient.OperationSpec = {
761
+ path:
762
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/upgradeGraphs/{upgradeGraph}",
763
+ httpMethod: "GET",
764
+ responses: {
765
+ 200: {
766
+ bodyMapper: Mappers.UpgradeGraph
767
+ },
768
+ default: {
769
+ bodyMapper: Mappers.ErrorResponse
770
+ }
771
+ },
772
+ queryParameters: [Parameters.apiVersion],
773
+ urlParameters: [
774
+ Parameters.$host,
775
+ Parameters.subscriptionId,
776
+ Parameters.resourceGroupName,
777
+ Parameters.resourceName,
778
+ Parameters.upgradeGraph
779
+ ],
780
+ headerParameters: [Parameters.accept],
781
+ serializer
782
+ };
783
+ const listOperationsNextOperationSpec: coreClient.OperationSpec = {
784
+ path: "{nextLink}",
785
+ httpMethod: "GET",
786
+ responses: {
787
+ 200: {
788
+ bodyMapper: Mappers.ApplianceOperationsList
789
+ },
790
+ default: {
791
+ bodyMapper: Mappers.ErrorResponse
792
+ }
793
+ },
794
+ queryParameters: [Parameters.apiVersion],
795
+ urlParameters: [Parameters.$host, Parameters.nextLink],
796
+ headerParameters: [Parameters.accept],
797
+ serializer
798
+ };
799
+ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
800
+ path: "{nextLink}",
801
+ httpMethod: "GET",
802
+ responses: {
803
+ 200: {
804
+ bodyMapper: Mappers.ApplianceListResult
805
+ },
806
+ default: {
807
+ bodyMapper: Mappers.ErrorResponse
808
+ }
809
+ },
810
+ queryParameters: [Parameters.apiVersion],
811
+ urlParameters: [
812
+ Parameters.$host,
813
+ Parameters.subscriptionId,
814
+ Parameters.nextLink
815
+ ],
816
+ headerParameters: [Parameters.accept],
817
+ serializer
818
+ };
819
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
820
+ path: "{nextLink}",
821
+ httpMethod: "GET",
822
+ responses: {
823
+ 200: {
824
+ bodyMapper: Mappers.ApplianceListResult
825
+ },
826
+ default: {
827
+ bodyMapper: Mappers.ErrorResponse
828
+ }
829
+ },
830
+ queryParameters: [Parameters.apiVersion],
831
+ urlParameters: [
832
+ Parameters.$host,
833
+ Parameters.subscriptionId,
834
+ Parameters.resourceGroupName,
835
+ Parameters.nextLink
836
+ ],
837
+ headerParameters: [Parameters.accept],
838
+ serializer
839
+ };