@azure/arm-azurestackhci 4.0.0-alpha.20250718.1 → 4.0.0-alpha.20250730.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 (139) hide show
  1. package/dist/browser/azureStackHCIClient.js +26 -5
  2. package/dist/browser/azureStackHCIClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +313 -148
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/arcSettings.js +56 -58
  8. package/dist/browser/operations/arcSettings.js.map +1 -1
  9. package/dist/browser/operations/clusters.js +111 -115
  10. package/dist/browser/operations/clusters.js.map +1 -1
  11. package/dist/browser/operations/deploymentSettings.js +45 -52
  12. package/dist/browser/operations/deploymentSettings.js.map +1 -1
  13. package/dist/browser/operations/edgeDevices.js +56 -58
  14. package/dist/browser/operations/edgeDevices.js.map +1 -1
  15. package/dist/browser/operations/extensions.js +67 -64
  16. package/dist/browser/operations/extensions.js.map +1 -1
  17. package/dist/browser/operations/offers.js +45 -79
  18. package/dist/browser/operations/offers.js.map +1 -1
  19. package/dist/browser/operations/operations.js +1 -0
  20. package/dist/browser/operations/operations.js.map +1 -1
  21. package/dist/browser/operations/publishers.js +23 -40
  22. package/dist/browser/operations/publishers.js.map +1 -1
  23. package/dist/browser/operations/securitySettings.js +45 -52
  24. package/dist/browser/operations/securitySettings.js.map +1 -1
  25. package/dist/browser/operations/skus.js +23 -40
  26. package/dist/browser/operations/skus.js.map +1 -1
  27. package/dist/browser/operations/updateRuns.js +34 -46
  28. package/dist/browser/operations/updateRuns.js.map +1 -1
  29. package/dist/browser/operations/updateSummariesOperations.js +34 -46
  30. package/dist/browser/operations/updateSummariesOperations.js.map +1 -1
  31. package/dist/browser/operations/updates.js +45 -52
  32. package/dist/browser/operations/updates.js.map +1 -1
  33. package/dist/browser/pagingHelper.js +2 -4
  34. package/dist/browser/pagingHelper.js.map +1 -1
  35. package/dist/commonjs/azureStackHCIClient.js +26 -5
  36. package/dist/commonjs/azureStackHCIClient.js.map +1 -1
  37. package/dist/commonjs/lroImpl.js +7 -3
  38. package/dist/commonjs/lroImpl.js.map +1 -1
  39. package/dist/commonjs/models/mappers.js +313 -148
  40. package/dist/commonjs/models/mappers.js.map +1 -1
  41. package/dist/commonjs/operations/arcSettings.js +56 -57
  42. package/dist/commonjs/operations/arcSettings.js.map +1 -1
  43. package/dist/commonjs/operations/clusters.js +111 -114
  44. package/dist/commonjs/operations/clusters.js.map +1 -1
  45. package/dist/commonjs/operations/deploymentSettings.js +45 -51
  46. package/dist/commonjs/operations/deploymentSettings.js.map +1 -1
  47. package/dist/commonjs/operations/edgeDevices.js +56 -57
  48. package/dist/commonjs/operations/edgeDevices.js.map +1 -1
  49. package/dist/commonjs/operations/extensions.js +67 -63
  50. package/dist/commonjs/operations/extensions.js.map +1 -1
  51. package/dist/commonjs/operations/offers.js +45 -78
  52. package/dist/commonjs/operations/offers.js.map +1 -1
  53. package/dist/commonjs/operations/operations.js +1 -0
  54. package/dist/commonjs/operations/operations.js.map +1 -1
  55. package/dist/commonjs/operations/publishers.js +23 -39
  56. package/dist/commonjs/operations/publishers.js.map +1 -1
  57. package/dist/commonjs/operations/securitySettings.js +45 -51
  58. package/dist/commonjs/operations/securitySettings.js.map +1 -1
  59. package/dist/commonjs/operations/skus.js +23 -39
  60. package/dist/commonjs/operations/skus.js.map +1 -1
  61. package/dist/commonjs/operations/updateRuns.js +34 -45
  62. package/dist/commonjs/operations/updateRuns.js.map +1 -1
  63. package/dist/commonjs/operations/updateSummariesOperations.js +34 -45
  64. package/dist/commonjs/operations/updateSummariesOperations.js.map +1 -1
  65. package/dist/commonjs/operations/updates.js +45 -51
  66. package/dist/commonjs/operations/updates.js.map +1 -1
  67. package/dist/commonjs/pagingHelper.js +2 -4
  68. package/dist/commonjs/pagingHelper.js.map +1 -1
  69. package/dist/commonjs/tsdoc-metadata.json +11 -11
  70. package/dist/esm/azureStackHCIClient.js +26 -5
  71. package/dist/esm/azureStackHCIClient.js.map +1 -1
  72. package/dist/esm/lroImpl.js +7 -3
  73. package/dist/esm/lroImpl.js.map +1 -1
  74. package/dist/esm/models/mappers.js +313 -148
  75. package/dist/esm/models/mappers.js.map +1 -1
  76. package/dist/esm/operations/arcSettings.js +56 -58
  77. package/dist/esm/operations/arcSettings.js.map +1 -1
  78. package/dist/esm/operations/clusters.js +111 -115
  79. package/dist/esm/operations/clusters.js.map +1 -1
  80. package/dist/esm/operations/deploymentSettings.js +45 -52
  81. package/dist/esm/operations/deploymentSettings.js.map +1 -1
  82. package/dist/esm/operations/edgeDevices.js +56 -58
  83. package/dist/esm/operations/edgeDevices.js.map +1 -1
  84. package/dist/esm/operations/extensions.js +67 -64
  85. package/dist/esm/operations/extensions.js.map +1 -1
  86. package/dist/esm/operations/offers.js +45 -79
  87. package/dist/esm/operations/offers.js.map +1 -1
  88. package/dist/esm/operations/operations.js +1 -0
  89. package/dist/esm/operations/operations.js.map +1 -1
  90. package/dist/esm/operations/publishers.js +23 -40
  91. package/dist/esm/operations/publishers.js.map +1 -1
  92. package/dist/esm/operations/securitySettings.js +45 -52
  93. package/dist/esm/operations/securitySettings.js.map +1 -1
  94. package/dist/esm/operations/skus.js +23 -40
  95. package/dist/esm/operations/skus.js.map +1 -1
  96. package/dist/esm/operations/updateRuns.js +34 -46
  97. package/dist/esm/operations/updateRuns.js.map +1 -1
  98. package/dist/esm/operations/updateSummariesOperations.js +34 -46
  99. package/dist/esm/operations/updateSummariesOperations.js.map +1 -1
  100. package/dist/esm/operations/updates.js +45 -52
  101. package/dist/esm/operations/updates.js.map +1 -1
  102. package/dist/esm/pagingHelper.js +2 -4
  103. package/dist/esm/pagingHelper.js.map +1 -1
  104. package/dist/react-native/azureStackHCIClient.js +26 -5
  105. package/dist/react-native/azureStackHCIClient.js.map +1 -1
  106. package/dist/react-native/lroImpl.js +7 -3
  107. package/dist/react-native/lroImpl.js.map +1 -1
  108. package/dist/react-native/models/mappers.js +313 -148
  109. package/dist/react-native/models/mappers.js.map +1 -1
  110. package/dist/react-native/operations/arcSettings.js +56 -58
  111. package/dist/react-native/operations/arcSettings.js.map +1 -1
  112. package/dist/react-native/operations/clusters.js +111 -115
  113. package/dist/react-native/operations/clusters.js.map +1 -1
  114. package/dist/react-native/operations/deploymentSettings.js +45 -52
  115. package/dist/react-native/operations/deploymentSettings.js.map +1 -1
  116. package/dist/react-native/operations/edgeDevices.js +56 -58
  117. package/dist/react-native/operations/edgeDevices.js.map +1 -1
  118. package/dist/react-native/operations/extensions.js +67 -64
  119. package/dist/react-native/operations/extensions.js.map +1 -1
  120. package/dist/react-native/operations/offers.js +45 -79
  121. package/dist/react-native/operations/offers.js.map +1 -1
  122. package/dist/react-native/operations/operations.js +1 -0
  123. package/dist/react-native/operations/operations.js.map +1 -1
  124. package/dist/react-native/operations/publishers.js +23 -40
  125. package/dist/react-native/operations/publishers.js.map +1 -1
  126. package/dist/react-native/operations/securitySettings.js +45 -52
  127. package/dist/react-native/operations/securitySettings.js.map +1 -1
  128. package/dist/react-native/operations/skus.js +23 -40
  129. package/dist/react-native/operations/skus.js.map +1 -1
  130. package/dist/react-native/operations/updateRuns.js +34 -46
  131. package/dist/react-native/operations/updateRuns.js.map +1 -1
  132. package/dist/react-native/operations/updateSummariesOperations.js +34 -46
  133. package/dist/react-native/operations/updateSummariesOperations.js.map +1 -1
  134. package/dist/react-native/operations/updates.js +45 -52
  135. package/dist/react-native/operations/updates.js.map +1 -1
  136. package/dist/react-native/pagingHelper.js +2 -4
  137. package/dist/react-native/pagingHelper.js.map +1 -1
  138. package/package.json +2 -2
  139. package/review/arm-azurestackhci-node.api.md +2416 -2416
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing EdgeDevices operations. */
17
16
  export class EdgeDevicesImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class EdgeDevices class.
20
20
  * @param client Reference to the service client
@@ -37,52 +37,35 @@ export class EdgeDevicesImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listPagingPage(resourceUri, options, settings);
44
44
  },
45
45
  };
46
46
  }
47
- listPagingPage(resourceUri, options, settings) {
48
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield __await(this._list(resourceUri, options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- setContinuationToken(page, continuationToken);
56
- yield yield __await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield __await(this._listNext(resourceUri, continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- setContinuationToken(page, continuationToken);
63
- yield yield __await(page);
64
- }
65
- });
47
+ async *listPagingPage(resourceUri, options, settings) {
48
+ let result;
49
+ let continuationToken = settings?.continuationToken;
50
+ if (!continuationToken) {
51
+ result = await this._list(resourceUri, options);
52
+ let page = result.value || [];
53
+ continuationToken = result.nextLink;
54
+ setContinuationToken(page, continuationToken);
55
+ yield page;
56
+ }
57
+ while (continuationToken) {
58
+ result = await this._listNext(resourceUri, continuationToken, options);
59
+ continuationToken = result.nextLink;
60
+ let page = result.value || [];
61
+ setContinuationToken(page, continuationToken);
62
+ yield page;
63
+ }
66
64
  }
67
- listPagingAll(resourceUri, options) {
68
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
65
+ async *listPagingAll(resourceUri, options) {
66
+ for await (const page of this.listPagingPage(resourceUri, options)) {
67
+ yield* page;
68
+ }
86
69
  }
87
70
  /**
88
71
  * List EdgeDevice resources by parent
@@ -113,14 +96,19 @@ export class EdgeDevicesImpl {
113
96
  return this.client.sendOperationRequest(args, spec);
114
97
  };
115
98
  const sendOperationFn = async (args, spec) => {
116
- var _a;
117
99
  let currentRawResponse = undefined;
118
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
100
+ const providedCallback = args.options?.onResponse;
119
101
  const callback = (rawResponse, flatResponse) => {
120
102
  currentRawResponse = rawResponse;
121
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
103
+ providedCallback?.(rawResponse, flatResponse);
104
+ };
105
+ const updatedArgs = {
106
+ ...args,
107
+ options: {
108
+ ...args.options,
109
+ onResponse: callback,
110
+ },
122
111
  };
123
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
124
112
  const flatResponse = await directSendOperation(updatedArgs, spec);
125
113
  return {
126
114
  flatResponse,
@@ -137,8 +125,8 @@ export class EdgeDevicesImpl {
137
125
  spec: createOrUpdateOperationSpec,
138
126
  });
139
127
  const poller = await createHttpPoller(lro, {
140
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
141
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
128
+ restoreFrom: options?.resumeFrom,
129
+ intervalInMs: options?.updateIntervalInMs,
142
130
  resourceLocationConfig: "azure-async-operation",
143
131
  });
144
132
  await poller.poll();
@@ -166,14 +154,19 @@ export class EdgeDevicesImpl {
166
154
  return this.client.sendOperationRequest(args, spec);
167
155
  };
168
156
  const sendOperationFn = async (args, spec) => {
169
- var _a;
170
157
  let currentRawResponse = undefined;
171
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
158
+ const providedCallback = args.options?.onResponse;
172
159
  const callback = (rawResponse, flatResponse) => {
173
160
  currentRawResponse = rawResponse;
174
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
161
+ providedCallback?.(rawResponse, flatResponse);
162
+ };
163
+ const updatedArgs = {
164
+ ...args,
165
+ options: {
166
+ ...args.options,
167
+ onResponse: callback,
168
+ },
175
169
  };
176
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
177
170
  const flatResponse = await directSendOperation(updatedArgs, spec);
178
171
  return {
179
172
  flatResponse,
@@ -190,8 +183,8 @@ export class EdgeDevicesImpl {
190
183
  spec: deleteOperationSpec,
191
184
  });
192
185
  const poller = await createHttpPoller(lro, {
193
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
194
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
186
+ restoreFrom: options?.resumeFrom,
187
+ intervalInMs: options?.updateIntervalInMs,
195
188
  resourceLocationConfig: "location",
196
189
  });
197
190
  await poller.poll();
@@ -219,14 +212,19 @@ export class EdgeDevicesImpl {
219
212
  return this.client.sendOperationRequest(args, spec);
220
213
  };
221
214
  const sendOperationFn = async (args, spec) => {
222
- var _a;
223
215
  let currentRawResponse = undefined;
224
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
216
+ const providedCallback = args.options?.onResponse;
225
217
  const callback = (rawResponse, flatResponse) => {
226
218
  currentRawResponse = rawResponse;
227
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
219
+ providedCallback?.(rawResponse, flatResponse);
220
+ };
221
+ const updatedArgs = {
222
+ ...args,
223
+ options: {
224
+ ...args.options,
225
+ onResponse: callback,
226
+ },
228
227
  };
229
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
230
228
  const flatResponse = await directSendOperation(updatedArgs, spec);
231
229
  return {
232
230
  flatResponse,
@@ -243,8 +241,8 @@ export class EdgeDevicesImpl {
243
241
  spec: validateOperationSpec,
244
242
  });
245
243
  const poller = await createHttpPoller(lro, {
246
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
247
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
244
+ restoreFrom: options?.resumeFrom,
245
+ intervalInMs: options?.updateIntervalInMs,
248
246
  resourceLocationConfig: "location",
249
247
  });
250
248
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"edgeDevices.js","sourceRoot":"","sources":["../../../src/operations/edgeDevices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAkB9C,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAA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,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,wFAAwF;IAC9F,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,eAAe;IACvC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EdgeDevices } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureStackHCIClient } from \"../azureStackHCIClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n EdgeDeviceUnion,\n EdgeDevicesListNextOptionalParams,\n EdgeDevicesListOptionalParams,\n EdgeDevicesListResponse,\n EdgeDevicesGetOptionalParams,\n EdgeDevicesGetResponse,\n EdgeDevicesCreateOrUpdateOptionalParams,\n EdgeDevicesCreateOrUpdateResponse,\n EdgeDevicesDeleteOptionalParams,\n EdgeDevicesDeleteResponse,\n ValidateRequest,\n EdgeDevicesValidateOptionalParams,\n EdgeDevicesValidateResponse,\n EdgeDevicesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EdgeDevices operations. */\nexport class EdgeDevicesImpl implements EdgeDevices {\n private readonly client: AzureStackHCIClient;\n\n /**\n * Initialize a new instance of the class EdgeDevices class.\n * @param client Reference to the service client\n */\n constructor(client: AzureStackHCIClient) {\n this.client = client;\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): PagedAsyncIterableIterator<EdgeDeviceUnion> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EdgeDeviceUnion[]> {\n let result: EdgeDevicesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceUri, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(resourceUri, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): AsyncIterableIterator<EdgeDeviceUnion> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): Promise<EdgeDevicesListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesGetOptionalParams,\n ): Promise<EdgeDevicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, edgeDeviceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesCreateOrUpdateResponse>,\n EdgeDevicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceUri, edgeDeviceName, resource, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesCreateOrUpdateResponse,\n OperationState<EdgeDevicesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceUri,\n edgeDeviceName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDelete(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesDeleteResponse>,\n EdgeDevicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceUri, edgeDeviceName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesDeleteResponse,\n OperationState<EdgeDevicesDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<EdgeDevicesDeleteResponse> {\n const poller = await this.beginDelete(resourceUri, edgeDeviceName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidate(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesValidateResponse>,\n EdgeDevicesValidateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesValidateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceUri, edgeDeviceName, validateRequest, options },\n spec: validateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesValidateResponse,\n OperationState<EdgeDevicesValidateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<EdgeDevicesValidateResponse> {\n const poller = await this.beginValidate(\n resourceUri,\n edgeDeviceName,\n validateRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n resourceUri: string,\n nextLink: string,\n options?: EdgeDevicesListNextOptionalParams,\n ): Promise<EdgeDevicesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 201: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 202: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 204: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst validateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 201: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 202: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 204: {\n bodyMapper: Mappers.ValidateResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.validateRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceUri,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"edgeDevices.js","sourceRoot":"","sources":["../../../src/operations/edgeDevices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAkB9C,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,WAAmB,EACnB,OAAuC;QAEvC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACtD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EA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YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EdgeDevices } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureStackHCIClient } from \"../azureStackHCIClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n EdgeDeviceUnion,\n EdgeDevicesListNextOptionalParams,\n EdgeDevicesListOptionalParams,\n EdgeDevicesListResponse,\n EdgeDevicesGetOptionalParams,\n EdgeDevicesGetResponse,\n EdgeDevicesCreateOrUpdateOptionalParams,\n EdgeDevicesCreateOrUpdateResponse,\n EdgeDevicesDeleteOptionalParams,\n EdgeDevicesDeleteResponse,\n ValidateRequest,\n EdgeDevicesValidateOptionalParams,\n EdgeDevicesValidateResponse,\n EdgeDevicesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EdgeDevices operations. */\nexport class EdgeDevicesImpl implements EdgeDevices {\n private readonly client: AzureStackHCIClient;\n\n /**\n * Initialize a new instance of the class EdgeDevices class.\n * @param client Reference to the service client\n */\n constructor(client: AzureStackHCIClient) {\n this.client = client;\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): PagedAsyncIterableIterator<EdgeDeviceUnion> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EdgeDeviceUnion[]> {\n let result: EdgeDevicesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceUri, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(resourceUri, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): AsyncIterableIterator<EdgeDeviceUnion> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): Promise<EdgeDevicesListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesGetOptionalParams,\n ): Promise<EdgeDevicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, edgeDeviceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesCreateOrUpdateResponse>,\n EdgeDevicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceUri, edgeDeviceName, resource, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesCreateOrUpdateResponse,\n OperationState<EdgeDevicesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceUri,\n edgeDeviceName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDelete(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesDeleteResponse>,\n EdgeDevicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceUri, edgeDeviceName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesDeleteResponse,\n OperationState<EdgeDevicesDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<EdgeDevicesDeleteResponse> {\n const poller = await this.beginDelete(resourceUri, edgeDeviceName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidate(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesValidateResponse>,\n EdgeDevicesValidateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesValidateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceUri, edgeDeviceName, validateRequest, options },\n spec: validateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesValidateResponse,\n OperationState<EdgeDevicesValidateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<EdgeDevicesValidateResponse> {\n const poller = await this.beginValidate(\n resourceUri,\n edgeDeviceName,\n validateRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n resourceUri: string,\n nextLink: string,\n options?: EdgeDevicesListNextOptionalParams,\n ): Promise<EdgeDevicesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 201: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 202: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 204: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst validateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 201: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 202: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 204: {\n bodyMapper: Mappers.ValidateResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.validateRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceUri,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing Extensions operations. */
17
16
  export class ExtensionsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Extensions class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class ExtensionsImpl {
39
39
  return this;
40
40
  },
41
41
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
43
43
  throw new Error("maxPageSize is not supported by this operation.");
44
44
  }
45
45
  return this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings);
46
46
  },
47
47
  };
48
48
  }
49
- listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listByArcSettingPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._listByArcSetting(resourceGroupName, clusterName, arcSettingName, options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- setContinuationToken(page, continuationToken);
58
- yield yield __await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield __await(this._listByArcSettingNext(resourceGroupName, clusterName, arcSettingName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
49
+ async *listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listByArcSetting(resourceGroupName, clusterName, arcSettingName, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ setContinuationToken(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listByArcSettingNext(resourceGroupName, clusterName, arcSettingName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
68
66
  }
69
- listByArcSettingPagingAll(resourceGroupName, clusterName, arcSettingName, options) {
70
- return __asyncGenerator(this, arguments, function* listByArcSettingPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
67
+ async *listByArcSettingPagingAll(resourceGroupName, clusterName, arcSettingName, options) {
68
+ for await (const page of this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * List all Extensions under ArcSetting resource.
@@ -127,14 +110,19 @@ export class ExtensionsImpl {
127
110
  return this.client.sendOperationRequest(args, spec);
128
111
  };
129
112
  const sendOperationFn = async (args, spec) => {
130
- var _a;
131
113
  let currentRawResponse = undefined;
132
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
114
+ const providedCallback = args.options?.onResponse;
133
115
  const callback = (rawResponse, flatResponse) => {
134
116
  currentRawResponse = rawResponse;
135
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
117
+ providedCallback?.(rawResponse, flatResponse);
118
+ };
119
+ const updatedArgs = {
120
+ ...args,
121
+ options: {
122
+ ...args.options,
123
+ onResponse: callback,
124
+ },
136
125
  };
137
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
138
126
  const flatResponse = await directSendOperation(updatedArgs, spec);
139
127
  return {
140
128
  flatResponse,
@@ -158,8 +146,8 @@ export class ExtensionsImpl {
158
146
  spec: createOperationSpec,
159
147
  });
160
148
  const poller = await createHttpPoller(lro, {
161
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
162
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
149
+ restoreFrom: options?.resumeFrom,
150
+ intervalInMs: options?.updateIntervalInMs,
163
151
  resourceLocationConfig: "azure-async-operation",
164
152
  });
165
153
  await poller.poll();
@@ -192,14 +180,19 @@ export class ExtensionsImpl {
192
180
  return this.client.sendOperationRequest(args, spec);
193
181
  };
194
182
  const sendOperationFn = async (args, spec) => {
195
- var _a;
196
183
  let currentRawResponse = undefined;
197
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
184
+ const providedCallback = args.options?.onResponse;
198
185
  const callback = (rawResponse, flatResponse) => {
199
186
  currentRawResponse = rawResponse;
200
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
187
+ providedCallback?.(rawResponse, flatResponse);
188
+ };
189
+ const updatedArgs = {
190
+ ...args,
191
+ options: {
192
+ ...args.options,
193
+ onResponse: callback,
194
+ },
201
195
  };
202
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
203
196
  const flatResponse = await directSendOperation(updatedArgs, spec);
204
197
  return {
205
198
  flatResponse,
@@ -223,8 +216,8 @@ export class ExtensionsImpl {
223
216
  spec: updateOperationSpec,
224
217
  });
225
218
  const poller = await createHttpPoller(lro, {
226
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
227
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
219
+ restoreFrom: options?.resumeFrom,
220
+ intervalInMs: options?.updateIntervalInMs,
228
221
  resourceLocationConfig: "original-uri",
229
222
  });
230
223
  await poller.poll();
@@ -256,14 +249,19 @@ export class ExtensionsImpl {
256
249
  return this.client.sendOperationRequest(args, spec);
257
250
  };
258
251
  const sendOperationFn = async (args, spec) => {
259
- var _a;
260
252
  let currentRawResponse = undefined;
261
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
253
+ const providedCallback = args.options?.onResponse;
262
254
  const callback = (rawResponse, flatResponse) => {
263
255
  currentRawResponse = rawResponse;
264
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
256
+ providedCallback?.(rawResponse, flatResponse);
257
+ };
258
+ const updatedArgs = {
259
+ ...args,
260
+ options: {
261
+ ...args.options,
262
+ onResponse: callback,
263
+ },
265
264
  };
266
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
267
265
  const flatResponse = await directSendOperation(updatedArgs, spec);
268
266
  return {
269
267
  flatResponse,
@@ -286,8 +284,8 @@ export class ExtensionsImpl {
286
284
  spec: deleteOperationSpec,
287
285
  });
288
286
  const poller = await createHttpPoller(lro, {
289
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
290
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
287
+ restoreFrom: options?.resumeFrom,
288
+ intervalInMs: options?.updateIntervalInMs,
291
289
  resourceLocationConfig: "azure-async-operation",
292
290
  });
293
291
  await poller.poll();
@@ -319,14 +317,19 @@ export class ExtensionsImpl {
319
317
  return this.client.sendOperationRequest(args, spec);
320
318
  };
321
319
  const sendOperationFn = async (args, spec) => {
322
- var _a;
323
320
  let currentRawResponse = undefined;
324
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
321
+ const providedCallback = args.options?.onResponse;
325
322
  const callback = (rawResponse, flatResponse) => {
326
323
  currentRawResponse = rawResponse;
327
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
324
+ providedCallback?.(rawResponse, flatResponse);
325
+ };
326
+ const updatedArgs = {
327
+ ...args,
328
+ options: {
329
+ ...args.options,
330
+ onResponse: callback,
331
+ },
328
332
  };
329
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
330
333
  const flatResponse = await directSendOperation(updatedArgs, spec);
331
334
  return {
332
335
  flatResponse,
@@ -350,8 +353,8 @@ export class ExtensionsImpl {
350
353
  spec: upgradeOperationSpec,
351
354
  });
352
355
  const poller = await createHttpPoller(lro, {
353
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
354
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
356
+ restoreFrom: options?.resumeFrom,
357
+ intervalInMs: options?.updateIntervalInMs,
355
358
  resourceLocationConfig: "azure-async-operation",
356
359
  });
357
360
  await poller.poll();