@azure/arm-resources-profile-2020-09-01-hybrid 2.1.1-alpha.20250620.1 → 2.1.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 (91) hide show
  1. package/dist/browser/lroImpl.js +11 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +29 -13
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/deploymentOperations.js +111 -196
  6. package/dist/browser/operations/deploymentOperations.js.map +1 -1
  7. package/dist/browser/operations/deployments.js +320 -310
  8. package/dist/browser/operations/deployments.js.map +1 -1
  9. package/dist/browser/operations/operations.js +23 -40
  10. package/dist/browser/operations/operations.js.map +1 -1
  11. package/dist/browser/operations/providers.js +45 -79
  12. package/dist/browser/operations/providers.js.map +1 -1
  13. package/dist/browser/operations/resourceGroups.js +45 -52
  14. package/dist/browser/operations/resourceGroups.js.map +1 -1
  15. package/dist/browser/operations/resources.js +133 -127
  16. package/dist/browser/operations/resources.js.map +1 -1
  17. package/dist/browser/operations/tagsOperations.js +23 -40
  18. package/dist/browser/operations/tagsOperations.js.map +1 -1
  19. package/dist/browser/pagingHelper.js +2 -4
  20. package/dist/browser/pagingHelper.js.map +1 -1
  21. package/dist/browser/resourceManagementClient.js +20 -5
  22. package/dist/browser/resourceManagementClient.js.map +1 -1
  23. package/dist/commonjs/lroImpl.js +11 -3
  24. package/dist/commonjs/lroImpl.js.map +1 -1
  25. package/dist/commonjs/models/mappers.js +29 -13
  26. package/dist/commonjs/models/mappers.js.map +1 -1
  27. package/dist/commonjs/operations/deploymentOperations.js +111 -195
  28. package/dist/commonjs/operations/deploymentOperations.js.map +1 -1
  29. package/dist/commonjs/operations/deployments.js +320 -309
  30. package/dist/commonjs/operations/deployments.js.map +1 -1
  31. package/dist/commonjs/operations/operations.js +23 -39
  32. package/dist/commonjs/operations/operations.js.map +1 -1
  33. package/dist/commonjs/operations/providers.js +45 -78
  34. package/dist/commonjs/operations/providers.js.map +1 -1
  35. package/dist/commonjs/operations/resourceGroups.js +45 -51
  36. package/dist/commonjs/operations/resourceGroups.js.map +1 -1
  37. package/dist/commonjs/operations/resources.js +133 -126
  38. package/dist/commonjs/operations/resources.js.map +1 -1
  39. package/dist/commonjs/operations/tagsOperations.js +23 -39
  40. package/dist/commonjs/operations/tagsOperations.js.map +1 -1
  41. package/dist/commonjs/pagingHelper.js +2 -4
  42. package/dist/commonjs/pagingHelper.js.map +1 -1
  43. package/dist/commonjs/resourceManagementClient.js +20 -5
  44. package/dist/commonjs/resourceManagementClient.js.map +1 -1
  45. package/dist/commonjs/tsdoc-metadata.json +11 -11
  46. package/dist/esm/lroImpl.js +11 -3
  47. package/dist/esm/lroImpl.js.map +1 -1
  48. package/dist/esm/models/mappers.js +29 -13
  49. package/dist/esm/models/mappers.js.map +1 -1
  50. package/dist/esm/operations/deploymentOperations.js +111 -196
  51. package/dist/esm/operations/deploymentOperations.js.map +1 -1
  52. package/dist/esm/operations/deployments.js +320 -310
  53. package/dist/esm/operations/deployments.js.map +1 -1
  54. package/dist/esm/operations/operations.js +23 -40
  55. package/dist/esm/operations/operations.js.map +1 -1
  56. package/dist/esm/operations/providers.js +45 -79
  57. package/dist/esm/operations/providers.js.map +1 -1
  58. package/dist/esm/operations/resourceGroups.js +45 -52
  59. package/dist/esm/operations/resourceGroups.js.map +1 -1
  60. package/dist/esm/operations/resources.js +133 -127
  61. package/dist/esm/operations/resources.js.map +1 -1
  62. package/dist/esm/operations/tagsOperations.js +23 -40
  63. package/dist/esm/operations/tagsOperations.js.map +1 -1
  64. package/dist/esm/pagingHelper.js +2 -4
  65. package/dist/esm/pagingHelper.js.map +1 -1
  66. package/dist/esm/resourceManagementClient.js +20 -5
  67. package/dist/esm/resourceManagementClient.js.map +1 -1
  68. package/dist/react-native/lroImpl.js +11 -3
  69. package/dist/react-native/lroImpl.js.map +1 -1
  70. package/dist/react-native/models/mappers.js +29 -13
  71. package/dist/react-native/models/mappers.js.map +1 -1
  72. package/dist/react-native/operations/deploymentOperations.js +111 -196
  73. package/dist/react-native/operations/deploymentOperations.js.map +1 -1
  74. package/dist/react-native/operations/deployments.js +320 -310
  75. package/dist/react-native/operations/deployments.js.map +1 -1
  76. package/dist/react-native/operations/operations.js +23 -40
  77. package/dist/react-native/operations/operations.js.map +1 -1
  78. package/dist/react-native/operations/providers.js +45 -79
  79. package/dist/react-native/operations/providers.js.map +1 -1
  80. package/dist/react-native/operations/resourceGroups.js +45 -52
  81. package/dist/react-native/operations/resourceGroups.js.map +1 -1
  82. package/dist/react-native/operations/resources.js +133 -127
  83. package/dist/react-native/operations/resources.js.map +1 -1
  84. package/dist/react-native/operations/tagsOperations.js +23 -40
  85. package/dist/react-native/operations/tagsOperations.js.map +1 -1
  86. package/dist/react-native/pagingHelper.js +2 -4
  87. package/dist/react-native/pagingHelper.js.map +1 -1
  88. package/dist/react-native/resourceManagementClient.js +20 -5
  89. package/dist/react-native/resourceManagementClient.js.map +1 -1
  90. package/package.json +2 -2
  91. /package/review/{arm-resources-profile-2020-09-01-hybrid.api.md → arm-resources-profile-2020-09-01-hybrid-node.api.md} +0 -0
@@ -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
- });
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
+ }
69
68
  }
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
- });
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
- });
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
+ }
130
112
  }
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
- });
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
- });
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
+ }
192
157
  }
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
- });
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
- });
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
+ }
253
201
  }
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
- });
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
- });
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
+ }
316
247
  }
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
- });
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 sendOperation = 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,
@@ -371,8 +292,8 @@ class DeploymentsImpl {
371
292
  };
372
293
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { scope, deploymentName, options }, deleteAtScopeOperationSpec);
373
294
  const poller = new core_lro_1.LroEngine(lro, {
374
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
375
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
295
+ resumeFrom: options?.resumeFrom,
296
+ intervalInMs: options?.updateIntervalInMs
376
297
  });
377
298
  await poller.poll();
378
299
  return poller;
@@ -414,14 +335,19 @@ class DeploymentsImpl {
414
335
  return this.client.sendOperationRequest(args, spec);
415
336
  };
416
337
  const sendOperation = async (args, spec) => {
417
- var _a;
418
338
  let currentRawResponse = undefined;
419
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
339
+ const providedCallback = args.options?.onResponse;
420
340
  const callback = (rawResponse, flatResponse) => {
421
341
  currentRawResponse = rawResponse;
422
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
342
+ providedCallback?.(rawResponse, flatResponse);
343
+ };
344
+ const updatedArgs = {
345
+ ...args,
346
+ options: {
347
+ ...args.options,
348
+ onResponse: callback
349
+ }
423
350
  };
424
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
425
351
  const flatResponse = await directSendOperation(updatedArgs, spec);
426
352
  return {
427
353
  flatResponse,
@@ -434,8 +360,8 @@ class DeploymentsImpl {
434
360
  };
435
361
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { scope, deploymentName, parameters, options }, createOrUpdateAtScopeOperationSpec);
436
362
  const poller = new core_lro_1.LroEngine(lro, {
437
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
438
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
363
+ resumeFrom: options?.resumeFrom,
364
+ intervalInMs: options?.updateIntervalInMs
439
365
  });
440
366
  await poller.poll();
441
367
  return poller;
@@ -484,14 +410,19 @@ class DeploymentsImpl {
484
410
  return this.client.sendOperationRequest(args, spec);
485
411
  };
486
412
  const sendOperation = async (args, spec) => {
487
- var _a;
488
413
  let currentRawResponse = undefined;
489
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
414
+ const providedCallback = args.options?.onResponse;
490
415
  const callback = (rawResponse, flatResponse) => {
491
416
  currentRawResponse = rawResponse;
492
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
417
+ providedCallback?.(rawResponse, flatResponse);
418
+ };
419
+ const updatedArgs = {
420
+ ...args,
421
+ options: {
422
+ ...args.options,
423
+ onResponse: callback
424
+ }
493
425
  };
494
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
495
426
  const flatResponse = await directSendOperation(updatedArgs, spec);
496
427
  return {
497
428
  flatResponse,
@@ -504,8 +435,8 @@ class DeploymentsImpl {
504
435
  };
505
436
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { scope, deploymentName, parameters, options }, validateAtScopeOperationSpec);
506
437
  const poller = new core_lro_1.LroEngine(lro, {
507
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
508
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
438
+ resumeFrom: options?.resumeFrom,
439
+ intervalInMs: options?.updateIntervalInMs
509
440
  });
510
441
  await poller.poll();
511
442
  return poller;
@@ -555,14 +486,19 @@ class DeploymentsImpl {
555
486
  return this.client.sendOperationRequest(args, spec);
556
487
  };
557
488
  const sendOperation = async (args, spec) => {
558
- var _a;
559
489
  let currentRawResponse = undefined;
560
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
490
+ const providedCallback = args.options?.onResponse;
561
491
  const callback = (rawResponse, flatResponse) => {
562
492
  currentRawResponse = rawResponse;
563
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
493
+ providedCallback?.(rawResponse, flatResponse);
494
+ };
495
+ const updatedArgs = {
496
+ ...args,
497
+ options: {
498
+ ...args.options,
499
+ onResponse: callback
500
+ }
564
501
  };
565
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
566
502
  const flatResponse = await directSendOperation(updatedArgs, spec);
567
503
  return {
568
504
  flatResponse,
@@ -575,8 +511,8 @@ class DeploymentsImpl {
575
511
  };
576
512
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, options }, deleteAtTenantScopeOperationSpec);
577
513
  const poller = new core_lro_1.LroEngine(lro, {
578
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
579
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
514
+ resumeFrom: options?.resumeFrom,
515
+ intervalInMs: options?.updateIntervalInMs
580
516
  });
581
517
  await poller.poll();
582
518
  return poller;
@@ -615,14 +551,19 @@ class DeploymentsImpl {
615
551
  return this.client.sendOperationRequest(args, spec);
616
552
  };
617
553
  const sendOperation = async (args, spec) => {
618
- var _a;
619
554
  let currentRawResponse = undefined;
620
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
555
+ const providedCallback = args.options?.onResponse;
621
556
  const callback = (rawResponse, flatResponse) => {
622
557
  currentRawResponse = rawResponse;
623
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
558
+ providedCallback?.(rawResponse, flatResponse);
559
+ };
560
+ const updatedArgs = {
561
+ ...args,
562
+ options: {
563
+ ...args.options,
564
+ onResponse: callback
565
+ }
624
566
  };
625
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
626
567
  const flatResponse = await directSendOperation(updatedArgs, spec);
627
568
  return {
628
569
  flatResponse,
@@ -635,8 +576,8 @@ class DeploymentsImpl {
635
576
  };
636
577
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, parameters, options }, createOrUpdateAtTenantScopeOperationSpec);
637
578
  const poller = new core_lro_1.LroEngine(lro, {
638
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
639
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
579
+ resumeFrom: options?.resumeFrom,
580
+ intervalInMs: options?.updateIntervalInMs
640
581
  });
641
582
  await poller.poll();
642
583
  return poller;
@@ -681,14 +622,19 @@ class DeploymentsImpl {
681
622
  return this.client.sendOperationRequest(args, spec);
682
623
  };
683
624
  const sendOperation = async (args, spec) => {
684
- var _a;
685
625
  let currentRawResponse = undefined;
686
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
626
+ const providedCallback = args.options?.onResponse;
687
627
  const callback = (rawResponse, flatResponse) => {
688
628
  currentRawResponse = rawResponse;
689
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
629
+ providedCallback?.(rawResponse, flatResponse);
630
+ };
631
+ const updatedArgs = {
632
+ ...args,
633
+ options: {
634
+ ...args.options,
635
+ onResponse: callback
636
+ }
690
637
  };
691
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
692
638
  const flatResponse = await directSendOperation(updatedArgs, spec);
693
639
  return {
694
640
  flatResponse,
@@ -701,8 +647,8 @@ class DeploymentsImpl {
701
647
  };
702
648
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, parameters, options }, validateAtTenantScopeOperationSpec);
703
649
  const poller = new core_lro_1.LroEngine(lro, {
704
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
705
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
650
+ resumeFrom: options?.resumeFrom,
651
+ intervalInMs: options?.updateIntervalInMs
706
652
  });
707
653
  await poller.poll();
708
654
  return poller;
@@ -729,14 +675,19 @@ class DeploymentsImpl {
729
675
  return this.client.sendOperationRequest(args, spec);
730
676
  };
731
677
  const sendOperation = async (args, spec) => {
732
- var _a;
733
678
  let currentRawResponse = undefined;
734
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
679
+ const providedCallback = args.options?.onResponse;
735
680
  const callback = (rawResponse, flatResponse) => {
736
681
  currentRawResponse = rawResponse;
737
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
682
+ providedCallback?.(rawResponse, flatResponse);
683
+ };
684
+ const updatedArgs = {
685
+ ...args,
686
+ options: {
687
+ ...args.options,
688
+ onResponse: callback
689
+ }
738
690
  };
739
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
740
691
  const flatResponse = await directSendOperation(updatedArgs, spec);
741
692
  return {
742
693
  flatResponse,
@@ -749,8 +700,8 @@ class DeploymentsImpl {
749
700
  };
750
701
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, parameters, options }, whatIfAtTenantScopeOperationSpec);
751
702
  const poller = new core_lro_1.LroEngine(lro, {
752
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
753
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
703
+ resumeFrom: options?.resumeFrom,
704
+ intervalInMs: options?.updateIntervalInMs,
754
705
  lroResourceLocationConfig: "location"
755
706
  });
756
707
  await poller.poll();
@@ -798,14 +749,19 @@ class DeploymentsImpl {
798
749
  return this.client.sendOperationRequest(args, spec);
799
750
  };
800
751
  const sendOperation = async (args, spec) => {
801
- var _a;
802
752
  let currentRawResponse = undefined;
803
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
753
+ const providedCallback = args.options?.onResponse;
804
754
  const callback = (rawResponse, flatResponse) => {
805
755
  currentRawResponse = rawResponse;
806
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
756
+ providedCallback?.(rawResponse, flatResponse);
757
+ };
758
+ const updatedArgs = {
759
+ ...args,
760
+ options: {
761
+ ...args.options,
762
+ onResponse: callback
763
+ }
807
764
  };
808
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
809
765
  const flatResponse = await directSendOperation(updatedArgs, spec);
810
766
  return {
811
767
  flatResponse,
@@ -818,8 +774,8 @@ class DeploymentsImpl {
818
774
  };
819
775
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { groupId, deploymentName, options }, deleteAtManagementGroupScopeOperationSpec);
820
776
  const poller = new core_lro_1.LroEngine(lro, {
821
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
822
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
777
+ resumeFrom: options?.resumeFrom,
778
+ intervalInMs: options?.updateIntervalInMs
823
779
  });
824
780
  await poller.poll();
825
781
  return poller;
@@ -861,14 +817,19 @@ class DeploymentsImpl {
861
817
  return this.client.sendOperationRequest(args, spec);
862
818
  };
863
819
  const sendOperation = async (args, spec) => {
864
- var _a;
865
820
  let currentRawResponse = undefined;
866
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
821
+ const providedCallback = args.options?.onResponse;
867
822
  const callback = (rawResponse, flatResponse) => {
868
823
  currentRawResponse = rawResponse;
869
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
824
+ providedCallback?.(rawResponse, flatResponse);
825
+ };
826
+ const updatedArgs = {
827
+ ...args,
828
+ options: {
829
+ ...args.options,
830
+ onResponse: callback
831
+ }
870
832
  };
871
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
872
833
  const flatResponse = await directSendOperation(updatedArgs, spec);
873
834
  return {
874
835
  flatResponse,
@@ -881,8 +842,8 @@ class DeploymentsImpl {
881
842
  };
882
843
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { groupId, deploymentName, parameters, options }, createOrUpdateAtManagementGroupScopeOperationSpec);
883
844
  const poller = new core_lro_1.LroEngine(lro, {
884
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
885
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
845
+ resumeFrom: options?.resumeFrom,
846
+ intervalInMs: options?.updateIntervalInMs
886
847
  });
887
848
  await poller.poll();
888
849
  return poller;
@@ -931,14 +892,19 @@ class DeploymentsImpl {
931
892
  return this.client.sendOperationRequest(args, spec);
932
893
  };
933
894
  const sendOperation = async (args, spec) => {
934
- var _a;
935
895
  let currentRawResponse = undefined;
936
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
896
+ const providedCallback = args.options?.onResponse;
937
897
  const callback = (rawResponse, flatResponse) => {
938
898
  currentRawResponse = rawResponse;
939
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
899
+ providedCallback?.(rawResponse, flatResponse);
900
+ };
901
+ const updatedArgs = {
902
+ ...args,
903
+ options: {
904
+ ...args.options,
905
+ onResponse: callback
906
+ }
940
907
  };
941
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
942
908
  const flatResponse = await directSendOperation(updatedArgs, spec);
943
909
  return {
944
910
  flatResponse,
@@ -951,8 +917,8 @@ class DeploymentsImpl {
951
917
  };
952
918
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { groupId, deploymentName, parameters, options }, validateAtManagementGroupScopeOperationSpec);
953
919
  const poller = new core_lro_1.LroEngine(lro, {
954
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
955
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
920
+ resumeFrom: options?.resumeFrom,
921
+ intervalInMs: options?.updateIntervalInMs
956
922
  });
957
923
  await poller.poll();
958
924
  return poller;
@@ -982,14 +948,19 @@ class DeploymentsImpl {
982
948
  return this.client.sendOperationRequest(args, spec);
983
949
  };
984
950
  const sendOperation = async (args, spec) => {
985
- var _a;
986
951
  let currentRawResponse = undefined;
987
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
952
+ const providedCallback = args.options?.onResponse;
988
953
  const callback = (rawResponse, flatResponse) => {
989
954
  currentRawResponse = rawResponse;
990
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
955
+ providedCallback?.(rawResponse, flatResponse);
956
+ };
957
+ const updatedArgs = {
958
+ ...args,
959
+ options: {
960
+ ...args.options,
961
+ onResponse: callback
962
+ }
991
963
  };
992
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
993
964
  const flatResponse = await directSendOperation(updatedArgs, spec);
994
965
  return {
995
966
  flatResponse,
@@ -1002,8 +973,8 @@ class DeploymentsImpl {
1002
973
  };
1003
974
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { groupId, deploymentName, parameters, options }, whatIfAtManagementGroupScopeOperationSpec);
1004
975
  const poller = new core_lro_1.LroEngine(lro, {
1005
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1006
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
976
+ resumeFrom: options?.resumeFrom,
977
+ intervalInMs: options?.updateIntervalInMs,
1007
978
  lroResourceLocationConfig: "location"
1008
979
  });
1009
980
  await poller.poll();
@@ -1054,14 +1025,19 @@ class DeploymentsImpl {
1054
1025
  return this.client.sendOperationRequest(args, spec);
1055
1026
  };
1056
1027
  const sendOperation = async (args, spec) => {
1057
- var _a;
1058
1028
  let currentRawResponse = undefined;
1059
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1029
+ const providedCallback = args.options?.onResponse;
1060
1030
  const callback = (rawResponse, flatResponse) => {
1061
1031
  currentRawResponse = rawResponse;
1062
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1032
+ providedCallback?.(rawResponse, flatResponse);
1033
+ };
1034
+ const updatedArgs = {
1035
+ ...args,
1036
+ options: {
1037
+ ...args.options,
1038
+ onResponse: callback
1039
+ }
1063
1040
  };
1064
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1065
1041
  const flatResponse = await directSendOperation(updatedArgs, spec);
1066
1042
  return {
1067
1043
  flatResponse,
@@ -1074,8 +1050,8 @@ class DeploymentsImpl {
1074
1050
  };
1075
1051
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, options }, deleteAtSubscriptionScopeOperationSpec);
1076
1052
  const poller = new core_lro_1.LroEngine(lro, {
1077
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1078
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1053
+ resumeFrom: options?.resumeFrom,
1054
+ intervalInMs: options?.updateIntervalInMs
1079
1055
  });
1080
1056
  await poller.poll();
1081
1057
  return poller;
@@ -1114,14 +1090,19 @@ class DeploymentsImpl {
1114
1090
  return this.client.sendOperationRequest(args, spec);
1115
1091
  };
1116
1092
  const sendOperation = async (args, spec) => {
1117
- var _a;
1118
1093
  let currentRawResponse = undefined;
1119
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1094
+ const providedCallback = args.options?.onResponse;
1120
1095
  const callback = (rawResponse, flatResponse) => {
1121
1096
  currentRawResponse = rawResponse;
1122
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1097
+ providedCallback?.(rawResponse, flatResponse);
1098
+ };
1099
+ const updatedArgs = {
1100
+ ...args,
1101
+ options: {
1102
+ ...args.options,
1103
+ onResponse: callback
1104
+ }
1123
1105
  };
1124
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1125
1106
  const flatResponse = await directSendOperation(updatedArgs, spec);
1126
1107
  return {
1127
1108
  flatResponse,
@@ -1134,8 +1115,8 @@ class DeploymentsImpl {
1134
1115
  };
1135
1116
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, parameters, options }, createOrUpdateAtSubscriptionScopeOperationSpec);
1136
1117
  const poller = new core_lro_1.LroEngine(lro, {
1137
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1138
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1118
+ resumeFrom: options?.resumeFrom,
1119
+ intervalInMs: options?.updateIntervalInMs
1139
1120
  });
1140
1121
  await poller.poll();
1141
1122
  return poller;
@@ -1180,14 +1161,19 @@ class DeploymentsImpl {
1180
1161
  return this.client.sendOperationRequest(args, spec);
1181
1162
  };
1182
1163
  const sendOperation = async (args, spec) => {
1183
- var _a;
1184
1164
  let currentRawResponse = undefined;
1185
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1165
+ const providedCallback = args.options?.onResponse;
1186
1166
  const callback = (rawResponse, flatResponse) => {
1187
1167
  currentRawResponse = rawResponse;
1188
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1168
+ providedCallback?.(rawResponse, flatResponse);
1169
+ };
1170
+ const updatedArgs = {
1171
+ ...args,
1172
+ options: {
1173
+ ...args.options,
1174
+ onResponse: callback
1175
+ }
1189
1176
  };
1190
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1191
1177
  const flatResponse = await directSendOperation(updatedArgs, spec);
1192
1178
  return {
1193
1179
  flatResponse,
@@ -1200,8 +1186,8 @@ class DeploymentsImpl {
1200
1186
  };
1201
1187
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, parameters, options }, validateAtSubscriptionScopeOperationSpec);
1202
1188
  const poller = new core_lro_1.LroEngine(lro, {
1203
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1204
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1189
+ resumeFrom: options?.resumeFrom,
1190
+ intervalInMs: options?.updateIntervalInMs
1205
1191
  });
1206
1192
  await poller.poll();
1207
1193
  return poller;
@@ -1228,14 +1214,19 @@ class DeploymentsImpl {
1228
1214
  return this.client.sendOperationRequest(args, spec);
1229
1215
  };
1230
1216
  const sendOperation = async (args, spec) => {
1231
- var _a;
1232
1217
  let currentRawResponse = undefined;
1233
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1218
+ const providedCallback = args.options?.onResponse;
1234
1219
  const callback = (rawResponse, flatResponse) => {
1235
1220
  currentRawResponse = rawResponse;
1236
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1221
+ providedCallback?.(rawResponse, flatResponse);
1222
+ };
1223
+ const updatedArgs = {
1224
+ ...args,
1225
+ options: {
1226
+ ...args.options,
1227
+ onResponse: callback
1228
+ }
1237
1229
  };
1238
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1239
1230
  const flatResponse = await directSendOperation(updatedArgs, spec);
1240
1231
  return {
1241
1232
  flatResponse,
@@ -1248,8 +1239,8 @@ class DeploymentsImpl {
1248
1239
  };
1249
1240
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { deploymentName, parameters, options }, whatIfAtSubscriptionScopeOperationSpec);
1250
1241
  const poller = new core_lro_1.LroEngine(lro, {
1251
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1252
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1242
+ resumeFrom: options?.resumeFrom,
1243
+ intervalInMs: options?.updateIntervalInMs,
1253
1244
  lroResourceLocationConfig: "location"
1254
1245
  });
1255
1246
  await poller.poll();
@@ -1299,14 +1290,19 @@ class DeploymentsImpl {
1299
1290
  return this.client.sendOperationRequest(args, spec);
1300
1291
  };
1301
1292
  const sendOperation = async (args, spec) => {
1302
- var _a;
1303
1293
  let currentRawResponse = undefined;
1304
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1294
+ const providedCallback = args.options?.onResponse;
1305
1295
  const callback = (rawResponse, flatResponse) => {
1306
1296
  currentRawResponse = rawResponse;
1307
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1297
+ providedCallback?.(rawResponse, flatResponse);
1298
+ };
1299
+ const updatedArgs = {
1300
+ ...args,
1301
+ options: {
1302
+ ...args.options,
1303
+ onResponse: callback
1304
+ }
1308
1305
  };
1309
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1310
1306
  const flatResponse = await directSendOperation(updatedArgs, spec);
1311
1307
  return {
1312
1308
  flatResponse,
@@ -1319,8 +1315,8 @@ class DeploymentsImpl {
1319
1315
  };
1320
1316
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, deploymentName, options }, deleteOperationSpec);
1321
1317
  const poller = new core_lro_1.LroEngine(lro, {
1322
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1323
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1318
+ resumeFrom: options?.resumeFrom,
1319
+ intervalInMs: options?.updateIntervalInMs
1324
1320
  });
1325
1321
  await poller.poll();
1326
1322
  return poller;
@@ -1366,14 +1362,19 @@ class DeploymentsImpl {
1366
1362
  return this.client.sendOperationRequest(args, spec);
1367
1363
  };
1368
1364
  const sendOperation = async (args, spec) => {
1369
- var _a;
1370
1365
  let currentRawResponse = undefined;
1371
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1366
+ const providedCallback = args.options?.onResponse;
1372
1367
  const callback = (rawResponse, flatResponse) => {
1373
1368
  currentRawResponse = rawResponse;
1374
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1369
+ providedCallback?.(rawResponse, flatResponse);
1370
+ };
1371
+ const updatedArgs = {
1372
+ ...args,
1373
+ options: {
1374
+ ...args.options,
1375
+ onResponse: callback
1376
+ }
1375
1377
  };
1376
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1377
1378
  const flatResponse = await directSendOperation(updatedArgs, spec);
1378
1379
  return {
1379
1380
  flatResponse,
@@ -1386,8 +1387,8 @@ class DeploymentsImpl {
1386
1387
  };
1387
1388
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, deploymentName, parameters, options }, createOrUpdateOperationSpec);
1388
1389
  const poller = new core_lro_1.LroEngine(lro, {
1389
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1390
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1390
+ resumeFrom: options?.resumeFrom,
1391
+ intervalInMs: options?.updateIntervalInMs
1391
1392
  });
1392
1393
  await poller.poll();
1393
1394
  return poller;
@@ -1438,14 +1439,19 @@ class DeploymentsImpl {
1438
1439
  return this.client.sendOperationRequest(args, spec);
1439
1440
  };
1440
1441
  const sendOperation = async (args, spec) => {
1441
- var _a;
1442
1442
  let currentRawResponse = undefined;
1443
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1443
+ const providedCallback = args.options?.onResponse;
1444
1444
  const callback = (rawResponse, flatResponse) => {
1445
1445
  currentRawResponse = rawResponse;
1446
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1446
+ providedCallback?.(rawResponse, flatResponse);
1447
+ };
1448
+ const updatedArgs = {
1449
+ ...args,
1450
+ options: {
1451
+ ...args.options,
1452
+ onResponse: callback
1453
+ }
1447
1454
  };
1448
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1449
1455
  const flatResponse = await directSendOperation(updatedArgs, spec);
1450
1456
  return {
1451
1457
  flatResponse,
@@ -1458,8 +1464,8 @@ class DeploymentsImpl {
1458
1464
  };
1459
1465
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, deploymentName, parameters, options }, validateOperationSpec);
1460
1466
  const poller = new core_lro_1.LroEngine(lro, {
1461
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1462
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1467
+ resumeFrom: options?.resumeFrom,
1468
+ intervalInMs: options?.updateIntervalInMs
1463
1469
  });
1464
1470
  await poller.poll();
1465
1471
  return poller;
@@ -1490,14 +1496,19 @@ class DeploymentsImpl {
1490
1496
  return this.client.sendOperationRequest(args, spec);
1491
1497
  };
1492
1498
  const sendOperation = async (args, spec) => {
1493
- var _a;
1494
1499
  let currentRawResponse = undefined;
1495
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1500
+ const providedCallback = args.options?.onResponse;
1496
1501
  const callback = (rawResponse, flatResponse) => {
1497
1502
  currentRawResponse = rawResponse;
1498
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1503
+ providedCallback?.(rawResponse, flatResponse);
1504
+ };
1505
+ const updatedArgs = {
1506
+ ...args,
1507
+ options: {
1508
+ ...args.options,
1509
+ onResponse: callback
1510
+ }
1499
1511
  };
1500
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1501
1512
  const flatResponse = await directSendOperation(updatedArgs, spec);
1502
1513
  return {
1503
1514
  flatResponse,
@@ -1510,8 +1521,8 @@ class DeploymentsImpl {
1510
1521
  };
1511
1522
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, deploymentName, parameters, options }, whatIfOperationSpec);
1512
1523
  const poller = new core_lro_1.LroEngine(lro, {
1513
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1514
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1524
+ resumeFrom: options?.resumeFrom,
1525
+ intervalInMs: options?.updateIntervalInMs,
1515
1526
  lroResourceLocationConfig: "location"
1516
1527
  });
1517
1528
  await poller.poll();