@azure/arm-sqlvirtualmachine 5.0.0-alpha.20250717.1 → 5.0.0-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +91 -43
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/availabilityGroupListeners.js +45 -52
  6. package/dist/browser/operations/availabilityGroupListeners.js.map +1 -1
  7. package/dist/browser/operations/operations.js +23 -40
  8. package/dist/browser/operations/operations.js.map +1 -1
  9. package/dist/browser/operations/sqlVirtualMachineGroups.js +78 -97
  10. package/dist/browser/operations/sqlVirtualMachineGroups.js.map +1 -1
  11. package/dist/browser/operations/sqlVirtualMachineTroubleshoot.js +12 -6
  12. package/dist/browser/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
  13. package/dist/browser/operations/sqlVirtualMachines.js +122 -148
  14. package/dist/browser/operations/sqlVirtualMachines.js.map +1 -1
  15. package/dist/browser/pagingHelper.js +2 -4
  16. package/dist/browser/pagingHelper.js.map +1 -1
  17. package/dist/browser/sqlVirtualMachineManagementClient.js +18 -5
  18. package/dist/browser/sqlVirtualMachineManagementClient.js.map +1 -1
  19. package/dist/commonjs/lroImpl.js +7 -3
  20. package/dist/commonjs/lroImpl.js.map +1 -1
  21. package/dist/commonjs/models/mappers.js +91 -43
  22. package/dist/commonjs/models/mappers.js.map +1 -1
  23. package/dist/commonjs/operations/availabilityGroupListeners.js +45 -51
  24. package/dist/commonjs/operations/availabilityGroupListeners.js.map +1 -1
  25. package/dist/commonjs/operations/operations.js +23 -39
  26. package/dist/commonjs/operations/operations.js.map +1 -1
  27. package/dist/commonjs/operations/sqlVirtualMachineGroups.js +78 -96
  28. package/dist/commonjs/operations/sqlVirtualMachineGroups.js.map +1 -1
  29. package/dist/commonjs/operations/sqlVirtualMachineTroubleshoot.js +12 -6
  30. package/dist/commonjs/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
  31. package/dist/commonjs/operations/sqlVirtualMachines.js +122 -147
  32. package/dist/commonjs/operations/sqlVirtualMachines.js.map +1 -1
  33. package/dist/commonjs/pagingHelper.js +2 -4
  34. package/dist/commonjs/pagingHelper.js.map +1 -1
  35. package/dist/commonjs/sqlVirtualMachineManagementClient.js +18 -5
  36. package/dist/commonjs/sqlVirtualMachineManagementClient.js.map +1 -1
  37. package/dist/commonjs/tsdoc-metadata.json +11 -11
  38. package/dist/esm/lroImpl.js +7 -3
  39. package/dist/esm/lroImpl.js.map +1 -1
  40. package/dist/esm/models/mappers.js +91 -43
  41. package/dist/esm/models/mappers.js.map +1 -1
  42. package/dist/esm/operations/availabilityGroupListeners.js +45 -52
  43. package/dist/esm/operations/availabilityGroupListeners.js.map +1 -1
  44. package/dist/esm/operations/operations.js +23 -40
  45. package/dist/esm/operations/operations.js.map +1 -1
  46. package/dist/esm/operations/sqlVirtualMachineGroups.js +78 -97
  47. package/dist/esm/operations/sqlVirtualMachineGroups.js.map +1 -1
  48. package/dist/esm/operations/sqlVirtualMachineTroubleshoot.js +12 -6
  49. package/dist/esm/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
  50. package/dist/esm/operations/sqlVirtualMachines.js +122 -148
  51. package/dist/esm/operations/sqlVirtualMachines.js.map +1 -1
  52. package/dist/esm/pagingHelper.js +2 -4
  53. package/dist/esm/pagingHelper.js.map +1 -1
  54. package/dist/esm/sqlVirtualMachineManagementClient.js +18 -5
  55. package/dist/esm/sqlVirtualMachineManagementClient.js.map +1 -1
  56. package/dist/react-native/lroImpl.js +7 -3
  57. package/dist/react-native/lroImpl.js.map +1 -1
  58. package/dist/react-native/models/mappers.js +91 -43
  59. package/dist/react-native/models/mappers.js.map +1 -1
  60. package/dist/react-native/operations/availabilityGroupListeners.js +45 -52
  61. package/dist/react-native/operations/availabilityGroupListeners.js.map +1 -1
  62. package/dist/react-native/operations/operations.js +23 -40
  63. package/dist/react-native/operations/operations.js.map +1 -1
  64. package/dist/react-native/operations/sqlVirtualMachineGroups.js +78 -97
  65. package/dist/react-native/operations/sqlVirtualMachineGroups.js.map +1 -1
  66. package/dist/react-native/operations/sqlVirtualMachineTroubleshoot.js +12 -6
  67. package/dist/react-native/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
  68. package/dist/react-native/operations/sqlVirtualMachines.js +122 -148
  69. package/dist/react-native/operations/sqlVirtualMachines.js.map +1 -1
  70. package/dist/react-native/pagingHelper.js +2 -4
  71. package/dist/react-native/pagingHelper.js.map +1 -1
  72. package/dist/react-native/sqlVirtualMachineManagementClient.js +18 -5
  73. package/dist/react-native/sqlVirtualMachineManagementClient.js.map +1 -1
  74. package/package.json +2 -2
  75. package/review/arm-sqlvirtualmachine-node.api.md +949 -949
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing SqlVirtualMachines operations. */
20
20
  class SqlVirtualMachinesImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class SqlVirtualMachines class.
23
24
  * @param client Reference to the service client
@@ -42,52 +43,35 @@ class SqlVirtualMachinesImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings);
49
50
  }
50
51
  };
51
52
  }
52
- listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* listBySqlVmGroupPagingPage_1() {
54
- let result;
55
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
56
- if (!continuationToken) {
57
- result = yield tslib_1.__await(this._listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options));
58
- let page = result.value || [];
59
- continuationToken = result.nextLink;
60
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
- yield yield tslib_1.__await(page);
62
- }
63
- while (continuationToken) {
64
- result = yield tslib_1.__await(this._listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options));
65
- continuationToken = result.nextLink;
66
- let page = result.value || [];
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- });
53
+ async *listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
54
+ let result;
55
+ let continuationToken = settings?.continuationToken;
56
+ if (!continuationToken) {
57
+ result = await this._listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options);
58
+ let page = result.value || [];
59
+ continuationToken = result.nextLink;
60
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
+ yield page;
62
+ }
63
+ while (continuationToken) {
64
+ result = await this._listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ let page = result.value || [];
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
71
70
  }
72
- listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
73
- return tslib_1.__asyncGenerator(this, arguments, function* listBySqlVmGroupPagingAll_1() {
74
- var _a, e_1, _b, _c;
75
- try {
76
- for (var _d = true, _e = tslib_1.__asyncValues(this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
77
- _c = _f.value;
78
- _d = false;
79
- const page = _c;
80
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
81
- }
82
- }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
87
- }
88
- finally { if (e_1) throw e_1.error; }
89
- }
90
- });
71
+ async *listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
72
+ for await (const page of this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)) {
73
+ yield* page;
74
+ }
91
75
  }
92
76
  /**
93
77
  * Gets all SQL virtual machines in a subscription.
@@ -103,52 +87,35 @@ class SqlVirtualMachinesImpl {
103
87
  return this;
104
88
  },
105
89
  byPage: (settings) => {
106
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
90
+ if (settings?.maxPageSize) {
107
91
  throw new Error("maxPageSize is not supported by this operation.");
108
92
  }
109
93
  return this.listPagingPage(options, settings);
110
94
  }
111
95
  };
112
96
  }
113
- listPagingPage(options, settings) {
114
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
115
- let result;
116
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
117
- if (!continuationToken) {
118
- result = yield tslib_1.__await(this._list(options));
119
- let page = result.value || [];
120
- continuationToken = result.nextLink;
121
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
122
- yield yield tslib_1.__await(page);
123
- }
124
- while (continuationToken) {
125
- result = yield tslib_1.__await(this._listNext(continuationToken, options));
126
- continuationToken = result.nextLink;
127
- let page = result.value || [];
128
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
129
- yield yield tslib_1.__await(page);
130
- }
131
- });
97
+ async *listPagingPage(options, settings) {
98
+ let result;
99
+ let continuationToken = settings?.continuationToken;
100
+ if (!continuationToken) {
101
+ result = await this._list(options);
102
+ let page = result.value || [];
103
+ continuationToken = result.nextLink;
104
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
105
+ yield page;
106
+ }
107
+ while (continuationToken) {
108
+ result = await this._listNext(continuationToken, options);
109
+ continuationToken = result.nextLink;
110
+ let page = result.value || [];
111
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
112
+ yield page;
113
+ }
132
114
  }
133
- listPagingAll(options) {
134
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
135
- var _a, e_2, _b, _c;
136
- try {
137
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
138
- _c = _f.value;
139
- _d = false;
140
- const page = _c;
141
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
142
- }
143
- }
144
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
145
- finally {
146
- try {
147
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
148
- }
149
- finally { if (e_2) throw e_2.error; }
150
- }
151
- });
115
+ async *listPagingAll(options) {
116
+ for await (const page of this.listPagingPage(options)) {
117
+ yield* page;
118
+ }
152
119
  }
153
120
  /**
154
121
  * Gets all SQL virtual machines in a resource group.
@@ -166,52 +133,35 @@ class SqlVirtualMachinesImpl {
166
133
  return this;
167
134
  },
168
135
  byPage: (settings) => {
169
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
136
+ if (settings?.maxPageSize) {
170
137
  throw new Error("maxPageSize is not supported by this operation.");
171
138
  }
172
139
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
173
140
  }
174
141
  };
175
142
  }
176
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
177
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
178
- let result;
179
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
180
- if (!continuationToken) {
181
- result = yield tslib_1.__await(this._listByResourceGroup(resourceGroupName, options));
182
- let page = result.value || [];
183
- continuationToken = result.nextLink;
184
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
185
- yield yield tslib_1.__await(page);
186
- }
187
- while (continuationToken) {
188
- result = yield tslib_1.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
189
- continuationToken = result.nextLink;
190
- let page = result.value || [];
191
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
192
- yield yield tslib_1.__await(page);
193
- }
194
- });
143
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
144
+ let result;
145
+ let continuationToken = settings?.continuationToken;
146
+ if (!continuationToken) {
147
+ result = await this._listByResourceGroup(resourceGroupName, options);
148
+ let page = result.value || [];
149
+ continuationToken = result.nextLink;
150
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
151
+ yield page;
152
+ }
153
+ while (continuationToken) {
154
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
155
+ continuationToken = result.nextLink;
156
+ let page = result.value || [];
157
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
158
+ yield page;
159
+ }
195
160
  }
196
- listByResourceGroupPagingAll(resourceGroupName, options) {
197
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
198
- var _a, e_3, _b, _c;
199
- try {
200
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
201
- _c = _f.value;
202
- _d = false;
203
- const page = _c;
204
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
205
- }
206
- }
207
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
208
- finally {
209
- try {
210
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
211
- }
212
- finally { if (e_3) throw e_3.error; }
213
- }
214
- });
161
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
162
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
163
+ yield* page;
164
+ }
215
165
  }
216
166
  /**
217
167
  * Gets the list of sql virtual machines in a SQL virtual machine group.
@@ -253,14 +203,19 @@ class SqlVirtualMachinesImpl {
253
203
  return this.client.sendOperationRequest(args, spec);
254
204
  };
255
205
  const sendOperationFn = async (args, spec) => {
256
- var _a;
257
206
  let currentRawResponse = undefined;
258
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
207
+ const providedCallback = args.options?.onResponse;
259
208
  const callback = (rawResponse, flatResponse) => {
260
209
  currentRawResponse = rawResponse;
261
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
210
+ providedCallback?.(rawResponse, flatResponse);
211
+ };
212
+ const updatedArgs = {
213
+ ...args,
214
+ options: {
215
+ ...args.options,
216
+ onResponse: callback
217
+ }
262
218
  };
263
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
264
219
  const flatResponse = await directSendOperation(updatedArgs, spec);
265
220
  return {
266
221
  flatResponse,
@@ -277,8 +232,8 @@ class SqlVirtualMachinesImpl {
277
232
  spec: createOrUpdateOperationSpec
278
233
  });
279
234
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
280
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
281
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
235
+ restoreFrom: options?.resumeFrom,
236
+ intervalInMs: options?.updateIntervalInMs,
282
237
  resourceLocationConfig: "azure-async-operation"
283
238
  });
284
239
  await poller.poll();
@@ -308,14 +263,19 @@ class SqlVirtualMachinesImpl {
308
263
  return this.client.sendOperationRequest(args, spec);
309
264
  };
310
265
  const sendOperationFn = async (args, spec) => {
311
- var _a;
312
266
  let currentRawResponse = undefined;
313
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
267
+ const providedCallback = args.options?.onResponse;
314
268
  const callback = (rawResponse, flatResponse) => {
315
269
  currentRawResponse = rawResponse;
316
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
270
+ providedCallback?.(rawResponse, flatResponse);
271
+ };
272
+ const updatedArgs = {
273
+ ...args,
274
+ options: {
275
+ ...args.options,
276
+ onResponse: callback
277
+ }
317
278
  };
318
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
319
279
  const flatResponse = await directSendOperation(updatedArgs, spec);
320
280
  return {
321
281
  flatResponse,
@@ -332,8 +292,8 @@ class SqlVirtualMachinesImpl {
332
292
  spec: deleteOperationSpec
333
293
  });
334
294
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
335
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
336
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
295
+ restoreFrom: options?.resumeFrom,
296
+ intervalInMs: options?.updateIntervalInMs,
337
297
  resourceLocationConfig: "location"
338
298
  });
339
299
  await poller.poll();
@@ -363,14 +323,19 @@ class SqlVirtualMachinesImpl {
363
323
  return this.client.sendOperationRequest(args, spec);
364
324
  };
365
325
  const sendOperationFn = async (args, spec) => {
366
- var _a;
367
326
  let currentRawResponse = undefined;
368
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
327
+ const providedCallback = args.options?.onResponse;
369
328
  const callback = (rawResponse, flatResponse) => {
370
329
  currentRawResponse = rawResponse;
371
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
330
+ providedCallback?.(rawResponse, flatResponse);
331
+ };
332
+ const updatedArgs = {
333
+ ...args,
334
+ options: {
335
+ ...args.options,
336
+ onResponse: callback
337
+ }
372
338
  };
373
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
374
339
  const flatResponse = await directSendOperation(updatedArgs, spec);
375
340
  return {
376
341
  flatResponse,
@@ -387,8 +352,8 @@ class SqlVirtualMachinesImpl {
387
352
  spec: updateOperationSpec
388
353
  });
389
354
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
390
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
391
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
355
+ restoreFrom: options?.resumeFrom,
356
+ intervalInMs: options?.updateIntervalInMs,
392
357
  resourceLocationConfig: "azure-async-operation"
393
358
  });
394
359
  await poller.poll();
@@ -427,14 +392,19 @@ class SqlVirtualMachinesImpl {
427
392
  return this.client.sendOperationRequest(args, spec);
428
393
  };
429
394
  const sendOperationFn = async (args, spec) => {
430
- var _a;
431
395
  let currentRawResponse = undefined;
432
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
396
+ const providedCallback = args.options?.onResponse;
433
397
  const callback = (rawResponse, flatResponse) => {
434
398
  currentRawResponse = rawResponse;
435
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
399
+ providedCallback?.(rawResponse, flatResponse);
400
+ };
401
+ const updatedArgs = {
402
+ ...args,
403
+ options: {
404
+ ...args.options,
405
+ onResponse: callback
406
+ }
436
407
  };
437
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
438
408
  const flatResponse = await directSendOperation(updatedArgs, spec);
439
409
  return {
440
410
  flatResponse,
@@ -451,8 +421,8 @@ class SqlVirtualMachinesImpl {
451
421
  spec: startAssessmentOperationSpec
452
422
  });
453
423
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
454
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
455
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
424
+ restoreFrom: options?.resumeFrom,
425
+ intervalInMs: options?.updateIntervalInMs,
456
426
  resourceLocationConfig: "location"
457
427
  });
458
428
  await poller.poll();
@@ -481,14 +451,19 @@ class SqlVirtualMachinesImpl {
481
451
  return this.client.sendOperationRequest(args, spec);
482
452
  };
483
453
  const sendOperationFn = async (args, spec) => {
484
- var _a;
485
454
  let currentRawResponse = undefined;
486
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
455
+ const providedCallback = args.options?.onResponse;
487
456
  const callback = (rawResponse, flatResponse) => {
488
457
  currentRawResponse = rawResponse;
489
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
458
+ providedCallback?.(rawResponse, flatResponse);
459
+ };
460
+ const updatedArgs = {
461
+ ...args,
462
+ options: {
463
+ ...args.options,
464
+ onResponse: callback
465
+ }
490
466
  };
491
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
492
467
  const flatResponse = await directSendOperation(updatedArgs, spec);
493
468
  return {
494
469
  flatResponse,
@@ -505,8 +480,8 @@ class SqlVirtualMachinesImpl {
505
480
  spec: redeployOperationSpec
506
481
  });
507
482
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
508
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
509
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
483
+ restoreFrom: options?.resumeFrom,
484
+ intervalInMs: options?.updateIntervalInMs,
510
485
  resourceLocationConfig: "location"
511
486
  });
512
487
  await poller.poll();