@azure/arm-sphere 1.0.1-alpha.20250718.1 → 1.0.1-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 (99) hide show
  1. package/dist/browser/azureSphereManagementClient.js +21 -5
  2. package/dist/browser/azureSphereManagementClient.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 +54 -21
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/catalogs.js +166 -253
  8. package/dist/browser/operations/catalogs.js.map +1 -1
  9. package/dist/browser/operations/certificates.js +23 -40
  10. package/dist/browser/operations/certificates.js.map +1 -1
  11. package/dist/browser/operations/deployments.js +45 -52
  12. package/dist/browser/operations/deployments.js.map +1 -1
  13. package/dist/browser/operations/deviceGroups.js +67 -64
  14. package/dist/browser/operations/deviceGroups.js.map +1 -1
  15. package/dist/browser/operations/devices.js +67 -64
  16. package/dist/browser/operations/devices.js.map +1 -1
  17. package/dist/browser/operations/images.js +45 -52
  18. package/dist/browser/operations/images.js.map +1 -1
  19. package/dist/browser/operations/operations.js +23 -40
  20. package/dist/browser/operations/operations.js.map +1 -1
  21. package/dist/browser/operations/products.js +78 -97
  22. package/dist/browser/operations/products.js.map +1 -1
  23. package/dist/browser/pagingHelper.js +2 -4
  24. package/dist/browser/pagingHelper.js.map +1 -1
  25. package/dist/commonjs/azureSphereManagementClient.js +21 -5
  26. package/dist/commonjs/azureSphereManagementClient.js.map +1 -1
  27. package/dist/commonjs/lroImpl.js +7 -3
  28. package/dist/commonjs/lroImpl.js.map +1 -1
  29. package/dist/commonjs/models/mappers.js +54 -21
  30. package/dist/commonjs/models/mappers.js.map +1 -1
  31. package/dist/commonjs/operations/catalogs.js +166 -252
  32. package/dist/commonjs/operations/catalogs.js.map +1 -1
  33. package/dist/commonjs/operations/certificates.js +23 -39
  34. package/dist/commonjs/operations/certificates.js.map +1 -1
  35. package/dist/commonjs/operations/deployments.js +45 -51
  36. package/dist/commonjs/operations/deployments.js.map +1 -1
  37. package/dist/commonjs/operations/deviceGroups.js +67 -63
  38. package/dist/commonjs/operations/deviceGroups.js.map +1 -1
  39. package/dist/commonjs/operations/devices.js +67 -63
  40. package/dist/commonjs/operations/devices.js.map +1 -1
  41. package/dist/commonjs/operations/images.js +45 -51
  42. package/dist/commonjs/operations/images.js.map +1 -1
  43. package/dist/commonjs/operations/operations.js +23 -39
  44. package/dist/commonjs/operations/operations.js.map +1 -1
  45. package/dist/commonjs/operations/products.js +78 -96
  46. package/dist/commonjs/operations/products.js.map +1 -1
  47. package/dist/commonjs/pagingHelper.js +2 -4
  48. package/dist/commonjs/pagingHelper.js.map +1 -1
  49. package/dist/commonjs/tsdoc-metadata.json +11 -11
  50. package/dist/esm/azureSphereManagementClient.js +21 -5
  51. package/dist/esm/azureSphereManagementClient.js.map +1 -1
  52. package/dist/esm/lroImpl.js +7 -3
  53. package/dist/esm/lroImpl.js.map +1 -1
  54. package/dist/esm/models/mappers.js +54 -21
  55. package/dist/esm/models/mappers.js.map +1 -1
  56. package/dist/esm/operations/catalogs.js +166 -253
  57. package/dist/esm/operations/catalogs.js.map +1 -1
  58. package/dist/esm/operations/certificates.js +23 -40
  59. package/dist/esm/operations/certificates.js.map +1 -1
  60. package/dist/esm/operations/deployments.js +45 -52
  61. package/dist/esm/operations/deployments.js.map +1 -1
  62. package/dist/esm/operations/deviceGroups.js +67 -64
  63. package/dist/esm/operations/deviceGroups.js.map +1 -1
  64. package/dist/esm/operations/devices.js +67 -64
  65. package/dist/esm/operations/devices.js.map +1 -1
  66. package/dist/esm/operations/images.js +45 -52
  67. package/dist/esm/operations/images.js.map +1 -1
  68. package/dist/esm/operations/operations.js +23 -40
  69. package/dist/esm/operations/operations.js.map +1 -1
  70. package/dist/esm/operations/products.js +78 -97
  71. package/dist/esm/operations/products.js.map +1 -1
  72. package/dist/esm/pagingHelper.js +2 -4
  73. package/dist/esm/pagingHelper.js.map +1 -1
  74. package/dist/react-native/azureSphereManagementClient.js +21 -5
  75. package/dist/react-native/azureSphereManagementClient.js.map +1 -1
  76. package/dist/react-native/lroImpl.js +7 -3
  77. package/dist/react-native/lroImpl.js.map +1 -1
  78. package/dist/react-native/models/mappers.js +54 -21
  79. package/dist/react-native/models/mappers.js.map +1 -1
  80. package/dist/react-native/operations/catalogs.js +166 -253
  81. package/dist/react-native/operations/catalogs.js.map +1 -1
  82. package/dist/react-native/operations/certificates.js +23 -40
  83. package/dist/react-native/operations/certificates.js.map +1 -1
  84. package/dist/react-native/operations/deployments.js +45 -52
  85. package/dist/react-native/operations/deployments.js.map +1 -1
  86. package/dist/react-native/operations/deviceGroups.js +67 -64
  87. package/dist/react-native/operations/deviceGroups.js.map +1 -1
  88. package/dist/react-native/operations/devices.js +67 -64
  89. package/dist/react-native/operations/devices.js.map +1 -1
  90. package/dist/react-native/operations/images.js +45 -52
  91. package/dist/react-native/operations/images.js.map +1 -1
  92. package/dist/react-native/operations/operations.js +23 -40
  93. package/dist/react-native/operations/operations.js.map +1 -1
  94. package/dist/react-native/operations/products.js +78 -97
  95. package/dist/react-native/operations/products.js.map +1 -1
  96. package/dist/react-native/pagingHelper.js +2 -4
  97. package/dist/react-native/pagingHelper.js.map +1 -1
  98. package/package.json +2 -2
  99. package/review/arm-sphere-node.api.md +1163 -1163
@@ -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 Catalogs operations. */
17
16
  export class CatalogsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Catalogs class.
20
20
  * @param client Reference to the service client
@@ -36,52 +36,35 @@ export class CatalogsImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listBySubscriptionPagingPage(options, settings);
43
43
  },
44
44
  };
45
45
  }
46
- listBySubscriptionPagingPage(options, settings) {
47
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
48
- let result;
49
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
- if (!continuationToken) {
51
- result = yield __await(this._listBySubscription(options));
52
- let page = result.value || [];
53
- continuationToken = result.nextLink;
54
- setContinuationToken(page, continuationToken);
55
- yield yield __await(page);
56
- }
57
- while (continuationToken) {
58
- result = yield __await(this._listBySubscriptionNext(continuationToken, options));
59
- continuationToken = result.nextLink;
60
- let page = result.value || [];
61
- setContinuationToken(page, continuationToken);
62
- yield yield __await(page);
63
- }
64
- });
46
+ async *listBySubscriptionPagingPage(options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._listBySubscription(options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listBySubscriptionNext(continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
65
63
  }
66
- listBySubscriptionPagingAll(options) {
67
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
68
- var _a, e_1, _b, _c;
69
- try {
70
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
- _c = _f.value;
72
- _d = false;
73
- const page = _c;
74
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
- }
76
- }
77
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
- finally {
79
- try {
80
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
- }
82
- finally { if (e_1) throw e_1.error; }
83
- }
84
- });
64
+ async *listBySubscriptionPagingAll(options) {
65
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
66
+ yield* page;
67
+ }
85
68
  }
86
69
  /**
87
70
  * List Catalog resources by resource group
@@ -98,52 +81,35 @@ export class CatalogsImpl {
98
81
  return this;
99
82
  },
100
83
  byPage: (settings) => {
101
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
84
+ if (settings?.maxPageSize) {
102
85
  throw new Error("maxPageSize is not supported by this operation.");
103
86
  }
104
87
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
105
88
  },
106
89
  };
107
90
  }
108
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
109
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
110
- let result;
111
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
112
- if (!continuationToken) {
113
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
114
- let page = result.value || [];
115
- continuationToken = result.nextLink;
116
- setContinuationToken(page, continuationToken);
117
- yield yield __await(page);
118
- }
119
- while (continuationToken) {
120
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
121
- continuationToken = result.nextLink;
122
- let page = result.value || [];
123
- setContinuationToken(page, continuationToken);
124
- yield yield __await(page);
125
- }
126
- });
91
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
92
+ let result;
93
+ let continuationToken = settings?.continuationToken;
94
+ if (!continuationToken) {
95
+ result = await this._listByResourceGroup(resourceGroupName, options);
96
+ let page = result.value || [];
97
+ continuationToken = result.nextLink;
98
+ setContinuationToken(page, continuationToken);
99
+ yield page;
100
+ }
101
+ while (continuationToken) {
102
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
103
+ continuationToken = result.nextLink;
104
+ let page = result.value || [];
105
+ setContinuationToken(page, continuationToken);
106
+ yield page;
107
+ }
127
108
  }
128
- listByResourceGroupPagingAll(resourceGroupName, options) {
129
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
130
- var _a, e_2, _b, _c;
131
- try {
132
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
133
- _c = _f.value;
134
- _d = false;
135
- const page = _c;
136
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
137
- }
138
- }
139
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
140
- finally {
141
- try {
142
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
143
- }
144
- finally { if (e_2) throw e_2.error; }
145
- }
146
- });
109
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
110
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
111
+ yield* page;
112
+ }
147
113
  }
148
114
  /**
149
115
  * Lists deployments for catalog.
@@ -161,52 +127,35 @@ export class CatalogsImpl {
161
127
  return this;
162
128
  },
163
129
  byPage: (settings) => {
164
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
130
+ if (settings?.maxPageSize) {
165
131
  throw new Error("maxPageSize is not supported by this operation.");
166
132
  }
167
133
  return this.listDeploymentsPagingPage(resourceGroupName, catalogName, options, settings);
168
134
  },
169
135
  };
170
136
  }
171
- listDeploymentsPagingPage(resourceGroupName, catalogName, options, settings) {
172
- return __asyncGenerator(this, arguments, function* listDeploymentsPagingPage_1() {
173
- let result;
174
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
175
- if (!continuationToken) {
176
- result = yield __await(this._listDeployments(resourceGroupName, catalogName, options));
177
- let page = result.value || [];
178
- continuationToken = result.nextLink;
179
- setContinuationToken(page, continuationToken);
180
- yield yield __await(page);
181
- }
182
- while (continuationToken) {
183
- result = yield __await(this._listDeploymentsNext(resourceGroupName, catalogName, continuationToken, options));
184
- continuationToken = result.nextLink;
185
- let page = result.value || [];
186
- setContinuationToken(page, continuationToken);
187
- yield yield __await(page);
188
- }
189
- });
137
+ async *listDeploymentsPagingPage(resourceGroupName, catalogName, options, settings) {
138
+ let result;
139
+ let continuationToken = settings?.continuationToken;
140
+ if (!continuationToken) {
141
+ result = await this._listDeployments(resourceGroupName, catalogName, options);
142
+ let page = result.value || [];
143
+ continuationToken = result.nextLink;
144
+ setContinuationToken(page, continuationToken);
145
+ yield page;
146
+ }
147
+ while (continuationToken) {
148
+ result = await this._listDeploymentsNext(resourceGroupName, catalogName, continuationToken, options);
149
+ continuationToken = result.nextLink;
150
+ let page = result.value || [];
151
+ setContinuationToken(page, continuationToken);
152
+ yield page;
153
+ }
190
154
  }
191
- listDeploymentsPagingAll(resourceGroupName, catalogName, options) {
192
- return __asyncGenerator(this, arguments, function* listDeploymentsPagingAll_1() {
193
- var _a, e_3, _b, _c;
194
- try {
195
- for (var _d = true, _e = __asyncValues(this.listDeploymentsPagingPage(resourceGroupName, catalogName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
196
- _c = _f.value;
197
- _d = false;
198
- const page = _c;
199
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
200
- }
201
- }
202
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
203
- finally {
204
- try {
205
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
206
- }
207
- finally { if (e_3) throw e_3.error; }
208
- }
209
- });
155
+ async *listDeploymentsPagingAll(resourceGroupName, catalogName, options) {
156
+ for await (const page of this.listDeploymentsPagingPage(resourceGroupName, catalogName, options)) {
157
+ yield* page;
158
+ }
210
159
  }
211
160
  /**
212
161
  * List the device groups for the catalog.
@@ -225,52 +174,35 @@ export class CatalogsImpl {
225
174
  return this;
226
175
  },
227
176
  byPage: (settings) => {
228
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
177
+ if (settings?.maxPageSize) {
229
178
  throw new Error("maxPageSize is not supported by this operation.");
230
179
  }
231
180
  return this.listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options, settings);
232
181
  },
233
182
  };
234
183
  }
235
- listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options, settings) {
236
- return __asyncGenerator(this, arguments, function* listDeviceGroupsPagingPage_1() {
237
- let result;
238
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
239
- if (!continuationToken) {
240
- result = yield __await(this._listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest, options));
241
- let page = result.value || [];
242
- continuationToken = result.nextLink;
243
- setContinuationToken(page, continuationToken);
244
- yield yield __await(page);
245
- }
246
- while (continuationToken) {
247
- result = yield __await(this._listDeviceGroupsNext(resourceGroupName, catalogName, listDeviceGroupsRequest, continuationToken, options));
248
- continuationToken = result.nextLink;
249
- let page = result.value || [];
250
- setContinuationToken(page, continuationToken);
251
- yield yield __await(page);
252
- }
253
- });
184
+ async *listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options, settings) {
185
+ let result;
186
+ let continuationToken = settings?.continuationToken;
187
+ if (!continuationToken) {
188
+ result = await this._listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest, options);
189
+ let page = result.value || [];
190
+ continuationToken = result.nextLink;
191
+ setContinuationToken(page, continuationToken);
192
+ yield page;
193
+ }
194
+ while (continuationToken) {
195
+ result = await this._listDeviceGroupsNext(resourceGroupName, catalogName, listDeviceGroupsRequest, continuationToken, options);
196
+ continuationToken = result.nextLink;
197
+ let page = result.value || [];
198
+ setContinuationToken(page, continuationToken);
199
+ yield page;
200
+ }
254
201
  }
255
- listDeviceGroupsPagingAll(resourceGroupName, catalogName, listDeviceGroupsRequest, options) {
256
- return __asyncGenerator(this, arguments, function* listDeviceGroupsPagingAll_1() {
257
- var _a, e_4, _b, _c;
258
- try {
259
- for (var _d = true, _e = __asyncValues(this.listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
260
- _c = _f.value;
261
- _d = false;
262
- const page = _c;
263
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
264
- }
265
- }
266
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
267
- finally {
268
- try {
269
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
270
- }
271
- finally { if (e_4) throw e_4.error; }
272
- }
273
- });
202
+ async *listDeviceGroupsPagingAll(resourceGroupName, catalogName, listDeviceGroupsRequest, options) {
203
+ for await (const page of this.listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options)) {
204
+ yield* page;
205
+ }
274
206
  }
275
207
  /**
276
208
  * Lists device insights for catalog.
@@ -288,52 +220,35 @@ export class CatalogsImpl {
288
220
  return this;
289
221
  },
290
222
  byPage: (settings) => {
291
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
223
+ if (settings?.maxPageSize) {
292
224
  throw new Error("maxPageSize is not supported by this operation.");
293
225
  }
294
226
  return this.listDeviceInsightsPagingPage(resourceGroupName, catalogName, options, settings);
295
227
  },
296
228
  };
297
229
  }
298
- listDeviceInsightsPagingPage(resourceGroupName, catalogName, options, settings) {
299
- return __asyncGenerator(this, arguments, function* listDeviceInsightsPagingPage_1() {
300
- let result;
301
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
302
- if (!continuationToken) {
303
- result = yield __await(this._listDeviceInsights(resourceGroupName, catalogName, options));
304
- let page = result.value || [];
305
- continuationToken = result.nextLink;
306
- setContinuationToken(page, continuationToken);
307
- yield yield __await(page);
308
- }
309
- while (continuationToken) {
310
- result = yield __await(this._listDeviceInsightsNext(resourceGroupName, catalogName, continuationToken, options));
311
- continuationToken = result.nextLink;
312
- let page = result.value || [];
313
- setContinuationToken(page, continuationToken);
314
- yield yield __await(page);
315
- }
316
- });
230
+ async *listDeviceInsightsPagingPage(resourceGroupName, catalogName, options, settings) {
231
+ let result;
232
+ let continuationToken = settings?.continuationToken;
233
+ if (!continuationToken) {
234
+ result = await this._listDeviceInsights(resourceGroupName, catalogName, options);
235
+ let page = result.value || [];
236
+ continuationToken = result.nextLink;
237
+ setContinuationToken(page, continuationToken);
238
+ yield page;
239
+ }
240
+ while (continuationToken) {
241
+ result = await this._listDeviceInsightsNext(resourceGroupName, catalogName, continuationToken, options);
242
+ continuationToken = result.nextLink;
243
+ let page = result.value || [];
244
+ setContinuationToken(page, continuationToken);
245
+ yield page;
246
+ }
317
247
  }
318
- listDeviceInsightsPagingAll(resourceGroupName, catalogName, options) {
319
- return __asyncGenerator(this, arguments, function* listDeviceInsightsPagingAll_1() {
320
- var _a, e_5, _b, _c;
321
- try {
322
- for (var _d = true, _e = __asyncValues(this.listDeviceInsightsPagingPage(resourceGroupName, catalogName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
323
- _c = _f.value;
324
- _d = false;
325
- const page = _c;
326
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
327
- }
328
- }
329
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
330
- finally {
331
- try {
332
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
333
- }
334
- finally { if (e_5) throw e_5.error; }
335
- }
336
- });
248
+ async *listDeviceInsightsPagingAll(resourceGroupName, catalogName, options) {
249
+ for await (const page of this.listDeviceInsightsPagingPage(resourceGroupName, catalogName, options)) {
250
+ yield* page;
251
+ }
337
252
  }
338
253
  /**
339
254
  * Lists devices for catalog.
@@ -351,52 +266,35 @@ export class CatalogsImpl {
351
266
  return this;
352
267
  },
353
268
  byPage: (settings) => {
354
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
269
+ if (settings?.maxPageSize) {
355
270
  throw new Error("maxPageSize is not supported by this operation.");
356
271
  }
357
272
  return this.listDevicesPagingPage(resourceGroupName, catalogName, options, settings);
358
273
  },
359
274
  };
360
275
  }
361
- listDevicesPagingPage(resourceGroupName, catalogName, options, settings) {
362
- return __asyncGenerator(this, arguments, function* listDevicesPagingPage_1() {
363
- let result;
364
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
365
- if (!continuationToken) {
366
- result = yield __await(this._listDevices(resourceGroupName, catalogName, options));
367
- let page = result.value || [];
368
- continuationToken = result.nextLink;
369
- setContinuationToken(page, continuationToken);
370
- yield yield __await(page);
371
- }
372
- while (continuationToken) {
373
- result = yield __await(this._listDevicesNext(resourceGroupName, catalogName, continuationToken, options));
374
- continuationToken = result.nextLink;
375
- let page = result.value || [];
376
- setContinuationToken(page, continuationToken);
377
- yield yield __await(page);
378
- }
379
- });
276
+ async *listDevicesPagingPage(resourceGroupName, catalogName, options, settings) {
277
+ let result;
278
+ let continuationToken = settings?.continuationToken;
279
+ if (!continuationToken) {
280
+ result = await this._listDevices(resourceGroupName, catalogName, options);
281
+ let page = result.value || [];
282
+ continuationToken = result.nextLink;
283
+ setContinuationToken(page, continuationToken);
284
+ yield page;
285
+ }
286
+ while (continuationToken) {
287
+ result = await this._listDevicesNext(resourceGroupName, catalogName, continuationToken, options);
288
+ continuationToken = result.nextLink;
289
+ let page = result.value || [];
290
+ setContinuationToken(page, continuationToken);
291
+ yield page;
292
+ }
380
293
  }
381
- listDevicesPagingAll(resourceGroupName, catalogName, options) {
382
- return __asyncGenerator(this, arguments, function* listDevicesPagingAll_1() {
383
- var _a, e_6, _b, _c;
384
- try {
385
- for (var _d = true, _e = __asyncValues(this.listDevicesPagingPage(resourceGroupName, catalogName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
386
- _c = _f.value;
387
- _d = false;
388
- const page = _c;
389
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
390
- }
391
- }
392
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
393
- finally {
394
- try {
395
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
396
- }
397
- finally { if (e_6) throw e_6.error; }
398
- }
399
- });
294
+ async *listDevicesPagingAll(resourceGroupName, catalogName, options) {
295
+ for await (const page of this.listDevicesPagingPage(resourceGroupName, catalogName, options)) {
296
+ yield* page;
297
+ }
400
298
  }
401
299
  /**
402
300
  * List Catalog resources by subscription ID
@@ -434,14 +332,19 @@ export class CatalogsImpl {
434
332
  return this.client.sendOperationRequest(args, spec);
435
333
  };
436
334
  const sendOperationFn = async (args, spec) => {
437
- var _a;
438
335
  let currentRawResponse = undefined;
439
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
336
+ const providedCallback = args.options?.onResponse;
440
337
  const callback = (rawResponse, flatResponse) => {
441
338
  currentRawResponse = rawResponse;
442
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
339
+ providedCallback?.(rawResponse, flatResponse);
340
+ };
341
+ const updatedArgs = {
342
+ ...args,
343
+ options: {
344
+ ...args.options,
345
+ onResponse: callback,
346
+ },
443
347
  };
444
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
445
348
  const flatResponse = await directSendOperation(updatedArgs, spec);
446
349
  return {
447
350
  flatResponse,
@@ -458,8 +361,8 @@ export class CatalogsImpl {
458
361
  spec: createOrUpdateOperationSpec,
459
362
  });
460
363
  const poller = await createHttpPoller(lro, {
461
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
462
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
364
+ restoreFrom: options?.resumeFrom,
365
+ intervalInMs: options?.updateIntervalInMs,
463
366
  resourceLocationConfig: "azure-async-operation",
464
367
  });
465
368
  await poller.poll();
@@ -497,14 +400,19 @@ export class CatalogsImpl {
497
400
  return this.client.sendOperationRequest(args, spec);
498
401
  };
499
402
  const sendOperationFn = async (args, spec) => {
500
- var _a;
501
403
  let currentRawResponse = undefined;
502
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
404
+ const providedCallback = args.options?.onResponse;
503
405
  const callback = (rawResponse, flatResponse) => {
504
406
  currentRawResponse = rawResponse;
505
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
407
+ providedCallback?.(rawResponse, flatResponse);
408
+ };
409
+ const updatedArgs = {
410
+ ...args,
411
+ options: {
412
+ ...args.options,
413
+ onResponse: callback,
414
+ },
506
415
  };
507
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
508
416
  const flatResponse = await directSendOperation(updatedArgs, spec);
509
417
  return {
510
418
  flatResponse,
@@ -521,8 +429,8 @@ export class CatalogsImpl {
521
429
  spec: deleteOperationSpec,
522
430
  });
523
431
  const poller = await createHttpPoller(lro, {
524
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
525
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
432
+ restoreFrom: options?.resumeFrom,
433
+ intervalInMs: options?.updateIntervalInMs,
526
434
  resourceLocationConfig: "location",
527
435
  });
528
436
  await poller.poll();
@@ -596,14 +504,19 @@ export class CatalogsImpl {
596
504
  return this.client.sendOperationRequest(args, spec);
597
505
  };
598
506
  const sendOperationFn = async (args, spec) => {
599
- var _a;
600
507
  let currentRawResponse = undefined;
601
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
508
+ const providedCallback = args.options?.onResponse;
602
509
  const callback = (rawResponse, flatResponse) => {
603
510
  currentRawResponse = rawResponse;
604
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
511
+ providedCallback?.(rawResponse, flatResponse);
512
+ };
513
+ const updatedArgs = {
514
+ ...args,
515
+ options: {
516
+ ...args.options,
517
+ onResponse: callback,
518
+ },
605
519
  };
606
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
607
520
  const flatResponse = await directSendOperation(updatedArgs, spec);
608
521
  return {
609
522
  flatResponse,
@@ -620,8 +533,8 @@ export class CatalogsImpl {
620
533
  spec: uploadImageOperationSpec,
621
534
  });
622
535
  const poller = await createHttpPoller(lro, {
623
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
624
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
536
+ restoreFrom: options?.resumeFrom,
537
+ intervalInMs: options?.updateIntervalInMs,
625
538
  resourceLocationConfig: "location",
626
539
  });
627
540
  await poller.poll();