@azure/arm-sqlvirtualmachine 5.0.0-alpha.20250717.1 → 5.0.0-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 (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
@@ -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 SqlVirtualMachines operations. */
17
16
  export class SqlVirtualMachinesImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class SqlVirtualMachines class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class SqlVirtualMachinesImpl {
39
39
  return this;
40
40
  },
41
41
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
43
43
  throw new Error("maxPageSize is not supported by this operation.");
44
44
  }
45
45
  return this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings);
46
46
  }
47
47
  };
48
48
  }
49
- listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listBySqlVmGroupPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- setContinuationToken(page, continuationToken);
58
- yield yield __await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield __await(this._listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
49
+ async *listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ setContinuationToken(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
68
66
  }
69
- listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
70
- return __asyncGenerator(this, arguments, function* listBySqlVmGroupPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
67
+ async *listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
68
+ for await (const page of this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * Gets all SQL virtual machines in a subscription.
@@ -100,52 +83,35 @@ export class SqlVirtualMachinesImpl {
100
83
  return this;
101
84
  },
102
85
  byPage: (settings) => {
103
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
86
+ if (settings?.maxPageSize) {
104
87
  throw new Error("maxPageSize is not supported by this operation.");
105
88
  }
106
89
  return this.listPagingPage(options, settings);
107
90
  }
108
91
  };
109
92
  }
110
- listPagingPage(options, settings) {
111
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
112
- let result;
113
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
114
- if (!continuationToken) {
115
- result = yield __await(this._list(options));
116
- let page = result.value || [];
117
- continuationToken = result.nextLink;
118
- setContinuationToken(page, continuationToken);
119
- yield yield __await(page);
120
- }
121
- while (continuationToken) {
122
- result = yield __await(this._listNext(continuationToken, options));
123
- continuationToken = result.nextLink;
124
- let page = result.value || [];
125
- setContinuationToken(page, continuationToken);
126
- yield yield __await(page);
127
- }
128
- });
93
+ async *listPagingPage(options, settings) {
94
+ let result;
95
+ let continuationToken = settings?.continuationToken;
96
+ if (!continuationToken) {
97
+ result = await this._list(options);
98
+ let page = result.value || [];
99
+ continuationToken = result.nextLink;
100
+ setContinuationToken(page, continuationToken);
101
+ yield page;
102
+ }
103
+ while (continuationToken) {
104
+ result = await this._listNext(continuationToken, options);
105
+ continuationToken = result.nextLink;
106
+ let page = result.value || [];
107
+ setContinuationToken(page, continuationToken);
108
+ yield page;
109
+ }
129
110
  }
130
- listPagingAll(options) {
131
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
132
- var _a, e_2, _b, _c;
133
- try {
134
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
135
- _c = _f.value;
136
- _d = false;
137
- const page = _c;
138
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
139
- }
140
- }
141
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
142
- finally {
143
- try {
144
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
145
- }
146
- finally { if (e_2) throw e_2.error; }
147
- }
148
- });
111
+ async *listPagingAll(options) {
112
+ for await (const page of this.listPagingPage(options)) {
113
+ yield* page;
114
+ }
149
115
  }
150
116
  /**
151
117
  * Gets all SQL virtual machines in a resource group.
@@ -163,52 +129,35 @@ export class SqlVirtualMachinesImpl {
163
129
  return this;
164
130
  },
165
131
  byPage: (settings) => {
166
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
132
+ if (settings?.maxPageSize) {
167
133
  throw new Error("maxPageSize is not supported by this operation.");
168
134
  }
169
135
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
170
136
  }
171
137
  };
172
138
  }
173
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
174
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
175
- let result;
176
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
177
- if (!continuationToken) {
178
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
179
- let page = result.value || [];
180
- continuationToken = result.nextLink;
181
- setContinuationToken(page, continuationToken);
182
- yield yield __await(page);
183
- }
184
- while (continuationToken) {
185
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
186
- continuationToken = result.nextLink;
187
- let page = result.value || [];
188
- setContinuationToken(page, continuationToken);
189
- yield yield __await(page);
190
- }
191
- });
139
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
140
+ let result;
141
+ let continuationToken = settings?.continuationToken;
142
+ if (!continuationToken) {
143
+ result = await this._listByResourceGroup(resourceGroupName, options);
144
+ let page = result.value || [];
145
+ continuationToken = result.nextLink;
146
+ setContinuationToken(page, continuationToken);
147
+ yield page;
148
+ }
149
+ while (continuationToken) {
150
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
151
+ continuationToken = result.nextLink;
152
+ let page = result.value || [];
153
+ setContinuationToken(page, continuationToken);
154
+ yield page;
155
+ }
192
156
  }
193
- listByResourceGroupPagingAll(resourceGroupName, options) {
194
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
195
- var _a, e_3, _b, _c;
196
- try {
197
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
198
- _c = _f.value;
199
- _d = false;
200
- const page = _c;
201
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
202
- }
203
- }
204
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
205
- finally {
206
- try {
207
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
208
- }
209
- finally { if (e_3) throw e_3.error; }
210
- }
211
- });
157
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
158
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
159
+ yield* page;
160
+ }
212
161
  }
213
162
  /**
214
163
  * Gets the list of sql virtual machines in a SQL virtual machine group.
@@ -250,14 +199,19 @@ export class SqlVirtualMachinesImpl {
250
199
  return this.client.sendOperationRequest(args, spec);
251
200
  };
252
201
  const sendOperationFn = async (args, spec) => {
253
- var _a;
254
202
  let currentRawResponse = undefined;
255
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
203
+ const providedCallback = args.options?.onResponse;
256
204
  const callback = (rawResponse, flatResponse) => {
257
205
  currentRawResponse = rawResponse;
258
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
206
+ providedCallback?.(rawResponse, flatResponse);
207
+ };
208
+ const updatedArgs = {
209
+ ...args,
210
+ options: {
211
+ ...args.options,
212
+ onResponse: callback
213
+ }
259
214
  };
260
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
261
215
  const flatResponse = await directSendOperation(updatedArgs, spec);
262
216
  return {
263
217
  flatResponse,
@@ -274,8 +228,8 @@ export class SqlVirtualMachinesImpl {
274
228
  spec: createOrUpdateOperationSpec
275
229
  });
276
230
  const poller = await createHttpPoller(lro, {
277
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
278
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
231
+ restoreFrom: options?.resumeFrom,
232
+ intervalInMs: options?.updateIntervalInMs,
279
233
  resourceLocationConfig: "azure-async-operation"
280
234
  });
281
235
  await poller.poll();
@@ -305,14 +259,19 @@ export class SqlVirtualMachinesImpl {
305
259
  return this.client.sendOperationRequest(args, spec);
306
260
  };
307
261
  const sendOperationFn = async (args, spec) => {
308
- var _a;
309
262
  let currentRawResponse = undefined;
310
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
263
+ const providedCallback = args.options?.onResponse;
311
264
  const callback = (rawResponse, flatResponse) => {
312
265
  currentRawResponse = rawResponse;
313
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
266
+ providedCallback?.(rawResponse, flatResponse);
267
+ };
268
+ const updatedArgs = {
269
+ ...args,
270
+ options: {
271
+ ...args.options,
272
+ onResponse: callback
273
+ }
314
274
  };
315
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
316
275
  const flatResponse = await directSendOperation(updatedArgs, spec);
317
276
  return {
318
277
  flatResponse,
@@ -329,8 +288,8 @@ export class SqlVirtualMachinesImpl {
329
288
  spec: deleteOperationSpec
330
289
  });
331
290
  const poller = await createHttpPoller(lro, {
332
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
333
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
291
+ restoreFrom: options?.resumeFrom,
292
+ intervalInMs: options?.updateIntervalInMs,
334
293
  resourceLocationConfig: "location"
335
294
  });
336
295
  await poller.poll();
@@ -360,14 +319,19 @@ export class SqlVirtualMachinesImpl {
360
319
  return this.client.sendOperationRequest(args, spec);
361
320
  };
362
321
  const sendOperationFn = async (args, spec) => {
363
- var _a;
364
322
  let currentRawResponse = undefined;
365
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
323
+ const providedCallback = args.options?.onResponse;
366
324
  const callback = (rawResponse, flatResponse) => {
367
325
  currentRawResponse = rawResponse;
368
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
326
+ providedCallback?.(rawResponse, flatResponse);
327
+ };
328
+ const updatedArgs = {
329
+ ...args,
330
+ options: {
331
+ ...args.options,
332
+ onResponse: callback
333
+ }
369
334
  };
370
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
371
335
  const flatResponse = await directSendOperation(updatedArgs, spec);
372
336
  return {
373
337
  flatResponse,
@@ -384,8 +348,8 @@ export class SqlVirtualMachinesImpl {
384
348
  spec: updateOperationSpec
385
349
  });
386
350
  const poller = await createHttpPoller(lro, {
387
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
388
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
351
+ restoreFrom: options?.resumeFrom,
352
+ intervalInMs: options?.updateIntervalInMs,
389
353
  resourceLocationConfig: "azure-async-operation"
390
354
  });
391
355
  await poller.poll();
@@ -424,14 +388,19 @@ export class SqlVirtualMachinesImpl {
424
388
  return this.client.sendOperationRequest(args, spec);
425
389
  };
426
390
  const sendOperationFn = async (args, spec) => {
427
- var _a;
428
391
  let currentRawResponse = undefined;
429
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
392
+ const providedCallback = args.options?.onResponse;
430
393
  const callback = (rawResponse, flatResponse) => {
431
394
  currentRawResponse = rawResponse;
432
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
395
+ providedCallback?.(rawResponse, flatResponse);
396
+ };
397
+ const updatedArgs = {
398
+ ...args,
399
+ options: {
400
+ ...args.options,
401
+ onResponse: callback
402
+ }
433
403
  };
434
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
435
404
  const flatResponse = await directSendOperation(updatedArgs, spec);
436
405
  return {
437
406
  flatResponse,
@@ -448,8 +417,8 @@ export class SqlVirtualMachinesImpl {
448
417
  spec: startAssessmentOperationSpec
449
418
  });
450
419
  const poller = await createHttpPoller(lro, {
451
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
452
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
420
+ restoreFrom: options?.resumeFrom,
421
+ intervalInMs: options?.updateIntervalInMs,
453
422
  resourceLocationConfig: "location"
454
423
  });
455
424
  await poller.poll();
@@ -478,14 +447,19 @@ export class SqlVirtualMachinesImpl {
478
447
  return this.client.sendOperationRequest(args, spec);
479
448
  };
480
449
  const sendOperationFn = async (args, spec) => {
481
- var _a;
482
450
  let currentRawResponse = undefined;
483
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
451
+ const providedCallback = args.options?.onResponse;
484
452
  const callback = (rawResponse, flatResponse) => {
485
453
  currentRawResponse = rawResponse;
486
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
454
+ providedCallback?.(rawResponse, flatResponse);
455
+ };
456
+ const updatedArgs = {
457
+ ...args,
458
+ options: {
459
+ ...args.options,
460
+ onResponse: callback
461
+ }
487
462
  };
488
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
489
463
  const flatResponse = await directSendOperation(updatedArgs, spec);
490
464
  return {
491
465
  flatResponse,
@@ -502,8 +476,8 @@ export class SqlVirtualMachinesImpl {
502
476
  spec: redeployOperationSpec
503
477
  });
504
478
  const poller = await createHttpPoller(lro, {
505
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
506
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
479
+ restoreFrom: options?.resumeFrom,
480
+ intervalInMs: options?.updateIntervalInMs,
507
481
  resourceLocationConfig: "location"
508
482
  });
509
483
  await poller.poll();