@azure/arm-storsimple8000series 2.1.1-alpha.20250717.1 → 2.1.1-alpha.20250718.2

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 (163) hide show
  1. package/dist/browser/lroImpl.js +11 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +367 -172
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/accessControlRecords.js +32 -39
  6. package/dist/browser/operations/accessControlRecords.js.map +1 -1
  7. package/dist/browser/operations/alerts.js +23 -40
  8. package/dist/browser/operations/alerts.js.map +1 -1
  9. package/dist/browser/operations/backupPolicies.js +43 -45
  10. package/dist/browser/operations/backupPolicies.js.map +1 -1
  11. package/dist/browser/operations/backupSchedules.js +32 -39
  12. package/dist/browser/operations/backupSchedules.js.map +1 -1
  13. package/dist/browser/operations/backups.js +56 -58
  14. package/dist/browser/operations/backups.js.map +1 -1
  15. package/dist/browser/operations/bandwidthSettings.js +32 -39
  16. package/dist/browser/operations/bandwidthSettings.js.map +1 -1
  17. package/dist/browser/operations/cloudAppliances.js +21 -33
  18. package/dist/browser/operations/cloudAppliances.js.map +1 -1
  19. package/dist/browser/operations/deviceSettings.js +56 -30
  20. package/dist/browser/operations/deviceSettings.js.map +1 -1
  21. package/dist/browser/operations/devices.js +112 -167
  22. package/dist/browser/operations/devices.js.map +1 -1
  23. package/dist/browser/operations/hardwareComponentGroups.js +21 -33
  24. package/dist/browser/operations/hardwareComponentGroups.js.map +1 -1
  25. package/dist/browser/operations/jobs.js +56 -85
  26. package/dist/browser/operations/jobs.js.map +1 -1
  27. package/dist/browser/operations/managers.js +51 -136
  28. package/dist/browser/operations/managers.js.map +1 -1
  29. package/dist/browser/operations/operations.js +23 -40
  30. package/dist/browser/operations/operations.js.map +1 -1
  31. package/dist/browser/operations/storageAccountCredentials.js +32 -39
  32. package/dist/browser/operations/storageAccountCredentials.js.map +1 -1
  33. package/dist/browser/operations/volumeContainers.js +50 -91
  34. package/dist/browser/operations/volumeContainers.js.map +1 -1
  35. package/dist/browser/operations/volumes.js +59 -117
  36. package/dist/browser/operations/volumes.js.map +1 -1
  37. package/dist/browser/pagingHelper.js +2 -4
  38. package/dist/browser/pagingHelper.js.map +1 -1
  39. package/dist/browser/storSimple8000SeriesManagementClient.js +29 -5
  40. package/dist/browser/storSimple8000SeriesManagementClient.js.map +1 -1
  41. package/dist/commonjs/lroImpl.js +11 -3
  42. package/dist/commonjs/lroImpl.js.map +1 -1
  43. package/dist/commonjs/models/mappers.js +367 -172
  44. package/dist/commonjs/models/mappers.js.map +1 -1
  45. package/dist/commonjs/operations/accessControlRecords.js +32 -38
  46. package/dist/commonjs/operations/accessControlRecords.js.map +1 -1
  47. package/dist/commonjs/operations/alerts.js +23 -39
  48. package/dist/commonjs/operations/alerts.js.map +1 -1
  49. package/dist/commonjs/operations/backupPolicies.js +43 -44
  50. package/dist/commonjs/operations/backupPolicies.js.map +1 -1
  51. package/dist/commonjs/operations/backupSchedules.js +32 -38
  52. package/dist/commonjs/operations/backupSchedules.js.map +1 -1
  53. package/dist/commonjs/operations/backups.js +56 -57
  54. package/dist/commonjs/operations/backups.js.map +1 -1
  55. package/dist/commonjs/operations/bandwidthSettings.js +32 -38
  56. package/dist/commonjs/operations/bandwidthSettings.js.map +1 -1
  57. package/dist/commonjs/operations/cloudAppliances.js +21 -32
  58. package/dist/commonjs/operations/cloudAppliances.js.map +1 -1
  59. package/dist/commonjs/operations/deviceSettings.js +56 -30
  60. package/dist/commonjs/operations/deviceSettings.js.map +1 -1
  61. package/dist/commonjs/operations/devices.js +112 -166
  62. package/dist/commonjs/operations/devices.js.map +1 -1
  63. package/dist/commonjs/operations/hardwareComponentGroups.js +21 -32
  64. package/dist/commonjs/operations/hardwareComponentGroups.js.map +1 -1
  65. package/dist/commonjs/operations/jobs.js +56 -84
  66. package/dist/commonjs/operations/jobs.js.map +1 -1
  67. package/dist/commonjs/operations/managers.js +51 -135
  68. package/dist/commonjs/operations/managers.js.map +1 -1
  69. package/dist/commonjs/operations/operations.js +23 -39
  70. package/dist/commonjs/operations/operations.js.map +1 -1
  71. package/dist/commonjs/operations/storageAccountCredentials.js +32 -38
  72. package/dist/commonjs/operations/storageAccountCredentials.js.map +1 -1
  73. package/dist/commonjs/operations/volumeContainers.js +50 -90
  74. package/dist/commonjs/operations/volumeContainers.js.map +1 -1
  75. package/dist/commonjs/operations/volumes.js +59 -116
  76. package/dist/commonjs/operations/volumes.js.map +1 -1
  77. package/dist/commonjs/pagingHelper.js +2 -4
  78. package/dist/commonjs/pagingHelper.js.map +1 -1
  79. package/dist/commonjs/storSimple8000SeriesManagementClient.js +29 -5
  80. package/dist/commonjs/storSimple8000SeriesManagementClient.js.map +1 -1
  81. package/dist/commonjs/tsdoc-metadata.json +11 -11
  82. package/dist/esm/lroImpl.js +11 -3
  83. package/dist/esm/lroImpl.js.map +1 -1
  84. package/dist/esm/models/mappers.js +367 -172
  85. package/dist/esm/models/mappers.js.map +1 -1
  86. package/dist/esm/operations/accessControlRecords.js +32 -39
  87. package/dist/esm/operations/accessControlRecords.js.map +1 -1
  88. package/dist/esm/operations/alerts.js +23 -40
  89. package/dist/esm/operations/alerts.js.map +1 -1
  90. package/dist/esm/operations/backupPolicies.js +43 -45
  91. package/dist/esm/operations/backupPolicies.js.map +1 -1
  92. package/dist/esm/operations/backupSchedules.js +32 -39
  93. package/dist/esm/operations/backupSchedules.js.map +1 -1
  94. package/dist/esm/operations/backups.js +56 -58
  95. package/dist/esm/operations/backups.js.map +1 -1
  96. package/dist/esm/operations/bandwidthSettings.js +32 -39
  97. package/dist/esm/operations/bandwidthSettings.js.map +1 -1
  98. package/dist/esm/operations/cloudAppliances.js +21 -33
  99. package/dist/esm/operations/cloudAppliances.js.map +1 -1
  100. package/dist/esm/operations/deviceSettings.js +56 -30
  101. package/dist/esm/operations/deviceSettings.js.map +1 -1
  102. package/dist/esm/operations/devices.js +112 -167
  103. package/dist/esm/operations/devices.js.map +1 -1
  104. package/dist/esm/operations/hardwareComponentGroups.js +21 -33
  105. package/dist/esm/operations/hardwareComponentGroups.js.map +1 -1
  106. package/dist/esm/operations/jobs.js +56 -85
  107. package/dist/esm/operations/jobs.js.map +1 -1
  108. package/dist/esm/operations/managers.js +51 -136
  109. package/dist/esm/operations/managers.js.map +1 -1
  110. package/dist/esm/operations/operations.js +23 -40
  111. package/dist/esm/operations/operations.js.map +1 -1
  112. package/dist/esm/operations/storageAccountCredentials.js +32 -39
  113. package/dist/esm/operations/storageAccountCredentials.js.map +1 -1
  114. package/dist/esm/operations/volumeContainers.js +50 -91
  115. package/dist/esm/operations/volumeContainers.js.map +1 -1
  116. package/dist/esm/operations/volumes.js +59 -117
  117. package/dist/esm/operations/volumes.js.map +1 -1
  118. package/dist/esm/pagingHelper.js +2 -4
  119. package/dist/esm/pagingHelper.js.map +1 -1
  120. package/dist/esm/storSimple8000SeriesManagementClient.js +29 -5
  121. package/dist/esm/storSimple8000SeriesManagementClient.js.map +1 -1
  122. package/dist/react-native/lroImpl.js +11 -3
  123. package/dist/react-native/lroImpl.js.map +1 -1
  124. package/dist/react-native/models/mappers.js +367 -172
  125. package/dist/react-native/models/mappers.js.map +1 -1
  126. package/dist/react-native/operations/accessControlRecords.js +32 -39
  127. package/dist/react-native/operations/accessControlRecords.js.map +1 -1
  128. package/dist/react-native/operations/alerts.js +23 -40
  129. package/dist/react-native/operations/alerts.js.map +1 -1
  130. package/dist/react-native/operations/backupPolicies.js +43 -45
  131. package/dist/react-native/operations/backupPolicies.js.map +1 -1
  132. package/dist/react-native/operations/backupSchedules.js +32 -39
  133. package/dist/react-native/operations/backupSchedules.js.map +1 -1
  134. package/dist/react-native/operations/backups.js +56 -58
  135. package/dist/react-native/operations/backups.js.map +1 -1
  136. package/dist/react-native/operations/bandwidthSettings.js +32 -39
  137. package/dist/react-native/operations/bandwidthSettings.js.map +1 -1
  138. package/dist/react-native/operations/cloudAppliances.js +21 -33
  139. package/dist/react-native/operations/cloudAppliances.js.map +1 -1
  140. package/dist/react-native/operations/deviceSettings.js +56 -30
  141. package/dist/react-native/operations/deviceSettings.js.map +1 -1
  142. package/dist/react-native/operations/devices.js +112 -167
  143. package/dist/react-native/operations/devices.js.map +1 -1
  144. package/dist/react-native/operations/hardwareComponentGroups.js +21 -33
  145. package/dist/react-native/operations/hardwareComponentGroups.js.map +1 -1
  146. package/dist/react-native/operations/jobs.js +56 -85
  147. package/dist/react-native/operations/jobs.js.map +1 -1
  148. package/dist/react-native/operations/managers.js +51 -136
  149. package/dist/react-native/operations/managers.js.map +1 -1
  150. package/dist/react-native/operations/operations.js +23 -40
  151. package/dist/react-native/operations/operations.js.map +1 -1
  152. package/dist/react-native/operations/storageAccountCredentials.js +32 -39
  153. package/dist/react-native/operations/storageAccountCredentials.js.map +1 -1
  154. package/dist/react-native/operations/volumeContainers.js +50 -91
  155. package/dist/react-native/operations/volumeContainers.js.map +1 -1
  156. package/dist/react-native/operations/volumes.js +59 -117
  157. package/dist/react-native/operations/volumes.js.map +1 -1
  158. package/dist/react-native/pagingHelper.js +2 -4
  159. package/dist/react-native/pagingHelper.js.map +1 -1
  160. package/dist/react-native/storSimple8000SeriesManagementClient.js +29 -5
  161. package/dist/react-native/storSimple8000SeriesManagementClient.js.map +1 -1
  162. package/package.json +2 -2
  163. package/review/arm-storsimple8000series-node.api.md +1923 -1923
@@ -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 * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
@@ -14,6 +13,7 @@ import { LroImpl } from "../lroImpl.js";
14
13
  /// <reference lib="esnext.asynciterable" />
15
14
  /** Class containing Devices operations. */
16
15
  export class DevicesImpl {
16
+ client;
17
17
  /**
18
18
  * Initialize a new instance of the class Devices class.
19
19
  * @param client Reference to the service client
@@ -37,39 +37,22 @@ export class DevicesImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listByManagerPagingPage(resourceGroupName, managerName, options, settings);
44
44
  }
45
45
  };
46
46
  }
47
- listByManagerPagingPage(resourceGroupName, managerName, options, _settings) {
48
- return __asyncGenerator(this, arguments, function* listByManagerPagingPage_1() {
49
- let result;
50
- result = yield __await(this._listByManager(resourceGroupName, managerName, options));
51
- yield yield __await(result.value || []);
52
- });
47
+ async *listByManagerPagingPage(resourceGroupName, managerName, options, _settings) {
48
+ let result;
49
+ result = await this._listByManager(resourceGroupName, managerName, options);
50
+ yield result.value || [];
53
51
  }
54
- listByManagerPagingAll(resourceGroupName, managerName, options) {
55
- return __asyncGenerator(this, arguments, function* listByManagerPagingAll_1() {
56
- var _a, e_1, _b, _c;
57
- try {
58
- for (var _d = true, _e = __asyncValues(this.listByManagerPagingPage(resourceGroupName, managerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
59
- _c = _f.value;
60
- _d = false;
61
- const page = _c;
62
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
63
- }
64
- }
65
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
66
- finally {
67
- try {
68
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
69
- }
70
- finally { if (e_1) throw e_1.error; }
71
- }
72
- });
52
+ async *listByManagerPagingAll(resourceGroupName, managerName, options) {
53
+ for await (const page of this.listByManagerPagingPage(resourceGroupName, managerName, options)) {
54
+ yield* page;
55
+ }
73
56
  }
74
57
  /**
75
58
  * Returns all failover sets for a given device and their eligibility for participating in a failover.
@@ -90,39 +73,22 @@ export class DevicesImpl {
90
73
  return this;
91
74
  },
92
75
  byPage: (settings) => {
93
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
76
+ if (settings?.maxPageSize) {
94
77
  throw new Error("maxPageSize is not supported by this operation.");
95
78
  }
96
79
  return this.listFailoverSetsPagingPage(deviceName, resourceGroupName, managerName, options, settings);
97
80
  }
98
81
  };
99
82
  }
100
- listFailoverSetsPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
101
- return __asyncGenerator(this, arguments, function* listFailoverSetsPagingPage_1() {
102
- let result;
103
- result = yield __await(this._listFailoverSets(deviceName, resourceGroupName, managerName, options));
104
- yield yield __await(result.value || []);
105
- });
83
+ async *listFailoverSetsPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
84
+ let result;
85
+ result = await this._listFailoverSets(deviceName, resourceGroupName, managerName, options);
86
+ yield result.value || [];
106
87
  }
107
- listFailoverSetsPagingAll(deviceName, resourceGroupName, managerName, options) {
108
- return __asyncGenerator(this, arguments, function* listFailoverSetsPagingAll_1() {
109
- var _a, e_2, _b, _c;
110
- try {
111
- for (var _d = true, _e = __asyncValues(this.listFailoverSetsPagingPage(deviceName, resourceGroupName, managerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
112
- _c = _f.value;
113
- _d = false;
114
- const page = _c;
115
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
116
- }
117
- }
118
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
119
- finally {
120
- try {
121
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
122
- }
123
- finally { if (e_2) throw e_2.error; }
124
- }
125
- });
88
+ async *listFailoverSetsPagingAll(deviceName, resourceGroupName, managerName, options) {
89
+ for await (const page of this.listFailoverSetsPagingPage(deviceName, resourceGroupName, managerName, options)) {
90
+ yield* page;
91
+ }
126
92
  }
127
93
  /**
128
94
  * Gets the metrics for the specified device.
@@ -142,39 +108,22 @@ export class DevicesImpl {
142
108
  return this;
143
109
  },
144
110
  byPage: (settings) => {
145
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
111
+ if (settings?.maxPageSize) {
146
112
  throw new Error("maxPageSize is not supported by this operation.");
147
113
  }
148
114
  return this.listMetricsPagingPage(deviceName, resourceGroupName, managerName, filter, options, settings);
149
115
  }
150
116
  };
151
117
  }
152
- listMetricsPagingPage(deviceName, resourceGroupName, managerName, filter, options, _settings) {
153
- return __asyncGenerator(this, arguments, function* listMetricsPagingPage_1() {
154
- let result;
155
- result = yield __await(this._listMetrics(deviceName, resourceGroupName, managerName, filter, options));
156
- yield yield __await(result.value || []);
157
- });
118
+ async *listMetricsPagingPage(deviceName, resourceGroupName, managerName, filter, options, _settings) {
119
+ let result;
120
+ result = await this._listMetrics(deviceName, resourceGroupName, managerName, filter, options);
121
+ yield result.value || [];
158
122
  }
159
- listMetricsPagingAll(deviceName, resourceGroupName, managerName, filter, options) {
160
- return __asyncGenerator(this, arguments, function* listMetricsPagingAll_1() {
161
- var _a, e_3, _b, _c;
162
- try {
163
- for (var _d = true, _e = __asyncValues(this.listMetricsPagingPage(deviceName, resourceGroupName, managerName, filter, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
164
- _c = _f.value;
165
- _d = false;
166
- const page = _c;
167
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
168
- }
169
- }
170
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
171
- finally {
172
- try {
173
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
174
- }
175
- finally { if (e_3) throw e_3.error; }
176
- }
177
- });
123
+ async *listMetricsPagingAll(deviceName, resourceGroupName, managerName, filter, options) {
124
+ for await (const page of this.listMetricsPagingPage(deviceName, resourceGroupName, managerName, filter, options)) {
125
+ yield* page;
126
+ }
178
127
  }
179
128
  /**
180
129
  * Gets the metric definitions for the specified device.
@@ -193,39 +142,22 @@ export class DevicesImpl {
193
142
  return this;
194
143
  },
195
144
  byPage: (settings) => {
196
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
145
+ if (settings?.maxPageSize) {
197
146
  throw new Error("maxPageSize is not supported by this operation.");
198
147
  }
199
148
  return this.listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options, settings);
200
149
  }
201
150
  };
202
151
  }
203
- listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
204
- return __asyncGenerator(this, arguments, function* listMetricDefinitionPagingPage_1() {
205
- let result;
206
- result = yield __await(this._listMetricDefinition(deviceName, resourceGroupName, managerName, options));
207
- yield yield __await(result.value || []);
208
- });
152
+ async *listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
153
+ let result;
154
+ result = await this._listMetricDefinition(deviceName, resourceGroupName, managerName, options);
155
+ yield result.value || [];
209
156
  }
210
- listMetricDefinitionPagingAll(deviceName, resourceGroupName, managerName, options) {
211
- return __asyncGenerator(this, arguments, function* listMetricDefinitionPagingAll_1() {
212
- var _a, e_4, _b, _c;
213
- try {
214
- for (var _d = true, _e = __asyncValues(this.listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
215
- _c = _f.value;
216
- _d = false;
217
- const page = _c;
218
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
219
- }
220
- }
221
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
222
- finally {
223
- try {
224
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
225
- }
226
- finally { if (e_4) throw e_4.error; }
227
- }
228
- });
157
+ async *listMetricDefinitionPagingAll(deviceName, resourceGroupName, managerName, options) {
158
+ for await (const page of this.listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options)) {
159
+ yield* page;
160
+ }
229
161
  }
230
162
  /**
231
163
  * Given a list of volume containers to be failed over from a source device, this method returns the
@@ -247,39 +179,22 @@ export class DevicesImpl {
247
179
  return this;
248
180
  },
249
181
  byPage: (settings) => {
250
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
182
+ if (settings?.maxPageSize) {
251
183
  throw new Error("maxPageSize is not supported by this operation.");
252
184
  }
253
185
  return this.listFailoverTargetsPagingPage(sourceDeviceName, resourceGroupName, managerName, parameters, options, settings);
254
186
  }
255
187
  };
256
188
  }
257
- listFailoverTargetsPagingPage(sourceDeviceName, resourceGroupName, managerName, parameters, options, _settings) {
258
- return __asyncGenerator(this, arguments, function* listFailoverTargetsPagingPage_1() {
259
- let result;
260
- result = yield __await(this._listFailoverTargets(sourceDeviceName, resourceGroupName, managerName, parameters, options));
261
- yield yield __await(result.value || []);
262
- });
189
+ async *listFailoverTargetsPagingPage(sourceDeviceName, resourceGroupName, managerName, parameters, options, _settings) {
190
+ let result;
191
+ result = await this._listFailoverTargets(sourceDeviceName, resourceGroupName, managerName, parameters, options);
192
+ yield result.value || [];
263
193
  }
264
- listFailoverTargetsPagingAll(sourceDeviceName, resourceGroupName, managerName, parameters, options) {
265
- return __asyncGenerator(this, arguments, function* listFailoverTargetsPagingAll_1() {
266
- var _a, e_5, _b, _c;
267
- try {
268
- for (var _d = true, _e = __asyncValues(this.listFailoverTargetsPagingPage(sourceDeviceName, resourceGroupName, managerName, parameters, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
269
- _c = _f.value;
270
- _d = false;
271
- const page = _c;
272
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
273
- }
274
- }
275
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
276
- finally {
277
- try {
278
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
279
- }
280
- finally { if (e_5) throw e_5.error; }
281
- }
282
- });
194
+ async *listFailoverTargetsPagingAll(sourceDeviceName, resourceGroupName, managerName, parameters, options) {
195
+ for await (const page of this.listFailoverTargetsPagingPage(sourceDeviceName, resourceGroupName, managerName, parameters, options)) {
196
+ yield* page;
197
+ }
283
198
  }
284
199
  /**
285
200
  * Complete minimal setup before using the device.
@@ -293,14 +208,19 @@ export class DevicesImpl {
293
208
  return this.client.sendOperationRequest(args, spec);
294
209
  };
295
210
  const sendOperation = async (args, spec) => {
296
- var _a;
297
211
  let currentRawResponse = undefined;
298
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
212
+ const providedCallback = args.options?.onResponse;
299
213
  const callback = (rawResponse, flatResponse) => {
300
214
  currentRawResponse = rawResponse;
301
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
215
+ providedCallback?.(rawResponse, flatResponse);
216
+ };
217
+ const updatedArgs = {
218
+ ...args,
219
+ options: {
220
+ ...args.options,
221
+ onResponse: callback
222
+ }
302
223
  };
303
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
304
224
  const flatResponse = await directSendOperation(updatedArgs, spec);
305
225
  return {
306
226
  flatResponse,
@@ -313,8 +233,8 @@ export class DevicesImpl {
313
233
  };
314
234
  const lro = new LroImpl(sendOperation, { resourceGroupName, managerName, parameters, options }, configureOperationSpec);
315
235
  const poller = new LroEngine(lro, {
316
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
317
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
236
+ resumeFrom: options?.resumeFrom,
237
+ intervalInMs: options?.updateIntervalInMs
318
238
  });
319
239
  await poller.poll();
320
240
  return poller;
@@ -361,14 +281,19 @@ export class DevicesImpl {
361
281
  return this.client.sendOperationRequest(args, spec);
362
282
  };
363
283
  const sendOperation = async (args, spec) => {
364
- var _a;
365
284
  let currentRawResponse = undefined;
366
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
285
+ const providedCallback = args.options?.onResponse;
367
286
  const callback = (rawResponse, flatResponse) => {
368
287
  currentRawResponse = rawResponse;
369
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
288
+ providedCallback?.(rawResponse, flatResponse);
289
+ };
290
+ const updatedArgs = {
291
+ ...args,
292
+ options: {
293
+ ...args.options,
294
+ onResponse: callback
295
+ }
370
296
  };
371
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
372
297
  const flatResponse = await directSendOperation(updatedArgs, spec);
373
298
  return {
374
299
  flatResponse,
@@ -381,8 +306,8 @@ export class DevicesImpl {
381
306
  };
382
307
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, deleteOperationSpec);
383
308
  const poller = new LroEngine(lro, {
384
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
385
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
309
+ resumeFrom: options?.resumeFrom,
310
+ intervalInMs: options?.updateIntervalInMs
386
311
  });
387
312
  await poller.poll();
388
313
  return poller;
@@ -431,14 +356,19 @@ export class DevicesImpl {
431
356
  return this.client.sendOperationRequest(args, spec);
432
357
  };
433
358
  const sendOperation = async (args, spec) => {
434
- var _a;
435
359
  let currentRawResponse = undefined;
436
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
360
+ const providedCallback = args.options?.onResponse;
437
361
  const callback = (rawResponse, flatResponse) => {
438
362
  currentRawResponse = rawResponse;
439
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
363
+ providedCallback?.(rawResponse, flatResponse);
364
+ };
365
+ const updatedArgs = {
366
+ ...args,
367
+ options: {
368
+ ...args.options,
369
+ onResponse: callback
370
+ }
440
371
  };
441
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
442
372
  const flatResponse = await directSendOperation(updatedArgs, spec);
443
373
  return {
444
374
  flatResponse,
@@ -451,8 +381,8 @@ export class DevicesImpl {
451
381
  };
452
382
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, deactivateOperationSpec);
453
383
  const poller = new LroEngine(lro, {
454
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
455
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
384
+ resumeFrom: options?.resumeFrom,
385
+ intervalInMs: options?.updateIntervalInMs
456
386
  });
457
387
  await poller.poll();
458
388
  return poller;
@@ -480,14 +410,19 @@ export class DevicesImpl {
480
410
  return this.client.sendOperationRequest(args, spec);
481
411
  };
482
412
  const sendOperation = async (args, spec) => {
483
- var _a;
484
413
  let currentRawResponse = undefined;
485
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
414
+ const providedCallback = args.options?.onResponse;
486
415
  const callback = (rawResponse, flatResponse) => {
487
416
  currentRawResponse = rawResponse;
488
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
417
+ providedCallback?.(rawResponse, flatResponse);
418
+ };
419
+ const updatedArgs = {
420
+ ...args,
421
+ options: {
422
+ ...args.options,
423
+ onResponse: callback
424
+ }
489
425
  };
490
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
491
426
  const flatResponse = await directSendOperation(updatedArgs, spec);
492
427
  return {
493
428
  flatResponse,
@@ -500,8 +435,8 @@ export class DevicesImpl {
500
435
  };
501
436
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, installUpdatesOperationSpec);
502
437
  const poller = new LroEngine(lro, {
503
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
504
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
438
+ resumeFrom: options?.resumeFrom,
439
+ intervalInMs: options?.updateIntervalInMs
505
440
  });
506
441
  await poller.poll();
507
442
  return poller;
@@ -562,14 +497,19 @@ export class DevicesImpl {
562
497
  return this.client.sendOperationRequest(args, spec);
563
498
  };
564
499
  const sendOperation = async (args, spec) => {
565
- var _a;
566
500
  let currentRawResponse = undefined;
567
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
501
+ const providedCallback = args.options?.onResponse;
568
502
  const callback = (rawResponse, flatResponse) => {
569
503
  currentRawResponse = rawResponse;
570
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
504
+ providedCallback?.(rawResponse, flatResponse);
505
+ };
506
+ const updatedArgs = {
507
+ ...args,
508
+ options: {
509
+ ...args.options,
510
+ onResponse: callback
511
+ }
571
512
  };
572
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
573
513
  const flatResponse = await directSendOperation(updatedArgs, spec);
574
514
  return {
575
515
  flatResponse,
@@ -582,8 +522,8 @@ export class DevicesImpl {
582
522
  };
583
523
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, scanForUpdatesOperationSpec);
584
524
  const poller = new LroEngine(lro, {
585
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
586
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
525
+ resumeFrom: options?.resumeFrom,
526
+ intervalInMs: options?.updateIntervalInMs
587
527
  });
588
528
  await poller.poll();
589
529
  return poller;
@@ -623,14 +563,19 @@ export class DevicesImpl {
623
563
  return this.client.sendOperationRequest(args, spec);
624
564
  };
625
565
  const sendOperation = async (args, spec) => {
626
- var _a;
627
566
  let currentRawResponse = undefined;
628
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
567
+ const providedCallback = args.options?.onResponse;
629
568
  const callback = (rawResponse, flatResponse) => {
630
569
  currentRawResponse = rawResponse;
631
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
570
+ providedCallback?.(rawResponse, flatResponse);
571
+ };
572
+ const updatedArgs = {
573
+ ...args,
574
+ options: {
575
+ ...args.options,
576
+ onResponse: callback
577
+ }
632
578
  };
633
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
634
579
  const flatResponse = await directSendOperation(updatedArgs, spec);
635
580
  return {
636
581
  flatResponse,
@@ -643,8 +588,8 @@ export class DevicesImpl {
643
588
  };
644
589
  const lro = new LroImpl(sendOperation, { sourceDeviceName, resourceGroupName, managerName, parameters, options }, failoverOperationSpec);
645
590
  const poller = new LroEngine(lro, {
646
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
647
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
591
+ resumeFrom: options?.resumeFrom,
592
+ intervalInMs: options?.updateIntervalInMs
648
593
  });
649
594
  await poller.poll();
650
595
  return poller;