@azure/arm-azurestackhci 4.0.0-alpha.20250718.1 → 4.0.0-alpha.20250721.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
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing EdgeDevices operations. */
20
20
  class EdgeDevicesImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class EdgeDevices class.
23
24
  * @param client Reference to the service client
@@ -40,52 +41,35 @@ class EdgeDevicesImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(resourceUri, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listPagingPage(resourceUri, options, settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
54
- if (!continuationToken) {
55
- result = yield tslib_1.__await(this._list(resourceUri, options));
56
- let page = result.value || [];
57
- continuationToken = result.nextLink;
58
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
59
- yield yield tslib_1.__await(page);
60
- }
61
- while (continuationToken) {
62
- result = yield tslib_1.__await(this._listNext(resourceUri, continuationToken, options));
63
- continuationToken = result.nextLink;
64
- let page = result.value || [];
65
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
66
- yield yield tslib_1.__await(page);
67
- }
68
- });
51
+ async *listPagingPage(resourceUri, options, settings) {
52
+ let result;
53
+ let continuationToken = settings?.continuationToken;
54
+ if (!continuationToken) {
55
+ result = await this._list(resourceUri, options);
56
+ let page = result.value || [];
57
+ continuationToken = result.nextLink;
58
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
59
+ yield page;
60
+ }
61
+ while (continuationToken) {
62
+ result = await this._listNext(resourceUri, continuationToken, options);
63
+ continuationToken = result.nextLink;
64
+ let page = result.value || [];
65
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
66
+ yield page;
67
+ }
69
68
  }
70
- listPagingAll(resourceUri, options) {
71
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
75
- _c = _f.value;
76
- _d = false;
77
- const page = _c;
78
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
79
- }
80
- }
81
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
82
- finally {
83
- try {
84
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- });
69
+ async *listPagingAll(resourceUri, options) {
70
+ for await (const page of this.listPagingPage(resourceUri, options)) {
71
+ yield* page;
72
+ }
89
73
  }
90
74
  /**
91
75
  * List EdgeDevice resources by parent
@@ -116,14 +100,19 @@ class EdgeDevicesImpl {
116
100
  return this.client.sendOperationRequest(args, spec);
117
101
  };
118
102
  const sendOperationFn = async (args, spec) => {
119
- var _a;
120
103
  let currentRawResponse = undefined;
121
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
104
+ const providedCallback = args.options?.onResponse;
122
105
  const callback = (rawResponse, flatResponse) => {
123
106
  currentRawResponse = rawResponse;
124
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
107
+ providedCallback?.(rawResponse, flatResponse);
108
+ };
109
+ const updatedArgs = {
110
+ ...args,
111
+ options: {
112
+ ...args.options,
113
+ onResponse: callback,
114
+ },
125
115
  };
126
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
127
116
  const flatResponse = await directSendOperation(updatedArgs, spec);
128
117
  return {
129
118
  flatResponse,
@@ -140,8 +129,8 @@ class EdgeDevicesImpl {
140
129
  spec: createOrUpdateOperationSpec,
141
130
  });
142
131
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
143
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
144
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
132
+ restoreFrom: options?.resumeFrom,
133
+ intervalInMs: options?.updateIntervalInMs,
145
134
  resourceLocationConfig: "azure-async-operation",
146
135
  });
147
136
  await poller.poll();
@@ -169,14 +158,19 @@ class EdgeDevicesImpl {
169
158
  return this.client.sendOperationRequest(args, spec);
170
159
  };
171
160
  const sendOperationFn = async (args, spec) => {
172
- var _a;
173
161
  let currentRawResponse = undefined;
174
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
162
+ const providedCallback = args.options?.onResponse;
175
163
  const callback = (rawResponse, flatResponse) => {
176
164
  currentRawResponse = rawResponse;
177
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
165
+ providedCallback?.(rawResponse, flatResponse);
166
+ };
167
+ const updatedArgs = {
168
+ ...args,
169
+ options: {
170
+ ...args.options,
171
+ onResponse: callback,
172
+ },
178
173
  };
179
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
180
174
  const flatResponse = await directSendOperation(updatedArgs, spec);
181
175
  return {
182
176
  flatResponse,
@@ -193,8 +187,8 @@ class EdgeDevicesImpl {
193
187
  spec: deleteOperationSpec,
194
188
  });
195
189
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
196
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
197
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
190
+ restoreFrom: options?.resumeFrom,
191
+ intervalInMs: options?.updateIntervalInMs,
198
192
  resourceLocationConfig: "location",
199
193
  });
200
194
  await poller.poll();
@@ -222,14 +216,19 @@ class EdgeDevicesImpl {
222
216
  return this.client.sendOperationRequest(args, spec);
223
217
  };
224
218
  const sendOperationFn = async (args, spec) => {
225
- var _a;
226
219
  let currentRawResponse = undefined;
227
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
220
+ const providedCallback = args.options?.onResponse;
228
221
  const callback = (rawResponse, flatResponse) => {
229
222
  currentRawResponse = rawResponse;
230
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
223
+ providedCallback?.(rawResponse, flatResponse);
224
+ };
225
+ const updatedArgs = {
226
+ ...args,
227
+ options: {
228
+ ...args.options,
229
+ onResponse: callback,
230
+ },
231
231
  };
232
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
233
232
  const flatResponse = await directSendOperation(updatedArgs, spec);
234
233
  return {
235
234
  flatResponse,
@@ -246,8 +245,8 @@ class EdgeDevicesImpl {
246
245
  spec: validateOperationSpec,
247
246
  });
248
247
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
249
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
250
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
248
+ restoreFrom: options?.resumeFrom,
249
+ intervalInMs: options?.updateIntervalInMs,
251
250
  resourceLocationConfig: "location",
252
251
  });
253
252
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"edgeDevices.js","sourceRoot":"","sources":["../../../src/operations/edgeDevices.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAkB9C,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAa,eAAe;IAG1B;;;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,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AE,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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAkB9C,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAa,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,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC7D,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,WAAmB,EACnB,OAAuC,EACvC,QAAuB;QAEvB,IAAI,MAA+B,CAAC;QACpC,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB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C,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"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Extensions operations. */
20
20
  class ExtensionsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Extensions class.
23
24
  * @param client Reference to the service client
@@ -42,52 +43,35 @@ class ExtensionsImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings);
49
50
  },
50
51
  };
51
52
  }
52
- listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* listByArcSettingPagingPage_1() {
54
- let result;
55
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
56
- if (!continuationToken) {
57
- result = yield tslib_1.__await(this._listByArcSetting(resourceGroupName, clusterName, arcSettingName, options));
58
- let page = result.value || [];
59
- continuationToken = result.nextLink;
60
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
- yield yield tslib_1.__await(page);
62
- }
63
- while (continuationToken) {
64
- result = yield tslib_1.__await(this._listByArcSettingNext(resourceGroupName, clusterName, arcSettingName, continuationToken, options));
65
- continuationToken = result.nextLink;
66
- let page = result.value || [];
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- });
53
+ async *listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings) {
54
+ let result;
55
+ let continuationToken = settings?.continuationToken;
56
+ if (!continuationToken) {
57
+ result = await this._listByArcSetting(resourceGroupName, clusterName, arcSettingName, options);
58
+ let page = result.value || [];
59
+ continuationToken = result.nextLink;
60
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
+ yield page;
62
+ }
63
+ while (continuationToken) {
64
+ result = await this._listByArcSettingNext(resourceGroupName, clusterName, arcSettingName, continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ let page = result.value || [];
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
71
70
  }
72
- listByArcSettingPagingAll(resourceGroupName, clusterName, arcSettingName, options) {
73
- return tslib_1.__asyncGenerator(this, arguments, function* listByArcSettingPagingAll_1() {
74
- var _a, e_1, _b, _c;
75
- try {
76
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
77
- _c = _f.value;
78
- _d = false;
79
- const page = _c;
80
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
81
- }
82
- }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
87
- }
88
- finally { if (e_1) throw e_1.error; }
89
- }
90
- });
71
+ async *listByArcSettingPagingAll(resourceGroupName, clusterName, arcSettingName, options) {
72
+ for await (const page of this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options)) {
73
+ yield* page;
74
+ }
91
75
  }
92
76
  /**
93
77
  * List all Extensions under ArcSetting resource.
@@ -130,14 +114,19 @@ class ExtensionsImpl {
130
114
  return this.client.sendOperationRequest(args, spec);
131
115
  };
132
116
  const sendOperationFn = async (args, spec) => {
133
- var _a;
134
117
  let currentRawResponse = undefined;
135
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
118
+ const providedCallback = args.options?.onResponse;
136
119
  const callback = (rawResponse, flatResponse) => {
137
120
  currentRawResponse = rawResponse;
138
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
121
+ providedCallback?.(rawResponse, flatResponse);
122
+ };
123
+ const updatedArgs = {
124
+ ...args,
125
+ options: {
126
+ ...args.options,
127
+ onResponse: callback,
128
+ },
139
129
  };
140
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
141
130
  const flatResponse = await directSendOperation(updatedArgs, spec);
142
131
  return {
143
132
  flatResponse,
@@ -161,8 +150,8 @@ class ExtensionsImpl {
161
150
  spec: createOperationSpec,
162
151
  });
163
152
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
164
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
165
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
153
+ restoreFrom: options?.resumeFrom,
154
+ intervalInMs: options?.updateIntervalInMs,
166
155
  resourceLocationConfig: "azure-async-operation",
167
156
  });
168
157
  await poller.poll();
@@ -195,14 +184,19 @@ class ExtensionsImpl {
195
184
  return this.client.sendOperationRequest(args, spec);
196
185
  };
197
186
  const sendOperationFn = async (args, spec) => {
198
- var _a;
199
187
  let currentRawResponse = undefined;
200
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
188
+ const providedCallback = args.options?.onResponse;
201
189
  const callback = (rawResponse, flatResponse) => {
202
190
  currentRawResponse = rawResponse;
203
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
191
+ providedCallback?.(rawResponse, flatResponse);
192
+ };
193
+ const updatedArgs = {
194
+ ...args,
195
+ options: {
196
+ ...args.options,
197
+ onResponse: callback,
198
+ },
204
199
  };
205
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
206
200
  const flatResponse = await directSendOperation(updatedArgs, spec);
207
201
  return {
208
202
  flatResponse,
@@ -226,8 +220,8 @@ class ExtensionsImpl {
226
220
  spec: updateOperationSpec,
227
221
  });
228
222
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
229
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
230
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
223
+ restoreFrom: options?.resumeFrom,
224
+ intervalInMs: options?.updateIntervalInMs,
231
225
  resourceLocationConfig: "original-uri",
232
226
  });
233
227
  await poller.poll();
@@ -259,14 +253,19 @@ class ExtensionsImpl {
259
253
  return this.client.sendOperationRequest(args, spec);
260
254
  };
261
255
  const sendOperationFn = async (args, spec) => {
262
- var _a;
263
256
  let currentRawResponse = undefined;
264
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
257
+ const providedCallback = args.options?.onResponse;
265
258
  const callback = (rawResponse, flatResponse) => {
266
259
  currentRawResponse = rawResponse;
267
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
260
+ providedCallback?.(rawResponse, flatResponse);
261
+ };
262
+ const updatedArgs = {
263
+ ...args,
264
+ options: {
265
+ ...args.options,
266
+ onResponse: callback,
267
+ },
268
268
  };
269
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
270
269
  const flatResponse = await directSendOperation(updatedArgs, spec);
271
270
  return {
272
271
  flatResponse,
@@ -289,8 +288,8 @@ class ExtensionsImpl {
289
288
  spec: deleteOperationSpec,
290
289
  });
291
290
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
292
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
293
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
291
+ restoreFrom: options?.resumeFrom,
292
+ intervalInMs: options?.updateIntervalInMs,
294
293
  resourceLocationConfig: "azure-async-operation",
295
294
  });
296
295
  await poller.poll();
@@ -322,14 +321,19 @@ class ExtensionsImpl {
322
321
  return this.client.sendOperationRequest(args, spec);
323
322
  };
324
323
  const sendOperationFn = async (args, spec) => {
325
- var _a;
326
324
  let currentRawResponse = undefined;
327
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
325
+ const providedCallback = args.options?.onResponse;
328
326
  const callback = (rawResponse, flatResponse) => {
329
327
  currentRawResponse = rawResponse;
330
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
328
+ providedCallback?.(rawResponse, flatResponse);
329
+ };
330
+ const updatedArgs = {
331
+ ...args,
332
+ options: {
333
+ ...args.options,
334
+ onResponse: callback,
335
+ },
331
336
  };
332
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
333
337
  const flatResponse = await directSendOperation(updatedArgs, spec);
334
338
  return {
335
339
  flatResponse,
@@ -353,8 +357,8 @@ class ExtensionsImpl {
353
357
  spec: upgradeOperationSpec,
354
358
  });
355
359
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
356
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
357
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
360
+ restoreFrom: options?.resumeFrom,
361
+ intervalInMs: options?.updateIntervalInMs,
358
362
  resourceLocationConfig: "azure-async-operation",
359
363
  });
360
364
  await poller.poll();