@azure/arm-resourcesdeployments 1.0.0-alpha.20250718.1 → 1.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 (51) hide show
  1. package/dist/browser/deploymentsClient.js +15 -5
  2. package/dist/browser/deploymentsClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +5 -2
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/deploymentOperations.js +111 -196
  8. package/dist/browser/operations/deploymentOperations.js.map +1 -1
  9. package/dist/browser/operations/deployments.js +325 -315
  10. package/dist/browser/operations/deployments.js.map +1 -1
  11. package/dist/browser/pagingHelper.js +2 -4
  12. package/dist/browser/pagingHelper.js.map +1 -1
  13. package/dist/commonjs/deploymentsClient.js +15 -5
  14. package/dist/commonjs/deploymentsClient.js.map +1 -1
  15. package/dist/commonjs/lroImpl.js +7 -3
  16. package/dist/commonjs/lroImpl.js.map +1 -1
  17. package/dist/commonjs/models/mappers.js +5 -2
  18. package/dist/commonjs/models/mappers.js.map +1 -1
  19. package/dist/commonjs/operations/deploymentOperations.js +111 -195
  20. package/dist/commonjs/operations/deploymentOperations.js.map +1 -1
  21. package/dist/commonjs/operations/deployments.js +325 -314
  22. package/dist/commonjs/operations/deployments.js.map +1 -1
  23. package/dist/commonjs/pagingHelper.js +2 -4
  24. package/dist/commonjs/pagingHelper.js.map +1 -1
  25. package/dist/commonjs/tsdoc-metadata.json +11 -11
  26. package/dist/esm/deploymentsClient.js +15 -5
  27. package/dist/esm/deploymentsClient.js.map +1 -1
  28. package/dist/esm/lroImpl.js +7 -3
  29. package/dist/esm/lroImpl.js.map +1 -1
  30. package/dist/esm/models/mappers.js +5 -2
  31. package/dist/esm/models/mappers.js.map +1 -1
  32. package/dist/esm/operations/deploymentOperations.js +111 -196
  33. package/dist/esm/operations/deploymentOperations.js.map +1 -1
  34. package/dist/esm/operations/deployments.js +325 -315
  35. package/dist/esm/operations/deployments.js.map +1 -1
  36. package/dist/esm/pagingHelper.js +2 -4
  37. package/dist/esm/pagingHelper.js.map +1 -1
  38. package/dist/react-native/deploymentsClient.js +15 -5
  39. package/dist/react-native/deploymentsClient.js.map +1 -1
  40. package/dist/react-native/lroImpl.js +7 -3
  41. package/dist/react-native/lroImpl.js.map +1 -1
  42. package/dist/react-native/models/mappers.js +5 -2
  43. package/dist/react-native/models/mappers.js.map +1 -1
  44. package/dist/react-native/operations/deploymentOperations.js +111 -196
  45. package/dist/react-native/operations/deploymentOperations.js.map +1 -1
  46. package/dist/react-native/operations/deployments.js +325 -315
  47. package/dist/react-native/operations/deployments.js.map +1 -1
  48. package/dist/react-native/pagingHelper.js +2 -4
  49. package/dist/react-native/pagingHelper.js.map +1 -1
  50. package/package.json +2 -2
  51. package/review/arm-resourcesdeployments-node.api.md +1226 -1226
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Deployments operations. */
20
20
  class DeploymentsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Deployments class.
23
24
  * @param client Reference to the service client
@@ -40,52 +41,35 @@ class DeploymentsImpl {
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.listAtScopePagingPage(scope, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listAtScopePagingPage(scope, options, settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listAtScopePagingPage_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._listAtScope(scope, 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._listAtScopeNext(scope, 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
- });
69
- }
70
- listAtScopePagingAll(scope, options) {
71
- return tslib_1.__asyncGenerator(this, arguments, function* listAtScopePagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = tslib_1.__asyncValues(this.listAtScopePagingPage(scope, 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
- });
51
+ async *listAtScopePagingPage(scope, options, settings) {
52
+ let result;
53
+ let continuationToken = settings?.continuationToken;
54
+ if (!continuationToken) {
55
+ result = await this._listAtScope(scope, 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._listAtScopeNext(scope, continuationToken, options);
63
+ continuationToken = result.nextLink;
64
+ let page = result.value || [];
65
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
66
+ yield page;
67
+ }
68
+ }
69
+ async *listAtScopePagingAll(scope, options) {
70
+ for await (const page of this.listAtScopePagingPage(scope, options)) {
71
+ yield* page;
72
+ }
89
73
  }
90
74
  /**
91
75
  * Get all the deployments at the tenant scope.
@@ -101,52 +85,35 @@ class DeploymentsImpl {
101
85
  return this;
102
86
  },
103
87
  byPage: (settings) => {
104
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
88
+ if (settings?.maxPageSize) {
105
89
  throw new Error("maxPageSize is not supported by this operation.");
106
90
  }
107
91
  return this.listAtTenantScopePagingPage(options, settings);
108
92
  },
109
93
  };
110
94
  }
111
- listAtTenantScopePagingPage(options, settings) {
112
- return tslib_1.__asyncGenerator(this, arguments, function* listAtTenantScopePagingPage_1() {
113
- let result;
114
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
115
- if (!continuationToken) {
116
- result = yield tslib_1.__await(this._listAtTenantScope(options));
117
- let page = result.value || [];
118
- continuationToken = result.nextLink;
119
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
120
- yield yield tslib_1.__await(page);
121
- }
122
- while (continuationToken) {
123
- result = yield tslib_1.__await(this._listAtTenantScopeNext(continuationToken, options));
124
- continuationToken = result.nextLink;
125
- let page = result.value || [];
126
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
127
- yield yield tslib_1.__await(page);
128
- }
129
- });
130
- }
131
- listAtTenantScopePagingAll(options) {
132
- return tslib_1.__asyncGenerator(this, arguments, function* listAtTenantScopePagingAll_1() {
133
- var _a, e_2, _b, _c;
134
- try {
135
- for (var _d = true, _e = tslib_1.__asyncValues(this.listAtTenantScopePagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
136
- _c = _f.value;
137
- _d = false;
138
- const page = _c;
139
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
140
- }
141
- }
142
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
143
- finally {
144
- try {
145
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
146
- }
147
- finally { if (e_2) throw e_2.error; }
148
- }
149
- });
95
+ async *listAtTenantScopePagingPage(options, settings) {
96
+ let result;
97
+ let continuationToken = settings?.continuationToken;
98
+ if (!continuationToken) {
99
+ result = await this._listAtTenantScope(options);
100
+ let page = result.value || [];
101
+ continuationToken = result.nextLink;
102
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
103
+ yield page;
104
+ }
105
+ while (continuationToken) {
106
+ result = await this._listAtTenantScopeNext(continuationToken, options);
107
+ continuationToken = result.nextLink;
108
+ let page = result.value || [];
109
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
110
+ yield page;
111
+ }
112
+ }
113
+ async *listAtTenantScopePagingAll(options) {
114
+ for await (const page of this.listAtTenantScopePagingPage(options)) {
115
+ yield* page;
116
+ }
150
117
  }
151
118
  /**
152
119
  * Get all the deployments for a management group.
@@ -163,52 +130,35 @@ class DeploymentsImpl {
163
130
  return this;
164
131
  },
165
132
  byPage: (settings) => {
166
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
133
+ if (settings?.maxPageSize) {
167
134
  throw new Error("maxPageSize is not supported by this operation.");
168
135
  }
169
136
  return this.listAtManagementGroupScopePagingPage(groupId, options, settings);
170
137
  },
171
138
  };
172
139
  }
173
- listAtManagementGroupScopePagingPage(groupId, options, settings) {
174
- return tslib_1.__asyncGenerator(this, arguments, function* listAtManagementGroupScopePagingPage_1() {
175
- let result;
176
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
177
- if (!continuationToken) {
178
- result = yield tslib_1.__await(this._listAtManagementGroupScope(groupId, options));
179
- let page = result.value || [];
180
- continuationToken = result.nextLink;
181
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
182
- yield yield tslib_1.__await(page);
183
- }
184
- while (continuationToken) {
185
- result = yield tslib_1.__await(this._listAtManagementGroupScopeNext(groupId, continuationToken, options));
186
- continuationToken = result.nextLink;
187
- let page = result.value || [];
188
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
189
- yield yield tslib_1.__await(page);
190
- }
191
- });
192
- }
193
- listAtManagementGroupScopePagingAll(groupId, options) {
194
- return tslib_1.__asyncGenerator(this, arguments, function* listAtManagementGroupScopePagingAll_1() {
195
- var _a, e_3, _b, _c;
196
- try {
197
- for (var _d = true, _e = tslib_1.__asyncValues(this.listAtManagementGroupScopePagingPage(groupId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
198
- _c = _f.value;
199
- _d = false;
200
- const page = _c;
201
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__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 tslib_1.__await(_b.call(_e));
208
- }
209
- finally { if (e_3) throw e_3.error; }
210
- }
211
- });
140
+ async *listAtManagementGroupScopePagingPage(groupId, options, settings) {
141
+ let result;
142
+ let continuationToken = settings?.continuationToken;
143
+ if (!continuationToken) {
144
+ result = await this._listAtManagementGroupScope(groupId, options);
145
+ let page = result.value || [];
146
+ continuationToken = result.nextLink;
147
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
148
+ yield page;
149
+ }
150
+ while (continuationToken) {
151
+ result = await this._listAtManagementGroupScopeNext(groupId, continuationToken, options);
152
+ continuationToken = result.nextLink;
153
+ let page = result.value || [];
154
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
155
+ yield page;
156
+ }
157
+ }
158
+ async *listAtManagementGroupScopePagingAll(groupId, options) {
159
+ for await (const page of this.listAtManagementGroupScopePagingPage(groupId, options)) {
160
+ yield* page;
161
+ }
212
162
  }
213
163
  /**
214
164
  * Get all the deployments for a subscription.
@@ -224,52 +174,35 @@ class DeploymentsImpl {
224
174
  return this;
225
175
  },
226
176
  byPage: (settings) => {
227
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
177
+ if (settings?.maxPageSize) {
228
178
  throw new Error("maxPageSize is not supported by this operation.");
229
179
  }
230
180
  return this.listAtSubscriptionScopePagingPage(options, settings);
231
181
  },
232
182
  };
233
183
  }
234
- listAtSubscriptionScopePagingPage(options, settings) {
235
- return tslib_1.__asyncGenerator(this, arguments, function* listAtSubscriptionScopePagingPage_1() {
236
- let result;
237
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
238
- if (!continuationToken) {
239
- result = yield tslib_1.__await(this._listAtSubscriptionScope(options));
240
- let page = result.value || [];
241
- continuationToken = result.nextLink;
242
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
243
- yield yield tslib_1.__await(page);
244
- }
245
- while (continuationToken) {
246
- result = yield tslib_1.__await(this._listAtSubscriptionScopeNext(continuationToken, options));
247
- continuationToken = result.nextLink;
248
- let page = result.value || [];
249
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
250
- yield yield tslib_1.__await(page);
251
- }
252
- });
253
- }
254
- listAtSubscriptionScopePagingAll(options) {
255
- return tslib_1.__asyncGenerator(this, arguments, function* listAtSubscriptionScopePagingAll_1() {
256
- var _a, e_4, _b, _c;
257
- try {
258
- for (var _d = true, _e = tslib_1.__asyncValues(this.listAtSubscriptionScopePagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
259
- _c = _f.value;
260
- _d = false;
261
- const page = _c;
262
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
263
- }
264
- }
265
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
266
- finally {
267
- try {
268
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
269
- }
270
- finally { if (e_4) throw e_4.error; }
271
- }
272
- });
184
+ async *listAtSubscriptionScopePagingPage(options, settings) {
185
+ let result;
186
+ let continuationToken = settings?.continuationToken;
187
+ if (!continuationToken) {
188
+ result = await this._listAtSubscriptionScope(options);
189
+ let page = result.value || [];
190
+ continuationToken = result.nextLink;
191
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
192
+ yield page;
193
+ }
194
+ while (continuationToken) {
195
+ result = await this._listAtSubscriptionScopeNext(continuationToken, options);
196
+ continuationToken = result.nextLink;
197
+ let page = result.value || [];
198
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
199
+ yield page;
200
+ }
201
+ }
202
+ async *listAtSubscriptionScopePagingAll(options) {
203
+ for await (const page of this.listAtSubscriptionScopePagingPage(options)) {
204
+ yield* page;
205
+ }
273
206
  }
274
207
  /**
275
208
  * Get all the deployments for a resource group.
@@ -287,52 +220,35 @@ class DeploymentsImpl {
287
220
  return this;
288
221
  },
289
222
  byPage: (settings) => {
290
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
223
+ if (settings?.maxPageSize) {
291
224
  throw new Error("maxPageSize is not supported by this operation.");
292
225
  }
293
226
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
294
227
  },
295
228
  };
296
229
  }
297
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
298
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
299
- let result;
300
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
301
- if (!continuationToken) {
302
- result = yield tslib_1.__await(this._listByResourceGroup(resourceGroupName, options));
303
- let page = result.value || [];
304
- continuationToken = result.nextLink;
305
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
306
- yield yield tslib_1.__await(page);
307
- }
308
- while (continuationToken) {
309
- result = yield tslib_1.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
310
- continuationToken = result.nextLink;
311
- let page = result.value || [];
312
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
313
- yield yield tslib_1.__await(page);
314
- }
315
- });
316
- }
317
- listByResourceGroupPagingAll(resourceGroupName, options) {
318
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
319
- var _a, e_5, _b, _c;
320
- try {
321
- 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) {
322
- _c = _f.value;
323
- _d = false;
324
- const page = _c;
325
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
326
- }
327
- }
328
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
329
- finally {
330
- try {
331
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
332
- }
333
- finally { if (e_5) throw e_5.error; }
334
- }
335
- });
230
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
231
+ let result;
232
+ let continuationToken = settings?.continuationToken;
233
+ if (!continuationToken) {
234
+ result = await this._listByResourceGroup(resourceGroupName, options);
235
+ let page = result.value || [];
236
+ continuationToken = result.nextLink;
237
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
238
+ yield page;
239
+ }
240
+ while (continuationToken) {
241
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
242
+ continuationToken = result.nextLink;
243
+ let page = result.value || [];
244
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
245
+ yield page;
246
+ }
247
+ }
248
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
249
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
250
+ yield* page;
251
+ }
336
252
  }
337
253
  /**
338
254
  * A template deployment that is currently running cannot be deleted. Deleting a template deployment
@@ -351,14 +267,19 @@ class DeploymentsImpl {
351
267
  return this.client.sendOperationRequest(args, spec);
352
268
  };
353
269
  const sendOperationFn = async (args, spec) => {
354
- var _a;
355
270
  let currentRawResponse = undefined;
356
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
271
+ const providedCallback = args.options?.onResponse;
357
272
  const callback = (rawResponse, flatResponse) => {
358
273
  currentRawResponse = rawResponse;
359
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
274
+ providedCallback?.(rawResponse, flatResponse);
275
+ };
276
+ const updatedArgs = {
277
+ ...args,
278
+ options: {
279
+ ...args.options,
280
+ onResponse: callback,
281
+ },
360
282
  };
361
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
362
283
  const flatResponse = await directSendOperation(updatedArgs, spec);
363
284
  return {
364
285
  flatResponse,
@@ -375,8 +296,8 @@ class DeploymentsImpl {
375
296
  spec: deleteAtScopeOperationSpec,
376
297
  });
377
298
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
378
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
379
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
299
+ restoreFrom: options?.resumeFrom,
300
+ intervalInMs: options?.updateIntervalInMs,
380
301
  });
381
302
  await poller.poll();
382
303
  return poller;
@@ -418,14 +339,19 @@ class DeploymentsImpl {
418
339
  return this.client.sendOperationRequest(args, spec);
419
340
  };
420
341
  const sendOperationFn = async (args, spec) => {
421
- var _a;
422
342
  let currentRawResponse = undefined;
423
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
343
+ const providedCallback = args.options?.onResponse;
424
344
  const callback = (rawResponse, flatResponse) => {
425
345
  currentRawResponse = rawResponse;
426
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
346
+ providedCallback?.(rawResponse, flatResponse);
347
+ };
348
+ const updatedArgs = {
349
+ ...args,
350
+ options: {
351
+ ...args.options,
352
+ onResponse: callback,
353
+ },
427
354
  };
428
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
429
355
  const flatResponse = await directSendOperation(updatedArgs, spec);
430
356
  return {
431
357
  flatResponse,
@@ -442,8 +368,8 @@ class DeploymentsImpl {
442
368
  spec: createOrUpdateAtScopeOperationSpec,
443
369
  });
444
370
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
445
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
446
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
371
+ restoreFrom: options?.resumeFrom,
372
+ intervalInMs: options?.updateIntervalInMs,
447
373
  });
448
374
  await poller.poll();
449
375
  return poller;
@@ -492,14 +418,19 @@ class DeploymentsImpl {
492
418
  return this.client.sendOperationRequest(args, spec);
493
419
  };
494
420
  const sendOperationFn = async (args, spec) => {
495
- var _a;
496
421
  let currentRawResponse = undefined;
497
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
422
+ const providedCallback = args.options?.onResponse;
498
423
  const callback = (rawResponse, flatResponse) => {
499
424
  currentRawResponse = rawResponse;
500
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
425
+ providedCallback?.(rawResponse, flatResponse);
426
+ };
427
+ const updatedArgs = {
428
+ ...args,
429
+ options: {
430
+ ...args.options,
431
+ onResponse: callback,
432
+ },
501
433
  };
502
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
503
434
  const flatResponse = await directSendOperation(updatedArgs, spec);
504
435
  return {
505
436
  flatResponse,
@@ -516,8 +447,8 @@ class DeploymentsImpl {
516
447
  spec: validateAtScopeOperationSpec,
517
448
  });
518
449
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
519
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
520
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
450
+ restoreFrom: options?.resumeFrom,
451
+ intervalInMs: options?.updateIntervalInMs,
521
452
  });
522
453
  await poller.poll();
523
454
  return poller;
@@ -567,14 +498,19 @@ class DeploymentsImpl {
567
498
  return this.client.sendOperationRequest(args, spec);
568
499
  };
569
500
  const sendOperationFn = async (args, spec) => {
570
- var _a;
571
501
  let currentRawResponse = undefined;
572
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
502
+ const providedCallback = args.options?.onResponse;
573
503
  const callback = (rawResponse, flatResponse) => {
574
504
  currentRawResponse = rawResponse;
575
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
505
+ providedCallback?.(rawResponse, flatResponse);
506
+ };
507
+ const updatedArgs = {
508
+ ...args,
509
+ options: {
510
+ ...args.options,
511
+ onResponse: callback,
512
+ },
576
513
  };
577
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
578
514
  const flatResponse = await directSendOperation(updatedArgs, spec);
579
515
  return {
580
516
  flatResponse,
@@ -591,8 +527,8 @@ class DeploymentsImpl {
591
527
  spec: deleteAtTenantScopeOperationSpec,
592
528
  });
593
529
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
594
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
595
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
530
+ restoreFrom: options?.resumeFrom,
531
+ intervalInMs: options?.updateIntervalInMs,
596
532
  });
597
533
  await poller.poll();
598
534
  return poller;
@@ -631,14 +567,19 @@ class DeploymentsImpl {
631
567
  return this.client.sendOperationRequest(args, spec);
632
568
  };
633
569
  const sendOperationFn = async (args, spec) => {
634
- var _a;
635
570
  let currentRawResponse = undefined;
636
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
571
+ const providedCallback = args.options?.onResponse;
637
572
  const callback = (rawResponse, flatResponse) => {
638
573
  currentRawResponse = rawResponse;
639
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
574
+ providedCallback?.(rawResponse, flatResponse);
575
+ };
576
+ const updatedArgs = {
577
+ ...args,
578
+ options: {
579
+ ...args.options,
580
+ onResponse: callback,
581
+ },
640
582
  };
641
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
642
583
  const flatResponse = await directSendOperation(updatedArgs, spec);
643
584
  return {
644
585
  flatResponse,
@@ -655,8 +596,8 @@ class DeploymentsImpl {
655
596
  spec: createOrUpdateAtTenantScopeOperationSpec,
656
597
  });
657
598
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
658
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
659
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
599
+ restoreFrom: options?.resumeFrom,
600
+ intervalInMs: options?.updateIntervalInMs,
660
601
  });
661
602
  await poller.poll();
662
603
  return poller;
@@ -701,14 +642,19 @@ class DeploymentsImpl {
701
642
  return this.client.sendOperationRequest(args, spec);
702
643
  };
703
644
  const sendOperationFn = async (args, spec) => {
704
- var _a;
705
645
  let currentRawResponse = undefined;
706
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
646
+ const providedCallback = args.options?.onResponse;
707
647
  const callback = (rawResponse, flatResponse) => {
708
648
  currentRawResponse = rawResponse;
709
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
649
+ providedCallback?.(rawResponse, flatResponse);
650
+ };
651
+ const updatedArgs = {
652
+ ...args,
653
+ options: {
654
+ ...args.options,
655
+ onResponse: callback,
656
+ },
710
657
  };
711
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
712
658
  const flatResponse = await directSendOperation(updatedArgs, spec);
713
659
  return {
714
660
  flatResponse,
@@ -725,8 +671,8 @@ class DeploymentsImpl {
725
671
  spec: validateAtTenantScopeOperationSpec,
726
672
  });
727
673
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
728
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
729
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
674
+ restoreFrom: options?.resumeFrom,
675
+ intervalInMs: options?.updateIntervalInMs,
730
676
  });
731
677
  await poller.poll();
732
678
  return poller;
@@ -753,14 +699,19 @@ class DeploymentsImpl {
753
699
  return this.client.sendOperationRequest(args, spec);
754
700
  };
755
701
  const sendOperationFn = async (args, spec) => {
756
- var _a;
757
702
  let currentRawResponse = undefined;
758
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
703
+ const providedCallback = args.options?.onResponse;
759
704
  const callback = (rawResponse, flatResponse) => {
760
705
  currentRawResponse = rawResponse;
761
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
706
+ providedCallback?.(rawResponse, flatResponse);
707
+ };
708
+ const updatedArgs = {
709
+ ...args,
710
+ options: {
711
+ ...args.options,
712
+ onResponse: callback,
713
+ },
762
714
  };
763
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
764
715
  const flatResponse = await directSendOperation(updatedArgs, spec);
765
716
  return {
766
717
  flatResponse,
@@ -777,8 +728,8 @@ class DeploymentsImpl {
777
728
  spec: whatIfAtTenantScopeOperationSpec,
778
729
  });
779
730
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
780
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
781
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
731
+ restoreFrom: options?.resumeFrom,
732
+ intervalInMs: options?.updateIntervalInMs,
782
733
  resourceLocationConfig: "location",
783
734
  });
784
735
  await poller.poll();
@@ -826,14 +777,19 @@ class DeploymentsImpl {
826
777
  return this.client.sendOperationRequest(args, spec);
827
778
  };
828
779
  const sendOperationFn = async (args, spec) => {
829
- var _a;
830
780
  let currentRawResponse = undefined;
831
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
781
+ const providedCallback = args.options?.onResponse;
832
782
  const callback = (rawResponse, flatResponse) => {
833
783
  currentRawResponse = rawResponse;
834
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
784
+ providedCallback?.(rawResponse, flatResponse);
785
+ };
786
+ const updatedArgs = {
787
+ ...args,
788
+ options: {
789
+ ...args.options,
790
+ onResponse: callback,
791
+ },
835
792
  };
836
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
837
793
  const flatResponse = await directSendOperation(updatedArgs, spec);
838
794
  return {
839
795
  flatResponse,
@@ -850,8 +806,8 @@ class DeploymentsImpl {
850
806
  spec: deleteAtManagementGroupScopeOperationSpec,
851
807
  });
852
808
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
853
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
854
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
809
+ restoreFrom: options?.resumeFrom,
810
+ intervalInMs: options?.updateIntervalInMs,
855
811
  });
856
812
  await poller.poll();
857
813
  return poller;
@@ -893,14 +849,19 @@ class DeploymentsImpl {
893
849
  return this.client.sendOperationRequest(args, spec);
894
850
  };
895
851
  const sendOperationFn = async (args, spec) => {
896
- var _a;
897
852
  let currentRawResponse = undefined;
898
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
853
+ const providedCallback = args.options?.onResponse;
899
854
  const callback = (rawResponse, flatResponse) => {
900
855
  currentRawResponse = rawResponse;
901
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
856
+ providedCallback?.(rawResponse, flatResponse);
857
+ };
858
+ const updatedArgs = {
859
+ ...args,
860
+ options: {
861
+ ...args.options,
862
+ onResponse: callback,
863
+ },
902
864
  };
903
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
904
865
  const flatResponse = await directSendOperation(updatedArgs, spec);
905
866
  return {
906
867
  flatResponse,
@@ -917,8 +878,8 @@ class DeploymentsImpl {
917
878
  spec: createOrUpdateAtManagementGroupScopeOperationSpec,
918
879
  });
919
880
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
920
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
921
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
881
+ restoreFrom: options?.resumeFrom,
882
+ intervalInMs: options?.updateIntervalInMs,
922
883
  });
923
884
  await poller.poll();
924
885
  return poller;
@@ -967,14 +928,19 @@ class DeploymentsImpl {
967
928
  return this.client.sendOperationRequest(args, spec);
968
929
  };
969
930
  const sendOperationFn = async (args, spec) => {
970
- var _a;
971
931
  let currentRawResponse = undefined;
972
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
932
+ const providedCallback = args.options?.onResponse;
973
933
  const callback = (rawResponse, flatResponse) => {
974
934
  currentRawResponse = rawResponse;
975
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
935
+ providedCallback?.(rawResponse, flatResponse);
936
+ };
937
+ const updatedArgs = {
938
+ ...args,
939
+ options: {
940
+ ...args.options,
941
+ onResponse: callback,
942
+ },
976
943
  };
977
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
978
944
  const flatResponse = await directSendOperation(updatedArgs, spec);
979
945
  return {
980
946
  flatResponse,
@@ -991,8 +957,8 @@ class DeploymentsImpl {
991
957
  spec: validateAtManagementGroupScopeOperationSpec,
992
958
  });
993
959
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
994
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
995
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
960
+ restoreFrom: options?.resumeFrom,
961
+ intervalInMs: options?.updateIntervalInMs,
996
962
  });
997
963
  await poller.poll();
998
964
  return poller;
@@ -1022,14 +988,19 @@ class DeploymentsImpl {
1022
988
  return this.client.sendOperationRequest(args, spec);
1023
989
  };
1024
990
  const sendOperationFn = async (args, spec) => {
1025
- var _a;
1026
991
  let currentRawResponse = undefined;
1027
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
992
+ const providedCallback = args.options?.onResponse;
1028
993
  const callback = (rawResponse, flatResponse) => {
1029
994
  currentRawResponse = rawResponse;
1030
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
995
+ providedCallback?.(rawResponse, flatResponse);
996
+ };
997
+ const updatedArgs = {
998
+ ...args,
999
+ options: {
1000
+ ...args.options,
1001
+ onResponse: callback,
1002
+ },
1031
1003
  };
1032
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1033
1004
  const flatResponse = await directSendOperation(updatedArgs, spec);
1034
1005
  return {
1035
1006
  flatResponse,
@@ -1046,8 +1017,8 @@ class DeploymentsImpl {
1046
1017
  spec: whatIfAtManagementGroupScopeOperationSpec,
1047
1018
  });
1048
1019
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1049
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1050
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1020
+ restoreFrom: options?.resumeFrom,
1021
+ intervalInMs: options?.updateIntervalInMs,
1051
1022
  resourceLocationConfig: "location",
1052
1023
  });
1053
1024
  await poller.poll();
@@ -1098,14 +1069,19 @@ class DeploymentsImpl {
1098
1069
  return this.client.sendOperationRequest(args, spec);
1099
1070
  };
1100
1071
  const sendOperationFn = async (args, spec) => {
1101
- var _a;
1102
1072
  let currentRawResponse = undefined;
1103
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1073
+ const providedCallback = args.options?.onResponse;
1104
1074
  const callback = (rawResponse, flatResponse) => {
1105
1075
  currentRawResponse = rawResponse;
1106
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1076
+ providedCallback?.(rawResponse, flatResponse);
1077
+ };
1078
+ const updatedArgs = {
1079
+ ...args,
1080
+ options: {
1081
+ ...args.options,
1082
+ onResponse: callback,
1083
+ },
1107
1084
  };
1108
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1109
1085
  const flatResponse = await directSendOperation(updatedArgs, spec);
1110
1086
  return {
1111
1087
  flatResponse,
@@ -1122,8 +1098,8 @@ class DeploymentsImpl {
1122
1098
  spec: deleteAtSubscriptionScopeOperationSpec,
1123
1099
  });
1124
1100
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1125
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1126
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1101
+ restoreFrom: options?.resumeFrom,
1102
+ intervalInMs: options?.updateIntervalInMs,
1127
1103
  });
1128
1104
  await poller.poll();
1129
1105
  return poller;
@@ -1162,14 +1138,19 @@ class DeploymentsImpl {
1162
1138
  return this.client.sendOperationRequest(args, spec);
1163
1139
  };
1164
1140
  const sendOperationFn = async (args, spec) => {
1165
- var _a;
1166
1141
  let currentRawResponse = undefined;
1167
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1142
+ const providedCallback = args.options?.onResponse;
1168
1143
  const callback = (rawResponse, flatResponse) => {
1169
1144
  currentRawResponse = rawResponse;
1170
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1145
+ providedCallback?.(rawResponse, flatResponse);
1146
+ };
1147
+ const updatedArgs = {
1148
+ ...args,
1149
+ options: {
1150
+ ...args.options,
1151
+ onResponse: callback,
1152
+ },
1171
1153
  };
1172
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1173
1154
  const flatResponse = await directSendOperation(updatedArgs, spec);
1174
1155
  return {
1175
1156
  flatResponse,
@@ -1186,8 +1167,8 @@ class DeploymentsImpl {
1186
1167
  spec: createOrUpdateAtSubscriptionScopeOperationSpec,
1187
1168
  });
1188
1169
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1189
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1190
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1170
+ restoreFrom: options?.resumeFrom,
1171
+ intervalInMs: options?.updateIntervalInMs,
1191
1172
  });
1192
1173
  await poller.poll();
1193
1174
  return poller;
@@ -1232,14 +1213,19 @@ class DeploymentsImpl {
1232
1213
  return this.client.sendOperationRequest(args, spec);
1233
1214
  };
1234
1215
  const sendOperationFn = async (args, spec) => {
1235
- var _a;
1236
1216
  let currentRawResponse = undefined;
1237
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1217
+ const providedCallback = args.options?.onResponse;
1238
1218
  const callback = (rawResponse, flatResponse) => {
1239
1219
  currentRawResponse = rawResponse;
1240
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1220
+ providedCallback?.(rawResponse, flatResponse);
1221
+ };
1222
+ const updatedArgs = {
1223
+ ...args,
1224
+ options: {
1225
+ ...args.options,
1226
+ onResponse: callback,
1227
+ },
1241
1228
  };
1242
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1243
1229
  const flatResponse = await directSendOperation(updatedArgs, spec);
1244
1230
  return {
1245
1231
  flatResponse,
@@ -1256,8 +1242,8 @@ class DeploymentsImpl {
1256
1242
  spec: validateAtSubscriptionScopeOperationSpec,
1257
1243
  });
1258
1244
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1259
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1260
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1245
+ restoreFrom: options?.resumeFrom,
1246
+ intervalInMs: options?.updateIntervalInMs,
1261
1247
  });
1262
1248
  await poller.poll();
1263
1249
  return poller;
@@ -1284,14 +1270,19 @@ class DeploymentsImpl {
1284
1270
  return this.client.sendOperationRequest(args, spec);
1285
1271
  };
1286
1272
  const sendOperationFn = async (args, spec) => {
1287
- var _a;
1288
1273
  let currentRawResponse = undefined;
1289
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1274
+ const providedCallback = args.options?.onResponse;
1290
1275
  const callback = (rawResponse, flatResponse) => {
1291
1276
  currentRawResponse = rawResponse;
1292
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1277
+ providedCallback?.(rawResponse, flatResponse);
1278
+ };
1279
+ const updatedArgs = {
1280
+ ...args,
1281
+ options: {
1282
+ ...args.options,
1283
+ onResponse: callback,
1284
+ },
1293
1285
  };
1294
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1295
1286
  const flatResponse = await directSendOperation(updatedArgs, spec);
1296
1287
  return {
1297
1288
  flatResponse,
@@ -1308,8 +1299,8 @@ class DeploymentsImpl {
1308
1299
  spec: whatIfAtSubscriptionScopeOperationSpec,
1309
1300
  });
1310
1301
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1311
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1312
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1302
+ restoreFrom: options?.resumeFrom,
1303
+ intervalInMs: options?.updateIntervalInMs,
1313
1304
  resourceLocationConfig: "location",
1314
1305
  });
1315
1306
  await poller.poll();
@@ -1359,14 +1350,19 @@ class DeploymentsImpl {
1359
1350
  return this.client.sendOperationRequest(args, spec);
1360
1351
  };
1361
1352
  const sendOperationFn = async (args, spec) => {
1362
- var _a;
1363
1353
  let currentRawResponse = undefined;
1364
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1354
+ const providedCallback = args.options?.onResponse;
1365
1355
  const callback = (rawResponse, flatResponse) => {
1366
1356
  currentRawResponse = rawResponse;
1367
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1357
+ providedCallback?.(rawResponse, flatResponse);
1358
+ };
1359
+ const updatedArgs = {
1360
+ ...args,
1361
+ options: {
1362
+ ...args.options,
1363
+ onResponse: callback,
1364
+ },
1368
1365
  };
1369
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1370
1366
  const flatResponse = await directSendOperation(updatedArgs, spec);
1371
1367
  return {
1372
1368
  flatResponse,
@@ -1383,8 +1379,8 @@ class DeploymentsImpl {
1383
1379
  spec: deleteOperationSpec,
1384
1380
  });
1385
1381
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1386
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1387
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1382
+ restoreFrom: options?.resumeFrom,
1383
+ intervalInMs: options?.updateIntervalInMs,
1388
1384
  });
1389
1385
  await poller.poll();
1390
1386
  return poller;
@@ -1430,14 +1426,19 @@ class DeploymentsImpl {
1430
1426
  return this.client.sendOperationRequest(args, spec);
1431
1427
  };
1432
1428
  const sendOperationFn = async (args, spec) => {
1433
- var _a;
1434
1429
  let currentRawResponse = undefined;
1435
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1430
+ const providedCallback = args.options?.onResponse;
1436
1431
  const callback = (rawResponse, flatResponse) => {
1437
1432
  currentRawResponse = rawResponse;
1438
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1433
+ providedCallback?.(rawResponse, flatResponse);
1434
+ };
1435
+ const updatedArgs = {
1436
+ ...args,
1437
+ options: {
1438
+ ...args.options,
1439
+ onResponse: callback,
1440
+ },
1439
1441
  };
1440
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1441
1442
  const flatResponse = await directSendOperation(updatedArgs, spec);
1442
1443
  return {
1443
1444
  flatResponse,
@@ -1454,8 +1455,8 @@ class DeploymentsImpl {
1454
1455
  spec: createOrUpdateOperationSpec,
1455
1456
  });
1456
1457
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1457
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1458
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1458
+ restoreFrom: options?.resumeFrom,
1459
+ intervalInMs: options?.updateIntervalInMs,
1459
1460
  });
1460
1461
  await poller.poll();
1461
1462
  return poller;
@@ -1506,14 +1507,19 @@ class DeploymentsImpl {
1506
1507
  return this.client.sendOperationRequest(args, spec);
1507
1508
  };
1508
1509
  const sendOperationFn = async (args, spec) => {
1509
- var _a;
1510
1510
  let currentRawResponse = undefined;
1511
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1511
+ const providedCallback = args.options?.onResponse;
1512
1512
  const callback = (rawResponse, flatResponse) => {
1513
1513
  currentRawResponse = rawResponse;
1514
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1514
+ providedCallback?.(rawResponse, flatResponse);
1515
+ };
1516
+ const updatedArgs = {
1517
+ ...args,
1518
+ options: {
1519
+ ...args.options,
1520
+ onResponse: callback,
1521
+ },
1515
1522
  };
1516
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1517
1523
  const flatResponse = await directSendOperation(updatedArgs, spec);
1518
1524
  return {
1519
1525
  flatResponse,
@@ -1530,8 +1536,8 @@ class DeploymentsImpl {
1530
1536
  spec: validateOperationSpec,
1531
1537
  });
1532
1538
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1533
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1534
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1539
+ restoreFrom: options?.resumeFrom,
1540
+ intervalInMs: options?.updateIntervalInMs,
1535
1541
  });
1536
1542
  await poller.poll();
1537
1543
  return poller;
@@ -1562,14 +1568,19 @@ class DeploymentsImpl {
1562
1568
  return this.client.sendOperationRequest(args, spec);
1563
1569
  };
1564
1570
  const sendOperationFn = async (args, spec) => {
1565
- var _a;
1566
1571
  let currentRawResponse = undefined;
1567
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1572
+ const providedCallback = args.options?.onResponse;
1568
1573
  const callback = (rawResponse, flatResponse) => {
1569
1574
  currentRawResponse = rawResponse;
1570
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1575
+ providedCallback?.(rawResponse, flatResponse);
1576
+ };
1577
+ const updatedArgs = {
1578
+ ...args,
1579
+ options: {
1580
+ ...args.options,
1581
+ onResponse: callback,
1582
+ },
1571
1583
  };
1572
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1573
1584
  const flatResponse = await directSendOperation(updatedArgs, spec);
1574
1585
  return {
1575
1586
  flatResponse,
@@ -1586,8 +1597,8 @@ class DeploymentsImpl {
1586
1597
  spec: whatIfOperationSpec,
1587
1598
  });
1588
1599
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1589
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1590
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1600
+ restoreFrom: options?.resumeFrom,
1601
+ intervalInMs: options?.updateIntervalInMs,
1591
1602
  resourceLocationConfig: "location",
1592
1603
  });
1593
1604
  await poller.poll();