@azure/arm-networkcloud 1.2.0-alpha.20250718.1 → 1.2.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 (195) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +648 -314
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/networkCloud.js +33 -5
  6. package/dist/browser/networkCloud.js.map +1 -1
  7. package/dist/browser/operations/agentPools.js +56 -58
  8. package/dist/browser/operations/agentPools.js.map +1 -1
  9. package/dist/browser/operations/bareMetalMachineKeySets.js +56 -58
  10. package/dist/browser/operations/bareMetalMachineKeySets.js.map +1 -1
  11. package/dist/browser/operations/bareMetalMachines.js +188 -157
  12. package/dist/browser/operations/bareMetalMachines.js.map +1 -1
  13. package/dist/browser/operations/bmcKeySets.js +56 -58
  14. package/dist/browser/operations/bmcKeySets.js.map +1 -1
  15. package/dist/browser/operations/cloudServicesNetworks.js +78 -97
  16. package/dist/browser/operations/cloudServicesNetworks.js.map +1 -1
  17. package/dist/browser/operations/clusterManagers.js +67 -91
  18. package/dist/browser/operations/clusterManagers.js.map +1 -1
  19. package/dist/browser/operations/clusters.js +122 -121
  20. package/dist/browser/operations/clusters.js.map +1 -1
  21. package/dist/browser/operations/consoles.js +56 -58
  22. package/dist/browser/operations/consoles.js.map +1 -1
  23. package/dist/browser/operations/kubernetesClusterFeatures.js +56 -58
  24. package/dist/browser/operations/kubernetesClusterFeatures.js.map +1 -1
  25. package/dist/browser/operations/kubernetesClusters.js +89 -103
  26. package/dist/browser/operations/kubernetesClusters.js.map +1 -1
  27. package/dist/browser/operations/l2Networks.js +67 -91
  28. package/dist/browser/operations/l2Networks.js.map +1 -1
  29. package/dist/browser/operations/l3Networks.js +67 -91
  30. package/dist/browser/operations/l3Networks.js.map +1 -1
  31. package/dist/browser/operations/metricsConfigurations.js +56 -58
  32. package/dist/browser/operations/metricsConfigurations.js.map +1 -1
  33. package/dist/browser/operations/operations.js +23 -40
  34. package/dist/browser/operations/operations.js.map +1 -1
  35. package/dist/browser/operations/rackSkus.js +23 -40
  36. package/dist/browser/operations/rackSkus.js.map +1 -1
  37. package/dist/browser/operations/racks.js +78 -97
  38. package/dist/browser/operations/racks.js.map +1 -1
  39. package/dist/browser/operations/storageAppliances.js +100 -109
  40. package/dist/browser/operations/storageAppliances.js.map +1 -1
  41. package/dist/browser/operations/trunkedNetworks.js +67 -91
  42. package/dist/browser/operations/trunkedNetworks.js.map +1 -1
  43. package/dist/browser/operations/virtualMachines.js +122 -121
  44. package/dist/browser/operations/virtualMachines.js.map +1 -1
  45. package/dist/browser/operations/volumes.js +67 -91
  46. package/dist/browser/operations/volumes.js.map +1 -1
  47. package/dist/browser/pagingHelper.js +2 -4
  48. package/dist/browser/pagingHelper.js.map +1 -1
  49. package/dist/commonjs/lroImpl.js +7 -3
  50. package/dist/commonjs/lroImpl.js.map +1 -1
  51. package/dist/commonjs/models/mappers.js +648 -314
  52. package/dist/commonjs/models/mappers.js.map +1 -1
  53. package/dist/commonjs/networkCloud.js +33 -5
  54. package/dist/commonjs/networkCloud.js.map +1 -1
  55. package/dist/commonjs/operations/agentPools.js +56 -57
  56. package/dist/commonjs/operations/agentPools.js.map +1 -1
  57. package/dist/commonjs/operations/bareMetalMachineKeySets.js +56 -57
  58. package/dist/commonjs/operations/bareMetalMachineKeySets.js.map +1 -1
  59. package/dist/commonjs/operations/bareMetalMachines.js +188 -156
  60. package/dist/commonjs/operations/bareMetalMachines.js.map +1 -1
  61. package/dist/commonjs/operations/bmcKeySets.js +56 -57
  62. package/dist/commonjs/operations/bmcKeySets.js.map +1 -1
  63. package/dist/commonjs/operations/cloudServicesNetworks.js +78 -96
  64. package/dist/commonjs/operations/cloudServicesNetworks.js.map +1 -1
  65. package/dist/commonjs/operations/clusterManagers.js +67 -90
  66. package/dist/commonjs/operations/clusterManagers.js.map +1 -1
  67. package/dist/commonjs/operations/clusters.js +122 -120
  68. package/dist/commonjs/operations/clusters.js.map +1 -1
  69. package/dist/commonjs/operations/consoles.js +56 -57
  70. package/dist/commonjs/operations/consoles.js.map +1 -1
  71. package/dist/commonjs/operations/kubernetesClusterFeatures.js +56 -57
  72. package/dist/commonjs/operations/kubernetesClusterFeatures.js.map +1 -1
  73. package/dist/commonjs/operations/kubernetesClusters.js +89 -102
  74. package/dist/commonjs/operations/kubernetesClusters.js.map +1 -1
  75. package/dist/commonjs/operations/l2Networks.js +67 -90
  76. package/dist/commonjs/operations/l2Networks.js.map +1 -1
  77. package/dist/commonjs/operations/l3Networks.js +67 -90
  78. package/dist/commonjs/operations/l3Networks.js.map +1 -1
  79. package/dist/commonjs/operations/metricsConfigurations.js +56 -57
  80. package/dist/commonjs/operations/metricsConfigurations.js.map +1 -1
  81. package/dist/commonjs/operations/operations.js +23 -39
  82. package/dist/commonjs/operations/operations.js.map +1 -1
  83. package/dist/commonjs/operations/rackSkus.js +23 -39
  84. package/dist/commonjs/operations/rackSkus.js.map +1 -1
  85. package/dist/commonjs/operations/racks.js +78 -96
  86. package/dist/commonjs/operations/racks.js.map +1 -1
  87. package/dist/commonjs/operations/storageAppliances.js +100 -108
  88. package/dist/commonjs/operations/storageAppliances.js.map +1 -1
  89. package/dist/commonjs/operations/trunkedNetworks.js +67 -90
  90. package/dist/commonjs/operations/trunkedNetworks.js.map +1 -1
  91. package/dist/commonjs/operations/virtualMachines.js +122 -120
  92. package/dist/commonjs/operations/virtualMachines.js.map +1 -1
  93. package/dist/commonjs/operations/volumes.js +67 -90
  94. package/dist/commonjs/operations/volumes.js.map +1 -1
  95. package/dist/commonjs/pagingHelper.js +2 -4
  96. package/dist/commonjs/pagingHelper.js.map +1 -1
  97. package/dist/commonjs/tsdoc-metadata.json +11 -11
  98. package/dist/esm/lroImpl.js +7 -3
  99. package/dist/esm/lroImpl.js.map +1 -1
  100. package/dist/esm/models/mappers.js +648 -314
  101. package/dist/esm/models/mappers.js.map +1 -1
  102. package/dist/esm/networkCloud.js +33 -5
  103. package/dist/esm/networkCloud.js.map +1 -1
  104. package/dist/esm/operations/agentPools.js +56 -58
  105. package/dist/esm/operations/agentPools.js.map +1 -1
  106. package/dist/esm/operations/bareMetalMachineKeySets.js +56 -58
  107. package/dist/esm/operations/bareMetalMachineKeySets.js.map +1 -1
  108. package/dist/esm/operations/bareMetalMachines.js +188 -157
  109. package/dist/esm/operations/bareMetalMachines.js.map +1 -1
  110. package/dist/esm/operations/bmcKeySets.js +56 -58
  111. package/dist/esm/operations/bmcKeySets.js.map +1 -1
  112. package/dist/esm/operations/cloudServicesNetworks.js +78 -97
  113. package/dist/esm/operations/cloudServicesNetworks.js.map +1 -1
  114. package/dist/esm/operations/clusterManagers.js +67 -91
  115. package/dist/esm/operations/clusterManagers.js.map +1 -1
  116. package/dist/esm/operations/clusters.js +122 -121
  117. package/dist/esm/operations/clusters.js.map +1 -1
  118. package/dist/esm/operations/consoles.js +56 -58
  119. package/dist/esm/operations/consoles.js.map +1 -1
  120. package/dist/esm/operations/kubernetesClusterFeatures.js +56 -58
  121. package/dist/esm/operations/kubernetesClusterFeatures.js.map +1 -1
  122. package/dist/esm/operations/kubernetesClusters.js +89 -103
  123. package/dist/esm/operations/kubernetesClusters.js.map +1 -1
  124. package/dist/esm/operations/l2Networks.js +67 -91
  125. package/dist/esm/operations/l2Networks.js.map +1 -1
  126. package/dist/esm/operations/l3Networks.js +67 -91
  127. package/dist/esm/operations/l3Networks.js.map +1 -1
  128. package/dist/esm/operations/metricsConfigurations.js +56 -58
  129. package/dist/esm/operations/metricsConfigurations.js.map +1 -1
  130. package/dist/esm/operations/operations.js +23 -40
  131. package/dist/esm/operations/operations.js.map +1 -1
  132. package/dist/esm/operations/rackSkus.js +23 -40
  133. package/dist/esm/operations/rackSkus.js.map +1 -1
  134. package/dist/esm/operations/racks.js +78 -97
  135. package/dist/esm/operations/racks.js.map +1 -1
  136. package/dist/esm/operations/storageAppliances.js +100 -109
  137. package/dist/esm/operations/storageAppliances.js.map +1 -1
  138. package/dist/esm/operations/trunkedNetworks.js +67 -91
  139. package/dist/esm/operations/trunkedNetworks.js.map +1 -1
  140. package/dist/esm/operations/virtualMachines.js +122 -121
  141. package/dist/esm/operations/virtualMachines.js.map +1 -1
  142. package/dist/esm/operations/volumes.js +67 -91
  143. package/dist/esm/operations/volumes.js.map +1 -1
  144. package/dist/esm/pagingHelper.js +2 -4
  145. package/dist/esm/pagingHelper.js.map +1 -1
  146. package/dist/react-native/lroImpl.js +7 -3
  147. package/dist/react-native/lroImpl.js.map +1 -1
  148. package/dist/react-native/models/mappers.js +648 -314
  149. package/dist/react-native/models/mappers.js.map +1 -1
  150. package/dist/react-native/networkCloud.js +33 -5
  151. package/dist/react-native/networkCloud.js.map +1 -1
  152. package/dist/react-native/operations/agentPools.js +56 -58
  153. package/dist/react-native/operations/agentPools.js.map +1 -1
  154. package/dist/react-native/operations/bareMetalMachineKeySets.js +56 -58
  155. package/dist/react-native/operations/bareMetalMachineKeySets.js.map +1 -1
  156. package/dist/react-native/operations/bareMetalMachines.js +188 -157
  157. package/dist/react-native/operations/bareMetalMachines.js.map +1 -1
  158. package/dist/react-native/operations/bmcKeySets.js +56 -58
  159. package/dist/react-native/operations/bmcKeySets.js.map +1 -1
  160. package/dist/react-native/operations/cloudServicesNetworks.js +78 -97
  161. package/dist/react-native/operations/cloudServicesNetworks.js.map +1 -1
  162. package/dist/react-native/operations/clusterManagers.js +67 -91
  163. package/dist/react-native/operations/clusterManagers.js.map +1 -1
  164. package/dist/react-native/operations/clusters.js +122 -121
  165. package/dist/react-native/operations/clusters.js.map +1 -1
  166. package/dist/react-native/operations/consoles.js +56 -58
  167. package/dist/react-native/operations/consoles.js.map +1 -1
  168. package/dist/react-native/operations/kubernetesClusterFeatures.js +56 -58
  169. package/dist/react-native/operations/kubernetesClusterFeatures.js.map +1 -1
  170. package/dist/react-native/operations/kubernetesClusters.js +89 -103
  171. package/dist/react-native/operations/kubernetesClusters.js.map +1 -1
  172. package/dist/react-native/operations/l2Networks.js +67 -91
  173. package/dist/react-native/operations/l2Networks.js.map +1 -1
  174. package/dist/react-native/operations/l3Networks.js +67 -91
  175. package/dist/react-native/operations/l3Networks.js.map +1 -1
  176. package/dist/react-native/operations/metricsConfigurations.js +56 -58
  177. package/dist/react-native/operations/metricsConfigurations.js.map +1 -1
  178. package/dist/react-native/operations/operations.js +23 -40
  179. package/dist/react-native/operations/operations.js.map +1 -1
  180. package/dist/react-native/operations/rackSkus.js +23 -40
  181. package/dist/react-native/operations/rackSkus.js.map +1 -1
  182. package/dist/react-native/operations/racks.js +78 -97
  183. package/dist/react-native/operations/racks.js.map +1 -1
  184. package/dist/react-native/operations/storageAppliances.js +100 -109
  185. package/dist/react-native/operations/storageAppliances.js.map +1 -1
  186. package/dist/react-native/operations/trunkedNetworks.js +67 -91
  187. package/dist/react-native/operations/trunkedNetworks.js.map +1 -1
  188. package/dist/react-native/operations/virtualMachines.js +122 -121
  189. package/dist/react-native/operations/virtualMachines.js.map +1 -1
  190. package/dist/react-native/operations/volumes.js +67 -91
  191. package/dist/react-native/operations/volumes.js.map +1 -1
  192. package/dist/react-native/pagingHelper.js +2 -4
  193. package/dist/react-native/pagingHelper.js.map +1 -1
  194. package/package.json +2 -2
  195. package/review/arm-networkcloud-node.api.md +4516 -4516
@@ -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
@@ -36,52 +36,35 @@ export class ClustersImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listBySubscriptionPagingPage(options, settings);
43
43
  },
44
44
  };
45
45
  }
46
- listBySubscriptionPagingPage(options, settings) {
47
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
48
- let result;
49
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
- if (!continuationToken) {
51
- result = yield __await(this._listBySubscription(options));
52
- let page = result.value || [];
53
- continuationToken = result.nextLink;
54
- setContinuationToken(page, continuationToken);
55
- yield yield __await(page);
56
- }
57
- while (continuationToken) {
58
- result = yield __await(this._listBySubscriptionNext(continuationToken, options));
59
- continuationToken = result.nextLink;
60
- let page = result.value || [];
61
- setContinuationToken(page, continuationToken);
62
- yield yield __await(page);
63
- }
64
- });
46
+ async *listBySubscriptionPagingPage(options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._listBySubscription(options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listBySubscriptionNext(continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
65
63
  }
66
- listBySubscriptionPagingAll(options) {
67
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
68
- var _a, e_1, _b, _c;
69
- try {
70
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
- _c = _f.value;
72
- _d = false;
73
- const page = _c;
74
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
- }
76
- }
77
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
- finally {
79
- try {
80
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
- }
82
- finally { if (e_1) throw e_1.error; }
83
- }
84
- });
64
+ async *listBySubscriptionPagingAll(options) {
65
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
66
+ yield* page;
67
+ }
85
68
  }
86
69
  /**
87
70
  * Get a list of clusters in the provided resource group.
@@ -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.listByResourceGroupPagingPage(resourceGroupName, options, settings);
105
88
  },
106
89
  };
107
90
  }
108
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
109
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
110
- let result;
111
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
112
- if (!continuationToken) {
113
- result = yield __await(this._listByResourceGroup(resourceGroupName, 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._listByResourceGroupNext(resourceGroupName, continuationToken, options));
121
- continuationToken = result.nextLink;
122
- let page = result.value || [];
123
- setContinuationToken(page, continuationToken);
124
- yield yield __await(page);
125
- }
126
- });
91
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
92
+ let result;
93
+ let continuationToken = settings?.continuationToken;
94
+ if (!continuationToken) {
95
+ result = await this._listByResourceGroup(resourceGroupName, 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._listByResourceGroupNext(resourceGroupName, continuationToken, options);
103
+ continuationToken = result.nextLink;
104
+ let page = result.value || [];
105
+ setContinuationToken(page, continuationToken);
106
+ yield page;
107
+ }
127
108
  }
128
- listByResourceGroupPagingAll(resourceGroupName, options) {
129
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
130
- var _a, e_2, _b, _c;
131
- try {
132
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, 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 *listByResourceGroupPagingAll(resourceGroupName, options) {
110
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
111
+ yield* page;
112
+ }
147
113
  }
148
114
  /**
149
115
  * Get a list of clusters in the provided subscription.
@@ -181,14 +147,19 @@ export class ClustersImpl {
181
147
  return this.client.sendOperationRequest(args, spec);
182
148
  };
183
149
  const sendOperationFn = async (args, spec) => {
184
- var _a;
185
150
  let currentRawResponse = undefined;
186
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
151
+ const providedCallback = args.options?.onResponse;
187
152
  const callback = (rawResponse, flatResponse) => {
188
153
  currentRawResponse = rawResponse;
189
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
154
+ providedCallback?.(rawResponse, flatResponse);
155
+ };
156
+ const updatedArgs = {
157
+ ...args,
158
+ options: {
159
+ ...args.options,
160
+ onResponse: callback,
161
+ },
190
162
  };
191
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
192
163
  const flatResponse = await directSendOperation(updatedArgs, spec);
193
164
  return {
194
165
  flatResponse,
@@ -205,8 +176,8 @@ export class ClustersImpl {
205
176
  spec: createOrUpdateOperationSpec,
206
177
  });
207
178
  const poller = await createHttpPoller(lro, {
208
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
209
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
179
+ restoreFrom: options?.resumeFrom,
180
+ intervalInMs: options?.updateIntervalInMs,
210
181
  resourceLocationConfig: "azure-async-operation",
211
182
  });
212
183
  await poller.poll();
@@ -234,14 +205,19 @@ export class ClustersImpl {
234
205
  return this.client.sendOperationRequest(args, spec);
235
206
  };
236
207
  const sendOperationFn = async (args, spec) => {
237
- var _a;
238
208
  let currentRawResponse = undefined;
239
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
209
+ const providedCallback = args.options?.onResponse;
240
210
  const callback = (rawResponse, flatResponse) => {
241
211
  currentRawResponse = rawResponse;
242
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
212
+ providedCallback?.(rawResponse, flatResponse);
213
+ };
214
+ const updatedArgs = {
215
+ ...args,
216
+ options: {
217
+ ...args.options,
218
+ onResponse: callback,
219
+ },
243
220
  };
244
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
245
221
  const flatResponse = await directSendOperation(updatedArgs, spec);
246
222
  return {
247
223
  flatResponse,
@@ -258,8 +234,8 @@ export class ClustersImpl {
258
234
  spec: deleteOperationSpec,
259
235
  });
260
236
  const poller = await createHttpPoller(lro, {
261
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
262
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
237
+ restoreFrom: options?.resumeFrom,
238
+ intervalInMs: options?.updateIntervalInMs,
263
239
  resourceLocationConfig: "location",
264
240
  });
265
241
  await poller.poll();
@@ -287,14 +263,19 @@ export class ClustersImpl {
287
263
  return this.client.sendOperationRequest(args, spec);
288
264
  };
289
265
  const sendOperationFn = async (args, spec) => {
290
- var _a;
291
266
  let currentRawResponse = undefined;
292
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
267
+ const providedCallback = args.options?.onResponse;
293
268
  const callback = (rawResponse, flatResponse) => {
294
269
  currentRawResponse = rawResponse;
295
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
270
+ providedCallback?.(rawResponse, flatResponse);
271
+ };
272
+ const updatedArgs = {
273
+ ...args,
274
+ options: {
275
+ ...args.options,
276
+ onResponse: callback,
277
+ },
296
278
  };
297
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
298
279
  const flatResponse = await directSendOperation(updatedArgs, spec);
299
280
  return {
300
281
  flatResponse,
@@ -311,8 +292,8 @@ export class ClustersImpl {
311
292
  spec: updateOperationSpec,
312
293
  });
313
294
  const poller = await createHttpPoller(lro, {
314
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
315
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
295
+ restoreFrom: options?.resumeFrom,
296
+ intervalInMs: options?.updateIntervalInMs,
316
297
  resourceLocationConfig: "azure-async-operation",
317
298
  });
318
299
  await poller.poll();
@@ -342,14 +323,19 @@ export class ClustersImpl {
342
323
  return this.client.sendOperationRequest(args, spec);
343
324
  };
344
325
  const sendOperationFn = async (args, spec) => {
345
- var _a;
346
326
  let currentRawResponse = undefined;
347
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
327
+ const providedCallback = args.options?.onResponse;
348
328
  const callback = (rawResponse, flatResponse) => {
349
329
  currentRawResponse = rawResponse;
350
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
330
+ providedCallback?.(rawResponse, flatResponse);
331
+ };
332
+ const updatedArgs = {
333
+ ...args,
334
+ options: {
335
+ ...args.options,
336
+ onResponse: callback,
337
+ },
351
338
  };
352
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
353
339
  const flatResponse = await directSendOperation(updatedArgs, spec);
354
340
  return {
355
341
  flatResponse,
@@ -371,8 +357,8 @@ export class ClustersImpl {
371
357
  spec: continueUpdateVersionOperationSpec,
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();
@@ -401,14 +387,19 @@ export class ClustersImpl {
401
387
  return this.client.sendOperationRequest(args, spec);
402
388
  };
403
389
  const sendOperationFn = async (args, spec) => {
404
- var _a;
405
390
  let currentRawResponse = undefined;
406
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
391
+ const providedCallback = args.options?.onResponse;
407
392
  const callback = (rawResponse, flatResponse) => {
408
393
  currentRawResponse = rawResponse;
409
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
394
+ providedCallback?.(rawResponse, flatResponse);
395
+ };
396
+ const updatedArgs = {
397
+ ...args,
398
+ options: {
399
+ ...args.options,
400
+ onResponse: callback,
401
+ },
410
402
  };
411
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
412
403
  const flatResponse = await directSendOperation(updatedArgs, spec);
413
404
  return {
414
405
  flatResponse,
@@ -425,8 +416,8 @@ export class ClustersImpl {
425
416
  spec: deployOperationSpec,
426
417
  });
427
418
  const poller = await createHttpPoller(lro, {
428
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
429
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
419
+ restoreFrom: options?.resumeFrom,
420
+ intervalInMs: options?.updateIntervalInMs,
430
421
  resourceLocationConfig: "location",
431
422
  });
432
423
  await poller.poll();
@@ -454,14 +445,19 @@ export class ClustersImpl {
454
445
  return this.client.sendOperationRequest(args, spec);
455
446
  };
456
447
  const sendOperationFn = async (args, spec) => {
457
- var _a;
458
448
  let currentRawResponse = undefined;
459
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
449
+ const providedCallback = args.options?.onResponse;
460
450
  const callback = (rawResponse, flatResponse) => {
461
451
  currentRawResponse = rawResponse;
462
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
452
+ providedCallback?.(rawResponse, flatResponse);
453
+ };
454
+ const updatedArgs = {
455
+ ...args,
456
+ options: {
457
+ ...args.options,
458
+ onResponse: callback,
459
+ },
463
460
  };
464
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
465
461
  const flatResponse = await directSendOperation(updatedArgs, spec);
466
462
  return {
467
463
  flatResponse,
@@ -478,8 +474,8 @@ export class ClustersImpl {
478
474
  spec: scanRuntimeOperationSpec,
479
475
  });
480
476
  const poller = await createHttpPoller(lro, {
481
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
482
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
477
+ restoreFrom: options?.resumeFrom,
478
+ intervalInMs: options?.updateIntervalInMs,
483
479
  resourceLocationConfig: "location",
484
480
  });
485
481
  await poller.poll();
@@ -508,14 +504,19 @@ export class ClustersImpl {
508
504
  return this.client.sendOperationRequest(args, spec);
509
505
  };
510
506
  const sendOperationFn = async (args, spec) => {
511
- var _a;
512
507
  let currentRawResponse = undefined;
513
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
508
+ const providedCallback = args.options?.onResponse;
514
509
  const callback = (rawResponse, flatResponse) => {
515
510
  currentRawResponse = rawResponse;
516
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
511
+ providedCallback?.(rawResponse, flatResponse);
512
+ };
513
+ const updatedArgs = {
514
+ ...args,
515
+ options: {
516
+ ...args.options,
517
+ onResponse: callback,
518
+ },
517
519
  };
518
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
519
520
  const flatResponse = await directSendOperation(updatedArgs, spec);
520
521
  return {
521
522
  flatResponse,
@@ -537,8 +538,8 @@ export class ClustersImpl {
537
538
  spec: updateVersionOperationSpec,
538
539
  });
539
540
  const poller = await createHttpPoller(lro, {
540
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
541
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
541
+ restoreFrom: options?.resumeFrom,
542
+ intervalInMs: options?.updateIntervalInMs,
542
543
  resourceLocationConfig: "location",
543
544
  });
544
545
  await poller.poll();