@azure/arm-scvmm 1.0.1-alpha.20250718.1 → 1.0.1-alpha.20250721.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 (115) 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 +105 -45
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/availabilitySets.js +78 -97
  6. package/dist/browser/operations/availabilitySets.js.map +1 -1
  7. package/dist/browser/operations/clouds.js +78 -97
  8. package/dist/browser/operations/clouds.js.map +1 -1
  9. package/dist/browser/operations/guestAgents.js +34 -46
  10. package/dist/browser/operations/guestAgents.js.map +1 -1
  11. package/dist/browser/operations/inventoryItems.js +23 -40
  12. package/dist/browser/operations/inventoryItems.js.map +1 -1
  13. package/dist/browser/operations/operations.js +23 -40
  14. package/dist/browser/operations/operations.js.map +1 -1
  15. package/dist/browser/operations/virtualMachineInstances.js +122 -94
  16. package/dist/browser/operations/virtualMachineInstances.js.map +1 -1
  17. package/dist/browser/operations/virtualMachineTemplates.js +78 -97
  18. package/dist/browser/operations/virtualMachineTemplates.js.map +1 -1
  19. package/dist/browser/operations/virtualNetworks.js +78 -97
  20. package/dist/browser/operations/virtualNetworks.js.map +1 -1
  21. package/dist/browser/operations/vmInstanceHybridIdentityMetadatas.js +23 -40
  22. package/dist/browser/operations/vmInstanceHybridIdentityMetadatas.js.map +1 -1
  23. package/dist/browser/operations/vmmServers.js +78 -97
  24. package/dist/browser/operations/vmmServers.js.map +1 -1
  25. package/dist/browser/pagingHelper.js +2 -4
  26. package/dist/browser/pagingHelper.js.map +1 -1
  27. package/dist/browser/scVmm.js +23 -5
  28. package/dist/browser/scVmm.js.map +1 -1
  29. package/dist/commonjs/lroImpl.js +7 -3
  30. package/dist/commonjs/lroImpl.js.map +1 -1
  31. package/dist/commonjs/models/mappers.js +105 -45
  32. package/dist/commonjs/models/mappers.js.map +1 -1
  33. package/dist/commonjs/operations/availabilitySets.js +78 -96
  34. package/dist/commonjs/operations/availabilitySets.js.map +1 -1
  35. package/dist/commonjs/operations/clouds.js +78 -96
  36. package/dist/commonjs/operations/clouds.js.map +1 -1
  37. package/dist/commonjs/operations/guestAgents.js +34 -45
  38. package/dist/commonjs/operations/guestAgents.js.map +1 -1
  39. package/dist/commonjs/operations/inventoryItems.js +23 -39
  40. package/dist/commonjs/operations/inventoryItems.js.map +1 -1
  41. package/dist/commonjs/operations/operations.js +23 -39
  42. package/dist/commonjs/operations/operations.js.map +1 -1
  43. package/dist/commonjs/operations/virtualMachineInstances.js +122 -93
  44. package/dist/commonjs/operations/virtualMachineInstances.js.map +1 -1
  45. package/dist/commonjs/operations/virtualMachineTemplates.js +78 -96
  46. package/dist/commonjs/operations/virtualMachineTemplates.js.map +1 -1
  47. package/dist/commonjs/operations/virtualNetworks.js +78 -96
  48. package/dist/commonjs/operations/virtualNetworks.js.map +1 -1
  49. package/dist/commonjs/operations/vmInstanceHybridIdentityMetadatas.js +23 -39
  50. package/dist/commonjs/operations/vmInstanceHybridIdentityMetadatas.js.map +1 -1
  51. package/dist/commonjs/operations/vmmServers.js +78 -96
  52. package/dist/commonjs/operations/vmmServers.js.map +1 -1
  53. package/dist/commonjs/pagingHelper.js +2 -4
  54. package/dist/commonjs/pagingHelper.js.map +1 -1
  55. package/dist/commonjs/scVmm.js +23 -5
  56. package/dist/commonjs/scVmm.js.map +1 -1
  57. package/dist/commonjs/tsdoc-metadata.json +11 -11
  58. package/dist/esm/lroImpl.js +7 -3
  59. package/dist/esm/lroImpl.js.map +1 -1
  60. package/dist/esm/models/mappers.js +105 -45
  61. package/dist/esm/models/mappers.js.map +1 -1
  62. package/dist/esm/operations/availabilitySets.js +78 -97
  63. package/dist/esm/operations/availabilitySets.js.map +1 -1
  64. package/dist/esm/operations/clouds.js +78 -97
  65. package/dist/esm/operations/clouds.js.map +1 -1
  66. package/dist/esm/operations/guestAgents.js +34 -46
  67. package/dist/esm/operations/guestAgents.js.map +1 -1
  68. package/dist/esm/operations/inventoryItems.js +23 -40
  69. package/dist/esm/operations/inventoryItems.js.map +1 -1
  70. package/dist/esm/operations/operations.js +23 -40
  71. package/dist/esm/operations/operations.js.map +1 -1
  72. package/dist/esm/operations/virtualMachineInstances.js +122 -94
  73. package/dist/esm/operations/virtualMachineInstances.js.map +1 -1
  74. package/dist/esm/operations/virtualMachineTemplates.js +78 -97
  75. package/dist/esm/operations/virtualMachineTemplates.js.map +1 -1
  76. package/dist/esm/operations/virtualNetworks.js +78 -97
  77. package/dist/esm/operations/virtualNetworks.js.map +1 -1
  78. package/dist/esm/operations/vmInstanceHybridIdentityMetadatas.js +23 -40
  79. package/dist/esm/operations/vmInstanceHybridIdentityMetadatas.js.map +1 -1
  80. package/dist/esm/operations/vmmServers.js +78 -97
  81. package/dist/esm/operations/vmmServers.js.map +1 -1
  82. package/dist/esm/pagingHelper.js +2 -4
  83. package/dist/esm/pagingHelper.js.map +1 -1
  84. package/dist/esm/scVmm.js +23 -5
  85. package/dist/esm/scVmm.js.map +1 -1
  86. package/dist/react-native/lroImpl.js +7 -3
  87. package/dist/react-native/lroImpl.js.map +1 -1
  88. package/dist/react-native/models/mappers.js +105 -45
  89. package/dist/react-native/models/mappers.js.map +1 -1
  90. package/dist/react-native/operations/availabilitySets.js +78 -97
  91. package/dist/react-native/operations/availabilitySets.js.map +1 -1
  92. package/dist/react-native/operations/clouds.js +78 -97
  93. package/dist/react-native/operations/clouds.js.map +1 -1
  94. package/dist/react-native/operations/guestAgents.js +34 -46
  95. package/dist/react-native/operations/guestAgents.js.map +1 -1
  96. package/dist/react-native/operations/inventoryItems.js +23 -40
  97. package/dist/react-native/operations/inventoryItems.js.map +1 -1
  98. package/dist/react-native/operations/operations.js +23 -40
  99. package/dist/react-native/operations/operations.js.map +1 -1
  100. package/dist/react-native/operations/virtualMachineInstances.js +122 -94
  101. package/dist/react-native/operations/virtualMachineInstances.js.map +1 -1
  102. package/dist/react-native/operations/virtualMachineTemplates.js +78 -97
  103. package/dist/react-native/operations/virtualMachineTemplates.js.map +1 -1
  104. package/dist/react-native/operations/virtualNetworks.js +78 -97
  105. package/dist/react-native/operations/virtualNetworks.js.map +1 -1
  106. package/dist/react-native/operations/vmInstanceHybridIdentityMetadatas.js +23 -40
  107. package/dist/react-native/operations/vmInstanceHybridIdentityMetadatas.js.map +1 -1
  108. package/dist/react-native/operations/vmmServers.js +78 -97
  109. package/dist/react-native/operations/vmmServers.js.map +1 -1
  110. package/dist/react-native/pagingHelper.js +2 -4
  111. package/dist/react-native/pagingHelper.js.map +1 -1
  112. package/dist/react-native/scVmm.js +23 -5
  113. package/dist/react-native/scVmm.js.map +1 -1
  114. package/package.json +2 -2
  115. package/review/arm-scvmm-node.api.md +1571 -1571
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing VirtualMachineInstances operations. */
20
20
  class VirtualMachineInstancesImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class VirtualMachineInstances class.
23
24
  * @param client Reference to the service client
@@ -40,52 +41,35 @@ class VirtualMachineInstancesImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(resourceUri, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listPagingPage(resourceUri, options, settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
54
- if (!continuationToken) {
55
- result = yield tslib_1.__await(this._list(resourceUri, options));
56
- let page = result.value || [];
57
- continuationToken = result.nextLink;
58
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
59
- yield yield tslib_1.__await(page);
60
- }
61
- while (continuationToken) {
62
- result = yield tslib_1.__await(this._listNext(resourceUri, continuationToken, options));
63
- continuationToken = result.nextLink;
64
- let page = result.value || [];
65
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
66
- yield yield tslib_1.__await(page);
67
- }
68
- });
51
+ async *listPagingPage(resourceUri, options, settings) {
52
+ let result;
53
+ let continuationToken = settings?.continuationToken;
54
+ if (!continuationToken) {
55
+ result = await this._list(resourceUri, options);
56
+ let page = result.value || [];
57
+ continuationToken = result.nextLink;
58
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
59
+ yield page;
60
+ }
61
+ while (continuationToken) {
62
+ result = await this._listNext(resourceUri, continuationToken, options);
63
+ continuationToken = result.nextLink;
64
+ let page = result.value || [];
65
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
66
+ yield page;
67
+ }
69
68
  }
70
- listPagingAll(resourceUri, options) {
71
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
75
- _c = _f.value;
76
- _d = false;
77
- const page = _c;
78
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
79
- }
80
- }
81
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
82
- finally {
83
- try {
84
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- });
69
+ async *listPagingAll(resourceUri, options) {
70
+ for await (const page of this.listPagingPage(resourceUri, options)) {
71
+ yield* page;
72
+ }
89
73
  }
90
74
  /**
91
75
  * Lists all of the virtual machine instances within the specified parent resource.
@@ -115,14 +99,19 @@ class VirtualMachineInstancesImpl {
115
99
  return this.client.sendOperationRequest(args, spec);
116
100
  };
117
101
  const sendOperationFn = async (args, spec) => {
118
- var _a;
119
102
  let currentRawResponse = undefined;
120
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
103
+ const providedCallback = args.options?.onResponse;
121
104
  const callback = (rawResponse, flatResponse) => {
122
105
  currentRawResponse = rawResponse;
123
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
106
+ providedCallback?.(rawResponse, flatResponse);
107
+ };
108
+ const updatedArgs = {
109
+ ...args,
110
+ options: {
111
+ ...args.options,
112
+ onResponse: callback,
113
+ },
124
114
  };
125
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
126
115
  const flatResponse = await directSendOperation(updatedArgs, spec);
127
116
  return {
128
117
  flatResponse,
@@ -139,8 +128,8 @@ class VirtualMachineInstancesImpl {
139
128
  spec: createOrUpdateOperationSpec,
140
129
  });
141
130
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
142
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
143
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
131
+ restoreFrom: options?.resumeFrom,
132
+ intervalInMs: options?.updateIntervalInMs,
144
133
  resourceLocationConfig: "azure-async-operation",
145
134
  });
146
135
  await poller.poll();
@@ -168,14 +157,19 @@ class VirtualMachineInstancesImpl {
168
157
  return this.client.sendOperationRequest(args, spec);
169
158
  };
170
159
  const sendOperationFn = async (args, spec) => {
171
- var _a;
172
160
  let currentRawResponse = undefined;
173
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
161
+ const providedCallback = args.options?.onResponse;
174
162
  const callback = (rawResponse, flatResponse) => {
175
163
  currentRawResponse = rawResponse;
176
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
164
+ providedCallback?.(rawResponse, flatResponse);
165
+ };
166
+ const updatedArgs = {
167
+ ...args,
168
+ options: {
169
+ ...args.options,
170
+ onResponse: callback,
171
+ },
177
172
  };
178
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
179
173
  const flatResponse = await directSendOperation(updatedArgs, spec);
180
174
  return {
181
175
  flatResponse,
@@ -192,8 +186,8 @@ class VirtualMachineInstancesImpl {
192
186
  spec: updateOperationSpec,
193
187
  });
194
188
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
195
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
196
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
189
+ restoreFrom: options?.resumeFrom,
190
+ intervalInMs: options?.updateIntervalInMs,
197
191
  resourceLocationConfig: "azure-async-operation",
198
192
  });
199
193
  await poller.poll();
@@ -219,14 +213,19 @@ class VirtualMachineInstancesImpl {
219
213
  return this.client.sendOperationRequest(args, spec);
220
214
  };
221
215
  const sendOperationFn = async (args, spec) => {
222
- var _a;
223
216
  let currentRawResponse = undefined;
224
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
217
+ const providedCallback = args.options?.onResponse;
225
218
  const callback = (rawResponse, flatResponse) => {
226
219
  currentRawResponse = rawResponse;
227
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
220
+ providedCallback?.(rawResponse, flatResponse);
221
+ };
222
+ const updatedArgs = {
223
+ ...args,
224
+ options: {
225
+ ...args.options,
226
+ onResponse: callback,
227
+ },
228
228
  };
229
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
230
229
  const flatResponse = await directSendOperation(updatedArgs, spec);
231
230
  return {
232
231
  flatResponse,
@@ -243,8 +242,8 @@ class VirtualMachineInstancesImpl {
243
242
  spec: deleteOperationSpec,
244
243
  });
245
244
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
246
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
247
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
245
+ restoreFrom: options?.resumeFrom,
246
+ intervalInMs: options?.updateIntervalInMs,
248
247
  resourceLocationConfig: "azure-async-operation",
249
248
  });
250
249
  await poller.poll();
@@ -270,14 +269,19 @@ class VirtualMachineInstancesImpl {
270
269
  return this.client.sendOperationRequest(args, spec);
271
270
  };
272
271
  const sendOperationFn = async (args, spec) => {
273
- var _a;
274
272
  let currentRawResponse = undefined;
275
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
273
+ const providedCallback = args.options?.onResponse;
276
274
  const callback = (rawResponse, flatResponse) => {
277
275
  currentRawResponse = rawResponse;
278
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
276
+ providedCallback?.(rawResponse, flatResponse);
277
+ };
278
+ const updatedArgs = {
279
+ ...args,
280
+ options: {
281
+ ...args.options,
282
+ onResponse: callback,
283
+ },
279
284
  };
280
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
281
285
  const flatResponse = await directSendOperation(updatedArgs, spec);
282
286
  return {
283
287
  flatResponse,
@@ -294,8 +298,8 @@ class VirtualMachineInstancesImpl {
294
298
  spec: createCheckpointOperationSpec,
295
299
  });
296
300
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
297
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
298
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
301
+ restoreFrom: options?.resumeFrom,
302
+ intervalInMs: options?.updateIntervalInMs,
299
303
  resourceLocationConfig: "location",
300
304
  });
301
305
  await poller.poll();
@@ -322,14 +326,19 @@ class VirtualMachineInstancesImpl {
322
326
  return this.client.sendOperationRequest(args, spec);
323
327
  };
324
328
  const sendOperationFn = async (args, spec) => {
325
- var _a;
326
329
  let currentRawResponse = undefined;
327
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
330
+ const providedCallback = args.options?.onResponse;
328
331
  const callback = (rawResponse, flatResponse) => {
329
332
  currentRawResponse = rawResponse;
330
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
333
+ providedCallback?.(rawResponse, flatResponse);
334
+ };
335
+ const updatedArgs = {
336
+ ...args,
337
+ options: {
338
+ ...args.options,
339
+ onResponse: callback,
340
+ },
331
341
  };
332
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
333
342
  const flatResponse = await directSendOperation(updatedArgs, spec);
334
343
  return {
335
344
  flatResponse,
@@ -346,8 +355,8 @@ class VirtualMachineInstancesImpl {
346
355
  spec: deleteCheckpointOperationSpec,
347
356
  });
348
357
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
349
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
350
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
358
+ restoreFrom: options?.resumeFrom,
359
+ intervalInMs: options?.updateIntervalInMs,
351
360
  resourceLocationConfig: "location",
352
361
  });
353
362
  await poller.poll();
@@ -373,14 +382,19 @@ class VirtualMachineInstancesImpl {
373
382
  return this.client.sendOperationRequest(args, spec);
374
383
  };
375
384
  const sendOperationFn = async (args, spec) => {
376
- var _a;
377
385
  let currentRawResponse = undefined;
378
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
386
+ const providedCallback = args.options?.onResponse;
379
387
  const callback = (rawResponse, flatResponse) => {
380
388
  currentRawResponse = rawResponse;
381
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
389
+ providedCallback?.(rawResponse, flatResponse);
390
+ };
391
+ const updatedArgs = {
392
+ ...args,
393
+ options: {
394
+ ...args.options,
395
+ onResponse: callback,
396
+ },
382
397
  };
383
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
384
398
  const flatResponse = await directSendOperation(updatedArgs, spec);
385
399
  return {
386
400
  flatResponse,
@@ -397,8 +411,8 @@ class VirtualMachineInstancesImpl {
397
411
  spec: restartOperationSpec,
398
412
  });
399
413
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
400
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
401
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
414
+ restoreFrom: options?.resumeFrom,
415
+ intervalInMs: options?.updateIntervalInMs,
402
416
  resourceLocationConfig: "location",
403
417
  });
404
418
  await poller.poll();
@@ -424,14 +438,19 @@ class VirtualMachineInstancesImpl {
424
438
  return this.client.sendOperationRequest(args, spec);
425
439
  };
426
440
  const sendOperationFn = async (args, spec) => {
427
- var _a;
428
441
  let currentRawResponse = undefined;
429
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
442
+ const providedCallback = args.options?.onResponse;
430
443
  const callback = (rawResponse, flatResponse) => {
431
444
  currentRawResponse = rawResponse;
432
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
445
+ providedCallback?.(rawResponse, flatResponse);
446
+ };
447
+ const updatedArgs = {
448
+ ...args,
449
+ options: {
450
+ ...args.options,
451
+ onResponse: callback,
452
+ },
433
453
  };
434
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
435
454
  const flatResponse = await directSendOperation(updatedArgs, spec);
436
455
  return {
437
456
  flatResponse,
@@ -448,8 +467,8 @@ class VirtualMachineInstancesImpl {
448
467
  spec: restoreCheckpointOperationSpec,
449
468
  });
450
469
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
451
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
452
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
470
+ restoreFrom: options?.resumeFrom,
471
+ intervalInMs: options?.updateIntervalInMs,
453
472
  resourceLocationConfig: "location",
454
473
  });
455
474
  await poller.poll();
@@ -475,14 +494,19 @@ class VirtualMachineInstancesImpl {
475
494
  return this.client.sendOperationRequest(args, spec);
476
495
  };
477
496
  const sendOperationFn = async (args, spec) => {
478
- var _a;
479
497
  let currentRawResponse = undefined;
480
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
498
+ const providedCallback = args.options?.onResponse;
481
499
  const callback = (rawResponse, flatResponse) => {
482
500
  currentRawResponse = rawResponse;
483
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
501
+ providedCallback?.(rawResponse, flatResponse);
502
+ };
503
+ const updatedArgs = {
504
+ ...args,
505
+ options: {
506
+ ...args.options,
507
+ onResponse: callback,
508
+ },
484
509
  };
485
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
486
510
  const flatResponse = await directSendOperation(updatedArgs, spec);
487
511
  return {
488
512
  flatResponse,
@@ -499,8 +523,8 @@ class VirtualMachineInstancesImpl {
499
523
  spec: startOperationSpec,
500
524
  });
501
525
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
502
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
503
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
526
+ restoreFrom: options?.resumeFrom,
527
+ intervalInMs: options?.updateIntervalInMs,
504
528
  resourceLocationConfig: "location",
505
529
  });
506
530
  await poller.poll();
@@ -526,14 +550,19 @@ class VirtualMachineInstancesImpl {
526
550
  return this.client.sendOperationRequest(args, spec);
527
551
  };
528
552
  const sendOperationFn = async (args, spec) => {
529
- var _a;
530
553
  let currentRawResponse = undefined;
531
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
554
+ const providedCallback = args.options?.onResponse;
532
555
  const callback = (rawResponse, flatResponse) => {
533
556
  currentRawResponse = rawResponse;
534
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
557
+ providedCallback?.(rawResponse, flatResponse);
558
+ };
559
+ const updatedArgs = {
560
+ ...args,
561
+ options: {
562
+ ...args.options,
563
+ onResponse: callback,
564
+ },
535
565
  };
536
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
537
566
  const flatResponse = await directSendOperation(updatedArgs, spec);
538
567
  return {
539
568
  flatResponse,
@@ -550,8 +579,8 @@ class VirtualMachineInstancesImpl {
550
579
  spec: stopOperationSpec,
551
580
  });
552
581
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
553
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
554
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
582
+ restoreFrom: options?.resumeFrom,
583
+ intervalInMs: options?.updateIntervalInMs,
555
584
  resourceLocationConfig: "location",
556
585
  });
557
586
  await poller.poll();