@azure/arm-storsimple1200series 2.1.1-alpha.20250718.1 → 2.1.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 (154) 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 +361 -169
  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/availableProviderOperationsOperations.js +23 -40
  10. package/dist/browser/operations/availableProviderOperationsOperations.js.map +1 -1
  11. package/dist/browser/operations/backupScheduleGroups.js +32 -39
  12. package/dist/browser/operations/backupScheduleGroups.js.map +1 -1
  13. package/dist/browser/operations/backups.js +67 -91
  14. package/dist/browser/operations/backups.js.map +1 -1
  15. package/dist/browser/operations/chapSettingsOperations.js +32 -39
  16. package/dist/browser/operations/chapSettingsOperations.js.map +1 -1
  17. package/dist/browser/operations/devices.js +136 -159
  18. package/dist/browser/operations/devices.js.map +1 -1
  19. package/dist/browser/operations/fileServers.js +70 -123
  20. package/dist/browser/operations/fileServers.js.map +1 -1
  21. package/dist/browser/operations/fileShares.js +59 -117
  22. package/dist/browser/operations/fileShares.js.map +1 -1
  23. package/dist/browser/operations/iscsiDisks.js +59 -117
  24. package/dist/browser/operations/iscsiDisks.js.map +1 -1
  25. package/dist/browser/operations/iscsiServers.js +70 -123
  26. package/dist/browser/operations/iscsiServers.js.map +1 -1
  27. package/dist/browser/operations/jobs.js +45 -79
  28. package/dist/browser/operations/jobs.js.map +1 -1
  29. package/dist/browser/operations/managers.js +37 -105
  30. package/dist/browser/operations/managers.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/storageDomains.js +32 -39
  34. package/dist/browser/operations/storageDomains.js.map +1 -1
  35. package/dist/browser/pagingHelper.js +2 -4
  36. package/dist/browser/pagingHelper.js.map +1 -1
  37. package/dist/browser/storSimpleManagementClient.js +28 -5
  38. package/dist/browser/storSimpleManagementClient.js.map +1 -1
  39. package/dist/commonjs/lroImpl.js +11 -3
  40. package/dist/commonjs/lroImpl.js.map +1 -1
  41. package/dist/commonjs/models/mappers.js +361 -169
  42. package/dist/commonjs/models/mappers.js.map +1 -1
  43. package/dist/commonjs/operations/accessControlRecords.js +32 -38
  44. package/dist/commonjs/operations/accessControlRecords.js.map +1 -1
  45. package/dist/commonjs/operations/alerts.js +23 -39
  46. package/dist/commonjs/operations/alerts.js.map +1 -1
  47. package/dist/commonjs/operations/availableProviderOperationsOperations.js +23 -39
  48. package/dist/commonjs/operations/availableProviderOperationsOperations.js.map +1 -1
  49. package/dist/commonjs/operations/backupScheduleGroups.js +32 -38
  50. package/dist/commonjs/operations/backupScheduleGroups.js.map +1 -1
  51. package/dist/commonjs/operations/backups.js +67 -90
  52. package/dist/commonjs/operations/backups.js.map +1 -1
  53. package/dist/commonjs/operations/chapSettingsOperations.js +32 -38
  54. package/dist/commonjs/operations/chapSettingsOperations.js.map +1 -1
  55. package/dist/commonjs/operations/devices.js +136 -158
  56. package/dist/commonjs/operations/devices.js.map +1 -1
  57. package/dist/commonjs/operations/fileServers.js +70 -122
  58. package/dist/commonjs/operations/fileServers.js.map +1 -1
  59. package/dist/commonjs/operations/fileShares.js +59 -116
  60. package/dist/commonjs/operations/fileShares.js.map +1 -1
  61. package/dist/commonjs/operations/iscsiDisks.js +59 -116
  62. package/dist/commonjs/operations/iscsiDisks.js.map +1 -1
  63. package/dist/commonjs/operations/iscsiServers.js +70 -122
  64. package/dist/commonjs/operations/iscsiServers.js.map +1 -1
  65. package/dist/commonjs/operations/jobs.js +45 -78
  66. package/dist/commonjs/operations/jobs.js.map +1 -1
  67. package/dist/commonjs/operations/managers.js +37 -104
  68. package/dist/commonjs/operations/managers.js.map +1 -1
  69. package/dist/commonjs/operations/storageAccountCredentials.js +32 -38
  70. package/dist/commonjs/operations/storageAccountCredentials.js.map +1 -1
  71. package/dist/commonjs/operations/storageDomains.js +32 -38
  72. package/dist/commonjs/operations/storageDomains.js.map +1 -1
  73. package/dist/commonjs/pagingHelper.js +2 -4
  74. package/dist/commonjs/pagingHelper.js.map +1 -1
  75. package/dist/commonjs/storSimpleManagementClient.js +28 -5
  76. package/dist/commonjs/storSimpleManagementClient.js.map +1 -1
  77. package/dist/commonjs/tsdoc-metadata.json +1 -1
  78. package/dist/esm/lroImpl.js +11 -3
  79. package/dist/esm/lroImpl.js.map +1 -1
  80. package/dist/esm/models/mappers.js +361 -169
  81. package/dist/esm/models/mappers.js.map +1 -1
  82. package/dist/esm/operations/accessControlRecords.js +32 -39
  83. package/dist/esm/operations/accessControlRecords.js.map +1 -1
  84. package/dist/esm/operations/alerts.js +23 -40
  85. package/dist/esm/operations/alerts.js.map +1 -1
  86. package/dist/esm/operations/availableProviderOperationsOperations.js +23 -40
  87. package/dist/esm/operations/availableProviderOperationsOperations.js.map +1 -1
  88. package/dist/esm/operations/backupScheduleGroups.js +32 -39
  89. package/dist/esm/operations/backupScheduleGroups.js.map +1 -1
  90. package/dist/esm/operations/backups.js +67 -91
  91. package/dist/esm/operations/backups.js.map +1 -1
  92. package/dist/esm/operations/chapSettingsOperations.js +32 -39
  93. package/dist/esm/operations/chapSettingsOperations.js.map +1 -1
  94. package/dist/esm/operations/devices.js +136 -159
  95. package/dist/esm/operations/devices.js.map +1 -1
  96. package/dist/esm/operations/fileServers.js +70 -123
  97. package/dist/esm/operations/fileServers.js.map +1 -1
  98. package/dist/esm/operations/fileShares.js +59 -117
  99. package/dist/esm/operations/fileShares.js.map +1 -1
  100. package/dist/esm/operations/iscsiDisks.js +59 -117
  101. package/dist/esm/operations/iscsiDisks.js.map +1 -1
  102. package/dist/esm/operations/iscsiServers.js +70 -123
  103. package/dist/esm/operations/iscsiServers.js.map +1 -1
  104. package/dist/esm/operations/jobs.js +45 -79
  105. package/dist/esm/operations/jobs.js.map +1 -1
  106. package/dist/esm/operations/managers.js +37 -105
  107. package/dist/esm/operations/managers.js.map +1 -1
  108. package/dist/esm/operations/storageAccountCredentials.js +32 -39
  109. package/dist/esm/operations/storageAccountCredentials.js.map +1 -1
  110. package/dist/esm/operations/storageDomains.js +32 -39
  111. package/dist/esm/operations/storageDomains.js.map +1 -1
  112. package/dist/esm/pagingHelper.js +2 -4
  113. package/dist/esm/pagingHelper.js.map +1 -1
  114. package/dist/esm/storSimpleManagementClient.js +28 -5
  115. package/dist/esm/storSimpleManagementClient.js.map +1 -1
  116. package/dist/react-native/lroImpl.js +11 -3
  117. package/dist/react-native/lroImpl.js.map +1 -1
  118. package/dist/react-native/models/mappers.js +361 -169
  119. package/dist/react-native/models/mappers.js.map +1 -1
  120. package/dist/react-native/operations/accessControlRecords.js +32 -39
  121. package/dist/react-native/operations/accessControlRecords.js.map +1 -1
  122. package/dist/react-native/operations/alerts.js +23 -40
  123. package/dist/react-native/operations/alerts.js.map +1 -1
  124. package/dist/react-native/operations/availableProviderOperationsOperations.js +23 -40
  125. package/dist/react-native/operations/availableProviderOperationsOperations.js.map +1 -1
  126. package/dist/react-native/operations/backupScheduleGroups.js +32 -39
  127. package/dist/react-native/operations/backupScheduleGroups.js.map +1 -1
  128. package/dist/react-native/operations/backups.js +67 -91
  129. package/dist/react-native/operations/backups.js.map +1 -1
  130. package/dist/react-native/operations/chapSettingsOperations.js +32 -39
  131. package/dist/react-native/operations/chapSettingsOperations.js.map +1 -1
  132. package/dist/react-native/operations/devices.js +136 -159
  133. package/dist/react-native/operations/devices.js.map +1 -1
  134. package/dist/react-native/operations/fileServers.js +70 -123
  135. package/dist/react-native/operations/fileServers.js.map +1 -1
  136. package/dist/react-native/operations/fileShares.js +59 -117
  137. package/dist/react-native/operations/fileShares.js.map +1 -1
  138. package/dist/react-native/operations/iscsiDisks.js +59 -117
  139. package/dist/react-native/operations/iscsiDisks.js.map +1 -1
  140. package/dist/react-native/operations/iscsiServers.js +70 -123
  141. package/dist/react-native/operations/iscsiServers.js.map +1 -1
  142. package/dist/react-native/operations/jobs.js +45 -79
  143. package/dist/react-native/operations/jobs.js.map +1 -1
  144. package/dist/react-native/operations/managers.js +37 -105
  145. package/dist/react-native/operations/managers.js.map +1 -1
  146. package/dist/react-native/operations/storageAccountCredentials.js +32 -39
  147. package/dist/react-native/operations/storageAccountCredentials.js.map +1 -1
  148. package/dist/react-native/operations/storageDomains.js +32 -39
  149. package/dist/react-native/operations/storageDomains.js.map +1 -1
  150. package/dist/react-native/pagingHelper.js +2 -4
  151. package/dist/react-native/pagingHelper.js.map +1 -1
  152. package/dist/react-native/storSimpleManagementClient.js +28 -5
  153. package/dist/react-native/storSimpleManagementClient.js.map +1 -1
  154. package/package.json +2 -2
@@ -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
  * Retrieves all the devices which can be used as failover targets for the given device.
@@ -88,39 +71,22 @@ export class DevicesImpl {
88
71
  return this;
89
72
  },
90
73
  byPage: (settings) => {
91
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
74
+ if (settings?.maxPageSize) {
92
75
  throw new Error("maxPageSize is not supported by this operation.");
93
76
  }
94
77
  return this.listFailoverTargetPagingPage(deviceName, resourceGroupName, managerName, options, settings);
95
78
  }
96
79
  };
97
80
  }
98
- listFailoverTargetPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
99
- return __asyncGenerator(this, arguments, function* listFailoverTargetPagingPage_1() {
100
- let result;
101
- result = yield __await(this._listFailoverTarget(deviceName, resourceGroupName, managerName, options));
102
- yield yield __await(result.value || []);
103
- });
81
+ async *listFailoverTargetPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
82
+ let result;
83
+ result = await this._listFailoverTarget(deviceName, resourceGroupName, managerName, options);
84
+ yield result.value || [];
104
85
  }
105
- listFailoverTargetPagingAll(deviceName, resourceGroupName, managerName, options) {
106
- return __asyncGenerator(this, arguments, function* listFailoverTargetPagingAll_1() {
107
- var _a, e_2, _b, _c;
108
- try {
109
- for (var _d = true, _e = __asyncValues(this.listFailoverTargetPagingPage(deviceName, resourceGroupName, managerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
110
- _c = _f.value;
111
- _d = false;
112
- const page = _c;
113
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
114
- }
115
- }
116
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
117
- finally {
118
- try {
119
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
120
- }
121
- finally { if (e_2) throw e_2.error; }
122
- }
123
- });
86
+ async *listFailoverTargetPagingAll(deviceName, resourceGroupName, managerName, options) {
87
+ for await (const page of this.listFailoverTargetPagingPage(deviceName, resourceGroupName, managerName, options)) {
88
+ yield* page;
89
+ }
124
90
  }
125
91
  /**
126
92
  * Retrieves the device metrics.
@@ -139,39 +105,22 @@ export class DevicesImpl {
139
105
  return this;
140
106
  },
141
107
  byPage: (settings) => {
142
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
108
+ if (settings?.maxPageSize) {
143
109
  throw new Error("maxPageSize is not supported by this operation.");
144
110
  }
145
111
  return this.listMetricsPagingPage(deviceName, resourceGroupName, managerName, options, settings);
146
112
  }
147
113
  };
148
114
  }
149
- listMetricsPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
150
- return __asyncGenerator(this, arguments, function* listMetricsPagingPage_1() {
151
- let result;
152
- result = yield __await(this._listMetrics(deviceName, resourceGroupName, managerName, options));
153
- yield yield __await(result.value || []);
154
- });
115
+ async *listMetricsPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
116
+ let result;
117
+ result = await this._listMetrics(deviceName, resourceGroupName, managerName, options);
118
+ yield result.value || [];
155
119
  }
156
- listMetricsPagingAll(deviceName, resourceGroupName, managerName, options) {
157
- return __asyncGenerator(this, arguments, function* listMetricsPagingAll_1() {
158
- var _a, e_3, _b, _c;
159
- try {
160
- for (var _d = true, _e = __asyncValues(this.listMetricsPagingPage(deviceName, resourceGroupName, managerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
161
- _c = _f.value;
162
- _d = false;
163
- const page = _c;
164
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
165
- }
166
- }
167
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
168
- finally {
169
- try {
170
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
171
- }
172
- finally { if (e_3) throw e_3.error; }
173
- }
174
- });
120
+ async *listMetricsPagingAll(deviceName, resourceGroupName, managerName, options) {
121
+ for await (const page of this.listMetricsPagingPage(deviceName, resourceGroupName, managerName, options)) {
122
+ yield* page;
123
+ }
175
124
  }
176
125
  /**
177
126
  * Retrieves metric definition of all metrics aggregated at device.
@@ -190,39 +139,22 @@ export class DevicesImpl {
190
139
  return this;
191
140
  },
192
141
  byPage: (settings) => {
193
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
142
+ if (settings?.maxPageSize) {
194
143
  throw new Error("maxPageSize is not supported by this operation.");
195
144
  }
196
145
  return this.listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options, settings);
197
146
  }
198
147
  };
199
148
  }
200
- listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
201
- return __asyncGenerator(this, arguments, function* listMetricDefinitionPagingPage_1() {
202
- let result;
203
- result = yield __await(this._listMetricDefinition(deviceName, resourceGroupName, managerName, options));
204
- yield yield __await(result.value || []);
205
- });
149
+ async *listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options, _settings) {
150
+ let result;
151
+ result = await this._listMetricDefinition(deviceName, resourceGroupName, managerName, options);
152
+ yield result.value || [];
206
153
  }
207
- listMetricDefinitionPagingAll(deviceName, resourceGroupName, managerName, options) {
208
- return __asyncGenerator(this, arguments, function* listMetricDefinitionPagingAll_1() {
209
- var _a, e_4, _b, _c;
210
- try {
211
- for (var _d = true, _e = __asyncValues(this.listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
212
- _c = _f.value;
213
- _d = false;
214
- const page = _c;
215
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
216
- }
217
- }
218
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
219
- finally {
220
- try {
221
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
222
- }
223
- finally { if (e_4) throw e_4.error; }
224
- }
225
- });
154
+ async *listMetricDefinitionPagingAll(deviceName, resourceGroupName, managerName, options) {
155
+ for await (const page of this.listMetricDefinitionPagingPage(deviceName, resourceGroupName, managerName, options)) {
156
+ yield* page;
157
+ }
226
158
  }
227
159
  /**
228
160
  * Retrieves all the devices in a manager.
@@ -255,14 +187,19 @@ export class DevicesImpl {
255
187
  return this.client.sendOperationRequest(args, spec);
256
188
  };
257
189
  const sendOperation = async (args, spec) => {
258
- var _a;
259
190
  let currentRawResponse = undefined;
260
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
191
+ const providedCallback = args.options?.onResponse;
261
192
  const callback = (rawResponse, flatResponse) => {
262
193
  currentRawResponse = rawResponse;
263
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
194
+ providedCallback?.(rawResponse, flatResponse);
195
+ };
196
+ const updatedArgs = {
197
+ ...args,
198
+ options: {
199
+ ...args.options,
200
+ onResponse: callback
201
+ }
264
202
  };
265
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
266
203
  const flatResponse = await directSendOperation(updatedArgs, spec);
267
204
  return {
268
205
  flatResponse,
@@ -275,8 +212,8 @@ export class DevicesImpl {
275
212
  };
276
213
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, deleteOperationSpec);
277
214
  const poller = new LroEngine(lro, {
278
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
279
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
215
+ resumeFrom: options?.resumeFrom,
216
+ intervalInMs: options?.updateIntervalInMs
280
217
  });
281
218
  await poller.poll();
282
219
  return poller;
@@ -305,14 +242,19 @@ export class DevicesImpl {
305
242
  return this.client.sendOperationRequest(args, spec);
306
243
  };
307
244
  const sendOperation = async (args, spec) => {
308
- var _a;
309
245
  let currentRawResponse = undefined;
310
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
246
+ const providedCallback = args.options?.onResponse;
311
247
  const callback = (rawResponse, flatResponse) => {
312
248
  currentRawResponse = rawResponse;
313
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
249
+ providedCallback?.(rawResponse, flatResponse);
250
+ };
251
+ const updatedArgs = {
252
+ ...args,
253
+ options: {
254
+ ...args.options,
255
+ onResponse: callback
256
+ }
314
257
  };
315
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
316
258
  const flatResponse = await directSendOperation(updatedArgs, spec);
317
259
  return {
318
260
  flatResponse,
@@ -325,8 +267,8 @@ export class DevicesImpl {
325
267
  };
326
268
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, devicePatch, options }, patchOperationSpec);
327
269
  const poller = new LroEngine(lro, {
328
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
329
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
270
+ resumeFrom: options?.resumeFrom,
271
+ intervalInMs: options?.updateIntervalInMs
330
272
  });
331
273
  await poller.poll();
332
274
  return poller;
@@ -366,14 +308,19 @@ export class DevicesImpl {
366
308
  return this.client.sendOperationRequest(args, spec);
367
309
  };
368
310
  const sendOperation = async (args, spec) => {
369
- var _a;
370
311
  let currentRawResponse = undefined;
371
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
312
+ const providedCallback = args.options?.onResponse;
372
313
  const callback = (rawResponse, flatResponse) => {
373
314
  currentRawResponse = rawResponse;
374
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
315
+ providedCallback?.(rawResponse, flatResponse);
316
+ };
317
+ const updatedArgs = {
318
+ ...args,
319
+ options: {
320
+ ...args.options,
321
+ onResponse: callback
322
+ }
375
323
  };
376
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
377
324
  const flatResponse = await directSendOperation(updatedArgs, spec);
378
325
  return {
379
326
  flatResponse,
@@ -386,8 +333,8 @@ export class DevicesImpl {
386
333
  };
387
334
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, alertSettings, options }, createOrUpdateAlertSettingsOperationSpec);
388
335
  const poller = new LroEngine(lro, {
389
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
390
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
336
+ resumeFrom: options?.resumeFrom,
337
+ intervalInMs: options?.updateIntervalInMs
391
338
  });
392
339
  await poller.poll();
393
340
  return poller;
@@ -416,14 +363,19 @@ export class DevicesImpl {
416
363
  return this.client.sendOperationRequest(args, spec);
417
364
  };
418
365
  const sendOperation = async (args, spec) => {
419
- var _a;
420
366
  let currentRawResponse = undefined;
421
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
367
+ const providedCallback = args.options?.onResponse;
422
368
  const callback = (rawResponse, flatResponse) => {
423
369
  currentRawResponse = rawResponse;
424
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
370
+ providedCallback?.(rawResponse, flatResponse);
371
+ };
372
+ const updatedArgs = {
373
+ ...args,
374
+ options: {
375
+ ...args.options,
376
+ onResponse: callback
377
+ }
425
378
  };
426
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
427
379
  const flatResponse = await directSendOperation(updatedArgs, spec);
428
380
  return {
429
381
  flatResponse,
@@ -436,8 +388,8 @@ export class DevicesImpl {
436
388
  };
437
389
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, deactivateOperationSpec);
438
390
  const poller = new LroEngine(lro, {
439
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
440
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
391
+ resumeFrom: options?.resumeFrom,
392
+ intervalInMs: options?.updateIntervalInMs
441
393
  });
442
394
  await poller.poll();
443
395
  return poller;
@@ -465,14 +417,19 @@ export class DevicesImpl {
465
417
  return this.client.sendOperationRequest(args, spec);
466
418
  };
467
419
  const sendOperation = async (args, spec) => {
468
- var _a;
469
420
  let currentRawResponse = undefined;
470
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
421
+ const providedCallback = args.options?.onResponse;
471
422
  const callback = (rawResponse, flatResponse) => {
472
423
  currentRawResponse = rawResponse;
473
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
424
+ providedCallback?.(rawResponse, flatResponse);
425
+ };
426
+ const updatedArgs = {
427
+ ...args,
428
+ options: {
429
+ ...args.options,
430
+ onResponse: callback
431
+ }
474
432
  };
475
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
476
433
  const flatResponse = await directSendOperation(updatedArgs, spec);
477
434
  return {
478
435
  flatResponse,
@@ -485,8 +442,8 @@ export class DevicesImpl {
485
442
  };
486
443
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, downloadUpdatesOperationSpec);
487
444
  const poller = new LroEngine(lro, {
488
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
489
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
445
+ resumeFrom: options?.resumeFrom,
446
+ intervalInMs: options?.updateIntervalInMs
490
447
  });
491
448
  await poller.poll();
492
449
  return poller;
@@ -515,14 +472,19 @@ export class DevicesImpl {
515
472
  return this.client.sendOperationRequest(args, spec);
516
473
  };
517
474
  const sendOperation = async (args, spec) => {
518
- var _a;
519
475
  let currentRawResponse = undefined;
520
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
476
+ const providedCallback = args.options?.onResponse;
521
477
  const callback = (rawResponse, flatResponse) => {
522
478
  currentRawResponse = rawResponse;
523
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
479
+ providedCallback?.(rawResponse, flatResponse);
480
+ };
481
+ const updatedArgs = {
482
+ ...args,
483
+ options: {
484
+ ...args.options,
485
+ onResponse: callback
486
+ }
524
487
  };
525
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
526
488
  const flatResponse = await directSendOperation(updatedArgs, spec);
527
489
  return {
528
490
  flatResponse,
@@ -535,8 +497,8 @@ export class DevicesImpl {
535
497
  };
536
498
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, failoverRequest, options }, failoverOperationSpec);
537
499
  const poller = new LroEngine(lro, {
538
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
539
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
500
+ resumeFrom: options?.resumeFrom,
501
+ intervalInMs: options?.updateIntervalInMs
540
502
  });
541
503
  await poller.poll();
542
504
  return poller;
@@ -575,14 +537,19 @@ export class DevicesImpl {
575
537
  return this.client.sendOperationRequest(args, spec);
576
538
  };
577
539
  const sendOperation = async (args, spec) => {
578
- var _a;
579
540
  let currentRawResponse = undefined;
580
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
541
+ const providedCallback = args.options?.onResponse;
581
542
  const callback = (rawResponse, flatResponse) => {
582
543
  currentRawResponse = rawResponse;
583
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
544
+ providedCallback?.(rawResponse, flatResponse);
545
+ };
546
+ const updatedArgs = {
547
+ ...args,
548
+ options: {
549
+ ...args.options,
550
+ onResponse: callback
551
+ }
584
552
  };
585
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
586
553
  const flatResponse = await directSendOperation(updatedArgs, spec);
587
554
  return {
588
555
  flatResponse,
@@ -595,8 +562,8 @@ export class DevicesImpl {
595
562
  };
596
563
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, installUpdatesOperationSpec);
597
564
  const poller = new LroEngine(lro, {
598
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
599
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
565
+ resumeFrom: options?.resumeFrom,
566
+ intervalInMs: options?.updateIntervalInMs
600
567
  });
601
568
  await poller.poll();
602
569
  return poller;
@@ -654,14 +621,19 @@ export class DevicesImpl {
654
621
  return this.client.sendOperationRequest(args, spec);
655
622
  };
656
623
  const sendOperation = async (args, spec) => {
657
- var _a;
658
624
  let currentRawResponse = undefined;
659
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
625
+ const providedCallback = args.options?.onResponse;
660
626
  const callback = (rawResponse, flatResponse) => {
661
627
  currentRawResponse = rawResponse;
662
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
628
+ providedCallback?.(rawResponse, flatResponse);
629
+ };
630
+ const updatedArgs = {
631
+ ...args,
632
+ options: {
633
+ ...args.options,
634
+ onResponse: callback
635
+ }
663
636
  };
664
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
665
637
  const flatResponse = await directSendOperation(updatedArgs, spec);
666
638
  return {
667
639
  flatResponse,
@@ -674,8 +646,8 @@ export class DevicesImpl {
674
646
  };
675
647
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, options }, scanForUpdatesOperationSpec);
676
648
  const poller = new LroEngine(lro, {
677
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
678
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
649
+ resumeFrom: options?.resumeFrom,
650
+ intervalInMs: options?.updateIntervalInMs
679
651
  });
680
652
  await poller.poll();
681
653
  return poller;
@@ -704,14 +676,19 @@ export class DevicesImpl {
704
676
  return this.client.sendOperationRequest(args, spec);
705
677
  };
706
678
  const sendOperation = async (args, spec) => {
707
- var _a;
708
679
  let currentRawResponse = undefined;
709
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
680
+ const providedCallback = args.options?.onResponse;
710
681
  const callback = (rawResponse, flatResponse) => {
711
682
  currentRawResponse = rawResponse;
712
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
683
+ providedCallback?.(rawResponse, flatResponse);
684
+ };
685
+ const updatedArgs = {
686
+ ...args,
687
+ options: {
688
+ ...args.options,
689
+ onResponse: callback
690
+ }
713
691
  };
714
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
715
692
  const flatResponse = await directSendOperation(updatedArgs, spec);
716
693
  return {
717
694
  flatResponse,
@@ -724,8 +701,8 @@ export class DevicesImpl {
724
701
  };
725
702
  const lro = new LroImpl(sendOperation, { deviceName, resourceGroupName, managerName, securitySettings, options }, createOrUpdateSecuritySettingsOperationSpec);
726
703
  const poller = new LroEngine(lro, {
727
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
728
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
704
+ resumeFrom: options?.resumeFrom,
705
+ intervalInMs: options?.updateIntervalInMs
729
706
  });
730
707
  await poller.poll();
731
708
  return poller;