@azure/arm-hdinsight 1.3.0-alpha.20250718.1 → 1.3.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 (123) hide show
  1. package/dist/browser/hDInsightManagementClient.js +24 -5
  2. package/dist/browser/hDInsightManagementClient.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 +86 -39
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/applications.js +45 -52
  8. package/dist/browser/operations/applications.js.map +1 -1
  9. package/dist/browser/operations/clusters.js +133 -127
  10. package/dist/browser/operations/clusters.js.map +1 -1
  11. package/dist/browser/operations/configurations.js +12 -6
  12. package/dist/browser/operations/configurations.js.map +1 -1
  13. package/dist/browser/operations/extensions.js +89 -48
  14. package/dist/browser/operations/extensions.js.map +1 -1
  15. package/dist/browser/operations/locations.js +1 -0
  16. package/dist/browser/operations/locations.js.map +1 -1
  17. package/dist/browser/operations/operations.js +23 -40
  18. package/dist/browser/operations/operations.js.map +1 -1
  19. package/dist/browser/operations/privateEndpointConnections.js +45 -52
  20. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  21. package/dist/browser/operations/privateLinkResources.js +1 -0
  22. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  23. package/dist/browser/operations/scriptActions.js +23 -40
  24. package/dist/browser/operations/scriptActions.js.map +1 -1
  25. package/dist/browser/operations/scriptExecutionHistory.js +23 -40
  26. package/dist/browser/operations/scriptExecutionHistory.js.map +1 -1
  27. package/dist/browser/operations/virtualMachines.js +12 -6
  28. package/dist/browser/operations/virtualMachines.js.map +1 -1
  29. package/dist/browser/pagingHelper.js +2 -4
  30. package/dist/browser/pagingHelper.js.map +1 -1
  31. package/dist/commonjs/hDInsightManagementClient.js +24 -5
  32. package/dist/commonjs/hDInsightManagementClient.js.map +1 -1
  33. package/dist/commonjs/lroImpl.js +7 -3
  34. package/dist/commonjs/lroImpl.js.map +1 -1
  35. package/dist/commonjs/models/mappers.js +86 -39
  36. package/dist/commonjs/models/mappers.js.map +1 -1
  37. package/dist/commonjs/operations/applications.js +45 -51
  38. package/dist/commonjs/operations/applications.js.map +1 -1
  39. package/dist/commonjs/operations/clusters.js +133 -126
  40. package/dist/commonjs/operations/clusters.js.map +1 -1
  41. package/dist/commonjs/operations/configurations.js +12 -6
  42. package/dist/commonjs/operations/configurations.js.map +1 -1
  43. package/dist/commonjs/operations/extensions.js +89 -48
  44. package/dist/commonjs/operations/extensions.js.map +1 -1
  45. package/dist/commonjs/operations/locations.js +1 -0
  46. package/dist/commonjs/operations/locations.js.map +1 -1
  47. package/dist/commonjs/operations/operations.js +23 -39
  48. package/dist/commonjs/operations/operations.js.map +1 -1
  49. package/dist/commonjs/operations/privateEndpointConnections.js +45 -51
  50. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  51. package/dist/commonjs/operations/privateLinkResources.js +1 -0
  52. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  53. package/dist/commonjs/operations/scriptActions.js +23 -39
  54. package/dist/commonjs/operations/scriptActions.js.map +1 -1
  55. package/dist/commonjs/operations/scriptExecutionHistory.js +23 -39
  56. package/dist/commonjs/operations/scriptExecutionHistory.js.map +1 -1
  57. package/dist/commonjs/operations/virtualMachines.js +12 -6
  58. package/dist/commonjs/operations/virtualMachines.js.map +1 -1
  59. package/dist/commonjs/pagingHelper.js +2 -4
  60. package/dist/commonjs/pagingHelper.js.map +1 -1
  61. package/dist/commonjs/tsdoc-metadata.json +11 -11
  62. package/dist/esm/hDInsightManagementClient.js +24 -5
  63. package/dist/esm/hDInsightManagementClient.js.map +1 -1
  64. package/dist/esm/lroImpl.js +7 -3
  65. package/dist/esm/lroImpl.js.map +1 -1
  66. package/dist/esm/models/mappers.js +86 -39
  67. package/dist/esm/models/mappers.js.map +1 -1
  68. package/dist/esm/operations/applications.js +45 -52
  69. package/dist/esm/operations/applications.js.map +1 -1
  70. package/dist/esm/operations/clusters.js +133 -127
  71. package/dist/esm/operations/clusters.js.map +1 -1
  72. package/dist/esm/operations/configurations.js +12 -6
  73. package/dist/esm/operations/configurations.js.map +1 -1
  74. package/dist/esm/operations/extensions.js +89 -48
  75. package/dist/esm/operations/extensions.js.map +1 -1
  76. package/dist/esm/operations/locations.js +1 -0
  77. package/dist/esm/operations/locations.js.map +1 -1
  78. package/dist/esm/operations/operations.js +23 -40
  79. package/dist/esm/operations/operations.js.map +1 -1
  80. package/dist/esm/operations/privateEndpointConnections.js +45 -52
  81. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  82. package/dist/esm/operations/privateLinkResources.js +1 -0
  83. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  84. package/dist/esm/operations/scriptActions.js +23 -40
  85. package/dist/esm/operations/scriptActions.js.map +1 -1
  86. package/dist/esm/operations/scriptExecutionHistory.js +23 -40
  87. package/dist/esm/operations/scriptExecutionHistory.js.map +1 -1
  88. package/dist/esm/operations/virtualMachines.js +12 -6
  89. package/dist/esm/operations/virtualMachines.js.map +1 -1
  90. package/dist/esm/pagingHelper.js +2 -4
  91. package/dist/esm/pagingHelper.js.map +1 -1
  92. package/dist/react-native/hDInsightManagementClient.js +24 -5
  93. package/dist/react-native/hDInsightManagementClient.js.map +1 -1
  94. package/dist/react-native/lroImpl.js +7 -3
  95. package/dist/react-native/lroImpl.js.map +1 -1
  96. package/dist/react-native/models/mappers.js +86 -39
  97. package/dist/react-native/models/mappers.js.map +1 -1
  98. package/dist/react-native/operations/applications.js +45 -52
  99. package/dist/react-native/operations/applications.js.map +1 -1
  100. package/dist/react-native/operations/clusters.js +133 -127
  101. package/dist/react-native/operations/clusters.js.map +1 -1
  102. package/dist/react-native/operations/configurations.js +12 -6
  103. package/dist/react-native/operations/configurations.js.map +1 -1
  104. package/dist/react-native/operations/extensions.js +89 -48
  105. package/dist/react-native/operations/extensions.js.map +1 -1
  106. package/dist/react-native/operations/locations.js +1 -0
  107. package/dist/react-native/operations/locations.js.map +1 -1
  108. package/dist/react-native/operations/operations.js +23 -40
  109. package/dist/react-native/operations/operations.js.map +1 -1
  110. package/dist/react-native/operations/privateEndpointConnections.js +45 -52
  111. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  112. package/dist/react-native/operations/privateLinkResources.js +1 -0
  113. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  114. package/dist/react-native/operations/scriptActions.js +23 -40
  115. package/dist/react-native/operations/scriptActions.js.map +1 -1
  116. package/dist/react-native/operations/scriptExecutionHistory.js +23 -40
  117. package/dist/react-native/operations/scriptExecutionHistory.js.map +1 -1
  118. package/dist/react-native/operations/virtualMachines.js +12 -6
  119. package/dist/react-native/operations/virtualMachines.js.map +1 -1
  120. package/dist/react-native/pagingHelper.js +2 -4
  121. package/dist/react-native/pagingHelper.js.map +1 -1
  122. package/package.json +2 -2
  123. package/review/arm-hdinsight-node.api.md +1668 -1668
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing Clusters operations. */
17
16
  export class ClustersImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Clusters class.
20
20
  * @param client Reference to the service client
@@ -37,52 +37,35 @@ export class ClustersImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
44
44
  },
45
45
  };
46
46
  }
47
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
48
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- setContinuationToken(page, continuationToken);
56
- yield yield __await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- setContinuationToken(page, continuationToken);
63
- yield yield __await(page);
64
- }
65
- });
47
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
48
+ let result;
49
+ let continuationToken = settings?.continuationToken;
50
+ if (!continuationToken) {
51
+ result = await this._listByResourceGroup(resourceGroupName, options);
52
+ let page = result.value || [];
53
+ continuationToken = result.nextLink;
54
+ setContinuationToken(page, continuationToken);
55
+ yield page;
56
+ }
57
+ while (continuationToken) {
58
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
59
+ continuationToken = result.nextLink;
60
+ let page = result.value || [];
61
+ setContinuationToken(page, continuationToken);
62
+ yield page;
63
+ }
66
64
  }
67
- listByResourceGroupPagingAll(resourceGroupName, options) {
68
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
65
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
66
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
67
+ yield* page;
68
+ }
86
69
  }
87
70
  /**
88
71
  * Lists all the HDInsight clusters under the subscription.
@@ -98,52 +81,35 @@ export class ClustersImpl {
98
81
  return this;
99
82
  },
100
83
  byPage: (settings) => {
101
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
84
+ if (settings?.maxPageSize) {
102
85
  throw new Error("maxPageSize is not supported by this operation.");
103
86
  }
104
87
  return this.listPagingPage(options, settings);
105
88
  },
106
89
  };
107
90
  }
108
- listPagingPage(options, settings) {
109
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
110
- let result;
111
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
112
- if (!continuationToken) {
113
- result = yield __await(this._list(options));
114
- let page = result.value || [];
115
- continuationToken = result.nextLink;
116
- setContinuationToken(page, continuationToken);
117
- yield yield __await(page);
118
- }
119
- while (continuationToken) {
120
- result = yield __await(this._listNext(continuationToken, options));
121
- continuationToken = result.nextLink;
122
- let page = result.value || [];
123
- setContinuationToken(page, continuationToken);
124
- yield yield __await(page);
125
- }
126
- });
91
+ async *listPagingPage(options, settings) {
92
+ let result;
93
+ let continuationToken = settings?.continuationToken;
94
+ if (!continuationToken) {
95
+ result = await this._list(options);
96
+ let page = result.value || [];
97
+ continuationToken = result.nextLink;
98
+ setContinuationToken(page, continuationToken);
99
+ yield page;
100
+ }
101
+ while (continuationToken) {
102
+ result = await this._listNext(continuationToken, options);
103
+ continuationToken = result.nextLink;
104
+ let page = result.value || [];
105
+ setContinuationToken(page, continuationToken);
106
+ yield page;
107
+ }
127
108
  }
128
- listPagingAll(options) {
129
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
130
- var _a, e_2, _b, _c;
131
- try {
132
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
133
- _c = _f.value;
134
- _d = false;
135
- const page = _c;
136
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
137
- }
138
- }
139
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
140
- finally {
141
- try {
142
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
143
- }
144
- finally { if (e_2) throw e_2.error; }
145
- }
146
- });
109
+ async *listPagingAll(options) {
110
+ for await (const page of this.listPagingPage(options)) {
111
+ yield* page;
112
+ }
147
113
  }
148
114
  /**
149
115
  * Creates a new HDInsight cluster with the specified parameters.
@@ -157,14 +123,19 @@ export class ClustersImpl {
157
123
  return this.client.sendOperationRequest(args, spec);
158
124
  };
159
125
  const sendOperationFn = async (args, spec) => {
160
- var _a;
161
126
  let currentRawResponse = undefined;
162
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
127
+ const providedCallback = args.options?.onResponse;
163
128
  const callback = (rawResponse, flatResponse) => {
164
129
  currentRawResponse = rawResponse;
165
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
130
+ providedCallback?.(rawResponse, flatResponse);
131
+ };
132
+ const updatedArgs = {
133
+ ...args,
134
+ options: {
135
+ ...args.options,
136
+ onResponse: callback,
137
+ },
166
138
  };
167
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
168
139
  const flatResponse = await directSendOperation(updatedArgs, spec);
169
140
  return {
170
141
  flatResponse,
@@ -181,8 +152,8 @@ export class ClustersImpl {
181
152
  spec: createOperationSpec,
182
153
  });
183
154
  const poller = await createHttpPoller(lro, {
184
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
185
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
155
+ restoreFrom: options?.resumeFrom,
156
+ intervalInMs: options?.updateIntervalInMs,
186
157
  resourceLocationConfig: "location",
187
158
  });
188
159
  await poller.poll();
@@ -220,14 +191,19 @@ export class ClustersImpl {
220
191
  return this.client.sendOperationRequest(args, spec);
221
192
  };
222
193
  const sendOperationFn = async (args, spec) => {
223
- var _a;
224
194
  let currentRawResponse = undefined;
225
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
195
+ const providedCallback = args.options?.onResponse;
226
196
  const callback = (rawResponse, flatResponse) => {
227
197
  currentRawResponse = rawResponse;
228
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
198
+ providedCallback?.(rawResponse, flatResponse);
199
+ };
200
+ const updatedArgs = {
201
+ ...args,
202
+ options: {
203
+ ...args.options,
204
+ onResponse: callback,
205
+ },
229
206
  };
230
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
231
207
  const flatResponse = await directSendOperation(updatedArgs, spec);
232
208
  return {
233
209
  flatResponse,
@@ -244,8 +220,8 @@ export class ClustersImpl {
244
220
  spec: deleteOperationSpec,
245
221
  });
246
222
  const poller = await createHttpPoller(lro, {
247
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
248
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
223
+ restoreFrom: options?.resumeFrom,
224
+ intervalInMs: options?.updateIntervalInMs,
249
225
  resourceLocationConfig: "location",
250
226
  });
251
227
  await poller.poll();
@@ -291,14 +267,19 @@ export class ClustersImpl {
291
267
  return this.client.sendOperationRequest(args, spec);
292
268
  };
293
269
  const sendOperationFn = async (args, spec) => {
294
- var _a;
295
270
  let currentRawResponse = undefined;
296
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
271
+ const providedCallback = args.options?.onResponse;
297
272
  const callback = (rawResponse, flatResponse) => {
298
273
  currentRawResponse = rawResponse;
299
- 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
+ },
300
282
  };
301
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
302
283
  const flatResponse = await directSendOperation(updatedArgs, spec);
303
284
  return {
304
285
  flatResponse,
@@ -315,8 +296,8 @@ export class ClustersImpl {
315
296
  spec: resizeOperationSpec,
316
297
  });
317
298
  const poller = await createHttpPoller(lro, {
318
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
319
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
299
+ restoreFrom: options?.resumeFrom,
300
+ intervalInMs: options?.updateIntervalInMs,
320
301
  resourceLocationConfig: "location",
321
302
  });
322
303
  await poller.poll();
@@ -347,14 +328,19 @@ export class ClustersImpl {
347
328
  return this.client.sendOperationRequest(args, spec);
348
329
  };
349
330
  const sendOperationFn = async (args, spec) => {
350
- var _a;
351
331
  let currentRawResponse = undefined;
352
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
332
+ const providedCallback = args.options?.onResponse;
353
333
  const callback = (rawResponse, flatResponse) => {
354
334
  currentRawResponse = rawResponse;
355
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
335
+ providedCallback?.(rawResponse, flatResponse);
336
+ };
337
+ const updatedArgs = {
338
+ ...args,
339
+ options: {
340
+ ...args.options,
341
+ onResponse: callback,
342
+ },
356
343
  };
357
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
358
344
  const flatResponse = await directSendOperation(updatedArgs, spec);
359
345
  return {
360
346
  flatResponse,
@@ -371,8 +357,8 @@ export class ClustersImpl {
371
357
  spec: updateAutoScaleConfigurationOperationSpec,
372
358
  });
373
359
  const poller = await createHttpPoller(lro, {
374
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
375
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
360
+ restoreFrom: options?.resumeFrom,
361
+ intervalInMs: options?.updateIntervalInMs,
376
362
  resourceLocationConfig: "location",
377
363
  });
378
364
  await poller.poll();
@@ -409,14 +395,19 @@ export class ClustersImpl {
409
395
  return this.client.sendOperationRequest(args, spec);
410
396
  };
411
397
  const sendOperationFn = async (args, spec) => {
412
- var _a;
413
398
  let currentRawResponse = undefined;
414
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
399
+ const providedCallback = args.options?.onResponse;
415
400
  const callback = (rawResponse, flatResponse) => {
416
401
  currentRawResponse = rawResponse;
417
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
402
+ providedCallback?.(rawResponse, flatResponse);
403
+ };
404
+ const updatedArgs = {
405
+ ...args,
406
+ options: {
407
+ ...args.options,
408
+ onResponse: callback,
409
+ },
418
410
  };
419
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
420
411
  const flatResponse = await directSendOperation(updatedArgs, spec);
421
412
  return {
422
413
  flatResponse,
@@ -433,8 +424,8 @@ export class ClustersImpl {
433
424
  spec: rotateDiskEncryptionKeyOperationSpec,
434
425
  });
435
426
  const poller = await createHttpPoller(lro, {
436
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
437
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
427
+ restoreFrom: options?.resumeFrom,
428
+ intervalInMs: options?.updateIntervalInMs,
438
429
  resourceLocationConfig: "location",
439
430
  });
440
431
  await poller.poll();
@@ -472,14 +463,19 @@ export class ClustersImpl {
472
463
  return this.client.sendOperationRequest(args, spec);
473
464
  };
474
465
  const sendOperationFn = async (args, spec) => {
475
- var _a;
476
466
  let currentRawResponse = undefined;
477
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
467
+ const providedCallback = args.options?.onResponse;
478
468
  const callback = (rawResponse, flatResponse) => {
479
469
  currentRawResponse = rawResponse;
480
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
470
+ providedCallback?.(rawResponse, flatResponse);
471
+ };
472
+ const updatedArgs = {
473
+ ...args,
474
+ options: {
475
+ ...args.options,
476
+ onResponse: callback,
477
+ },
481
478
  };
482
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
483
479
  const flatResponse = await directSendOperation(updatedArgs, spec);
484
480
  return {
485
481
  flatResponse,
@@ -496,8 +492,8 @@ export class ClustersImpl {
496
492
  spec: updateGatewaySettingsOperationSpec,
497
493
  });
498
494
  const poller = await createHttpPoller(lro, {
499
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
500
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
495
+ restoreFrom: options?.resumeFrom,
496
+ intervalInMs: options?.updateIntervalInMs,
501
497
  resourceLocationConfig: "location",
502
498
  });
503
499
  await poller.poll();
@@ -536,14 +532,19 @@ export class ClustersImpl {
536
532
  return this.client.sendOperationRequest(args, spec);
537
533
  };
538
534
  const sendOperationFn = async (args, spec) => {
539
- var _a;
540
535
  let currentRawResponse = undefined;
541
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
536
+ const providedCallback = args.options?.onResponse;
542
537
  const callback = (rawResponse, flatResponse) => {
543
538
  currentRawResponse = rawResponse;
544
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
539
+ providedCallback?.(rawResponse, flatResponse);
540
+ };
541
+ const updatedArgs = {
542
+ ...args,
543
+ options: {
544
+ ...args.options,
545
+ onResponse: callback,
546
+ },
545
547
  };
546
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
547
548
  const flatResponse = await directSendOperation(updatedArgs, spec);
548
549
  return {
549
550
  flatResponse,
@@ -560,8 +561,8 @@ export class ClustersImpl {
560
561
  spec: updateIdentityCertificateOperationSpec,
561
562
  });
562
563
  const poller = await createHttpPoller(lro, {
563
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
564
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
564
+ restoreFrom: options?.resumeFrom,
565
+ intervalInMs: options?.updateIntervalInMs,
565
566
  resourceLocationConfig: "location",
566
567
  });
567
568
  await poller.poll();
@@ -590,14 +591,19 @@ export class ClustersImpl {
590
591
  return this.client.sendOperationRequest(args, spec);
591
592
  };
592
593
  const sendOperationFn = async (args, spec) => {
593
- var _a;
594
594
  let currentRawResponse = undefined;
595
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
595
+ const providedCallback = args.options?.onResponse;
596
596
  const callback = (rawResponse, flatResponse) => {
597
597
  currentRawResponse = rawResponse;
598
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
598
+ providedCallback?.(rawResponse, flatResponse);
599
+ };
600
+ const updatedArgs = {
601
+ ...args,
602
+ options: {
603
+ ...args.options,
604
+ onResponse: callback,
605
+ },
599
606
  };
600
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
601
607
  const flatResponse = await directSendOperation(updatedArgs, spec);
602
608
  return {
603
609
  flatResponse,
@@ -614,8 +620,8 @@ export class ClustersImpl {
614
620
  spec: executeScriptActionsOperationSpec,
615
621
  });
616
622
  const poller = await createHttpPoller(lro, {
617
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
618
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
623
+ restoreFrom: options?.resumeFrom,
624
+ intervalInMs: options?.updateIntervalInMs,
619
625
  resourceLocationConfig: "location",
620
626
  });
621
627
  await poller.poll();