@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 BareMetalMachines operations. */
17
16
  export class BareMetalMachinesImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class BareMetalMachines class.
20
20
  * @param client Reference to the service client
@@ -36,52 +36,35 @@ export class BareMetalMachinesImpl {
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 bare metal machines in the provided resource group.
@@ -98,52 +81,35 @@ export class BareMetalMachinesImpl {
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 bare metal machines in the provided subscription.
@@ -183,14 +149,19 @@ export class BareMetalMachinesImpl {
183
149
  return this.client.sendOperationRequest(args, spec);
184
150
  };
185
151
  const sendOperationFn = async (args, spec) => {
186
- var _a;
187
152
  let currentRawResponse = undefined;
188
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
153
+ const providedCallback = args.options?.onResponse;
189
154
  const callback = (rawResponse, flatResponse) => {
190
155
  currentRawResponse = rawResponse;
191
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
156
+ providedCallback?.(rawResponse, flatResponse);
157
+ };
158
+ const updatedArgs = {
159
+ ...args,
160
+ options: {
161
+ ...args.options,
162
+ onResponse: callback,
163
+ },
192
164
  };
193
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
194
165
  const flatResponse = await directSendOperation(updatedArgs, spec);
195
166
  return {
196
167
  flatResponse,
@@ -212,8 +183,8 @@ export class BareMetalMachinesImpl {
212
183
  spec: createOrUpdateOperationSpec,
213
184
  });
214
185
  const poller = await createHttpPoller(lro, {
215
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
216
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
186
+ restoreFrom: options?.resumeFrom,
187
+ intervalInMs: options?.updateIntervalInMs,
217
188
  resourceLocationConfig: "azure-async-operation",
218
189
  });
219
190
  await poller.poll();
@@ -245,14 +216,19 @@ export class BareMetalMachinesImpl {
245
216
  return this.client.sendOperationRequest(args, spec);
246
217
  };
247
218
  const sendOperationFn = async (args, spec) => {
248
- var _a;
249
219
  let currentRawResponse = undefined;
250
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
220
+ const providedCallback = args.options?.onResponse;
251
221
  const callback = (rawResponse, flatResponse) => {
252
222
  currentRawResponse = rawResponse;
253
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
223
+ providedCallback?.(rawResponse, flatResponse);
224
+ };
225
+ const updatedArgs = {
226
+ ...args,
227
+ options: {
228
+ ...args.options,
229
+ onResponse: callback,
230
+ },
254
231
  };
255
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
256
232
  const flatResponse = await directSendOperation(updatedArgs, spec);
257
233
  return {
258
234
  flatResponse,
@@ -269,8 +245,8 @@ export class BareMetalMachinesImpl {
269
245
  spec: deleteOperationSpec,
270
246
  });
271
247
  const poller = await createHttpPoller(lro, {
272
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
273
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
248
+ restoreFrom: options?.resumeFrom,
249
+ intervalInMs: options?.updateIntervalInMs,
274
250
  resourceLocationConfig: "location",
275
251
  });
276
252
  await poller.poll();
@@ -300,14 +276,19 @@ export class BareMetalMachinesImpl {
300
276
  return this.client.sendOperationRequest(args, spec);
301
277
  };
302
278
  const sendOperationFn = async (args, spec) => {
303
- var _a;
304
279
  let currentRawResponse = undefined;
305
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
280
+ const providedCallback = args.options?.onResponse;
306
281
  const callback = (rawResponse, flatResponse) => {
307
282
  currentRawResponse = rawResponse;
308
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
283
+ providedCallback?.(rawResponse, flatResponse);
284
+ };
285
+ const updatedArgs = {
286
+ ...args,
287
+ options: {
288
+ ...args.options,
289
+ onResponse: callback,
290
+ },
309
291
  };
310
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
311
292
  const flatResponse = await directSendOperation(updatedArgs, spec);
312
293
  return {
313
294
  flatResponse,
@@ -324,8 +305,8 @@ export class BareMetalMachinesImpl {
324
305
  spec: updateOperationSpec,
325
306
  });
326
307
  const poller = await createHttpPoller(lro, {
327
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
328
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
308
+ restoreFrom: options?.resumeFrom,
309
+ intervalInMs: options?.updateIntervalInMs,
329
310
  resourceLocationConfig: "azure-async-operation",
330
311
  });
331
312
  await poller.poll();
@@ -353,14 +334,19 @@ export class BareMetalMachinesImpl {
353
334
  return this.client.sendOperationRequest(args, spec);
354
335
  };
355
336
  const sendOperationFn = async (args, spec) => {
356
- var _a;
357
337
  let currentRawResponse = undefined;
358
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
338
+ const providedCallback = args.options?.onResponse;
359
339
  const callback = (rawResponse, flatResponse) => {
360
340
  currentRawResponse = rawResponse;
361
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
341
+ providedCallback?.(rawResponse, flatResponse);
342
+ };
343
+ const updatedArgs = {
344
+ ...args,
345
+ options: {
346
+ ...args.options,
347
+ onResponse: callback,
348
+ },
362
349
  };
363
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
364
350
  const flatResponse = await directSendOperation(updatedArgs, spec);
365
351
  return {
366
352
  flatResponse,
@@ -377,8 +363,8 @@ export class BareMetalMachinesImpl {
377
363
  spec: cordonOperationSpec,
378
364
  });
379
365
  const poller = await createHttpPoller(lro, {
380
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
381
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
366
+ restoreFrom: options?.resumeFrom,
367
+ intervalInMs: options?.updateIntervalInMs,
382
368
  resourceLocationConfig: "location",
383
369
  });
384
370
  await poller.poll();
@@ -405,14 +391,19 @@ export class BareMetalMachinesImpl {
405
391
  return this.client.sendOperationRequest(args, spec);
406
392
  };
407
393
  const sendOperationFn = async (args, spec) => {
408
- var _a;
409
394
  let currentRawResponse = undefined;
410
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
395
+ const providedCallback = args.options?.onResponse;
411
396
  const callback = (rawResponse, flatResponse) => {
412
397
  currentRawResponse = rawResponse;
413
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
398
+ providedCallback?.(rawResponse, flatResponse);
399
+ };
400
+ const updatedArgs = {
401
+ ...args,
402
+ options: {
403
+ ...args.options,
404
+ onResponse: callback,
405
+ },
414
406
  };
415
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
416
407
  const flatResponse = await directSendOperation(updatedArgs, spec);
417
408
  return {
418
409
  flatResponse,
@@ -429,8 +420,8 @@ export class BareMetalMachinesImpl {
429
420
  spec: powerOffOperationSpec,
430
421
  });
431
422
  const poller = await createHttpPoller(lro, {
432
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
433
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
423
+ restoreFrom: options?.resumeFrom,
424
+ intervalInMs: options?.updateIntervalInMs,
434
425
  resourceLocationConfig: "location",
435
426
  });
436
427
  await poller.poll();
@@ -457,14 +448,19 @@ export class BareMetalMachinesImpl {
457
448
  return this.client.sendOperationRequest(args, spec);
458
449
  };
459
450
  const sendOperationFn = async (args, spec) => {
460
- var _a;
461
451
  let currentRawResponse = undefined;
462
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
452
+ const providedCallback = args.options?.onResponse;
463
453
  const callback = (rawResponse, flatResponse) => {
464
454
  currentRawResponse = rawResponse;
465
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
455
+ providedCallback?.(rawResponse, flatResponse);
456
+ };
457
+ const updatedArgs = {
458
+ ...args,
459
+ options: {
460
+ ...args.options,
461
+ onResponse: callback,
462
+ },
466
463
  };
467
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
468
464
  const flatResponse = await directSendOperation(updatedArgs, spec);
469
465
  return {
470
466
  flatResponse,
@@ -481,8 +477,8 @@ export class BareMetalMachinesImpl {
481
477
  spec: reimageOperationSpec,
482
478
  });
483
479
  const poller = await createHttpPoller(lro, {
484
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
485
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
480
+ restoreFrom: options?.resumeFrom,
481
+ intervalInMs: options?.updateIntervalInMs,
486
482
  resourceLocationConfig: "location",
487
483
  });
488
484
  await poller.poll();
@@ -509,14 +505,19 @@ export class BareMetalMachinesImpl {
509
505
  return this.client.sendOperationRequest(args, spec);
510
506
  };
511
507
  const sendOperationFn = async (args, spec) => {
512
- var _a;
513
508
  let currentRawResponse = undefined;
514
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
509
+ const providedCallback = args.options?.onResponse;
515
510
  const callback = (rawResponse, flatResponse) => {
516
511
  currentRawResponse = rawResponse;
517
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
512
+ providedCallback?.(rawResponse, flatResponse);
513
+ };
514
+ const updatedArgs = {
515
+ ...args,
516
+ options: {
517
+ ...args.options,
518
+ onResponse: callback,
519
+ },
518
520
  };
519
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
520
521
  const flatResponse = await directSendOperation(updatedArgs, spec);
521
522
  return {
522
523
  flatResponse,
@@ -533,8 +534,8 @@ export class BareMetalMachinesImpl {
533
534
  spec: replaceOperationSpec,
534
535
  });
535
536
  const poller = await createHttpPoller(lro, {
536
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
537
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
537
+ restoreFrom: options?.resumeFrom,
538
+ intervalInMs: options?.updateIntervalInMs,
538
539
  resourceLocationConfig: "location",
539
540
  });
540
541
  await poller.poll();
@@ -561,14 +562,19 @@ export class BareMetalMachinesImpl {
561
562
  return this.client.sendOperationRequest(args, spec);
562
563
  };
563
564
  const sendOperationFn = async (args, spec) => {
564
- var _a;
565
565
  let currentRawResponse = undefined;
566
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
566
+ const providedCallback = args.options?.onResponse;
567
567
  const callback = (rawResponse, flatResponse) => {
568
568
  currentRawResponse = rawResponse;
569
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
569
+ providedCallback?.(rawResponse, flatResponse);
570
+ };
571
+ const updatedArgs = {
572
+ ...args,
573
+ options: {
574
+ ...args.options,
575
+ onResponse: callback,
576
+ },
570
577
  };
571
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
572
578
  const flatResponse = await directSendOperation(updatedArgs, spec);
573
579
  return {
574
580
  flatResponse,
@@ -585,8 +591,8 @@ export class BareMetalMachinesImpl {
585
591
  spec: restartOperationSpec,
586
592
  });
587
593
  const poller = await createHttpPoller(lro, {
588
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
589
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
594
+ restoreFrom: options?.resumeFrom,
595
+ intervalInMs: options?.updateIntervalInMs,
590
596
  resourceLocationConfig: "location",
591
597
  });
592
598
  await poller.poll();
@@ -616,14 +622,19 @@ export class BareMetalMachinesImpl {
616
622
  return this.client.sendOperationRequest(args, spec);
617
623
  };
618
624
  const sendOperationFn = async (args, spec) => {
619
- var _a;
620
625
  let currentRawResponse = undefined;
621
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
626
+ const providedCallback = args.options?.onResponse;
622
627
  const callback = (rawResponse, flatResponse) => {
623
628
  currentRawResponse = rawResponse;
624
- 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
+ },
625
637
  };
626
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
627
638
  const flatResponse = await directSendOperation(updatedArgs, spec);
628
639
  return {
629
640
  flatResponse,
@@ -645,8 +656,8 @@ export class BareMetalMachinesImpl {
645
656
  spec: runCommandOperationSpec,
646
657
  });
647
658
  const poller = await createHttpPoller(lro, {
648
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
649
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
659
+ restoreFrom: options?.resumeFrom,
660
+ intervalInMs: options?.updateIntervalInMs,
650
661
  resourceLocationConfig: "location",
651
662
  });
652
663
  await poller.poll();
@@ -679,14 +690,19 @@ export class BareMetalMachinesImpl {
679
690
  return this.client.sendOperationRequest(args, spec);
680
691
  };
681
692
  const sendOperationFn = async (args, spec) => {
682
- var _a;
683
693
  let currentRawResponse = undefined;
684
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
694
+ const providedCallback = args.options?.onResponse;
685
695
  const callback = (rawResponse, flatResponse) => {
686
696
  currentRawResponse = rawResponse;
687
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
697
+ providedCallback?.(rawResponse, flatResponse);
698
+ };
699
+ const updatedArgs = {
700
+ ...args,
701
+ options: {
702
+ ...args.options,
703
+ onResponse: callback,
704
+ },
688
705
  };
689
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
690
706
  const flatResponse = await directSendOperation(updatedArgs, spec);
691
707
  return {
692
708
  flatResponse,
@@ -708,8 +724,8 @@ export class BareMetalMachinesImpl {
708
724
  spec: runDataExtractsOperationSpec,
709
725
  });
710
726
  const poller = await createHttpPoller(lro, {
711
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
712
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
727
+ restoreFrom: options?.resumeFrom,
728
+ intervalInMs: options?.updateIntervalInMs,
713
729
  resourceLocationConfig: "location",
714
730
  });
715
731
  await poller.poll();
@@ -742,14 +758,19 @@ export class BareMetalMachinesImpl {
742
758
  return this.client.sendOperationRequest(args, spec);
743
759
  };
744
760
  const sendOperationFn = async (args, spec) => {
745
- var _a;
746
761
  let currentRawResponse = undefined;
747
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
762
+ const providedCallback = args.options?.onResponse;
748
763
  const callback = (rawResponse, flatResponse) => {
749
764
  currentRawResponse = rawResponse;
750
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
765
+ providedCallback?.(rawResponse, flatResponse);
766
+ };
767
+ const updatedArgs = {
768
+ ...args,
769
+ options: {
770
+ ...args.options,
771
+ onResponse: callback,
772
+ },
751
773
  };
752
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
753
774
  const flatResponse = await directSendOperation(updatedArgs, spec);
754
775
  return {
755
776
  flatResponse,
@@ -771,8 +792,8 @@ export class BareMetalMachinesImpl {
771
792
  spec: runReadCommandsOperationSpec,
772
793
  });
773
794
  const poller = await createHttpPoller(lro, {
774
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
775
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
795
+ restoreFrom: options?.resumeFrom,
796
+ intervalInMs: options?.updateIntervalInMs,
776
797
  resourceLocationConfig: "location",
777
798
  });
778
799
  await poller.poll();
@@ -802,14 +823,19 @@ export class BareMetalMachinesImpl {
802
823
  return this.client.sendOperationRequest(args, spec);
803
824
  };
804
825
  const sendOperationFn = async (args, spec) => {
805
- var _a;
806
826
  let currentRawResponse = undefined;
807
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
827
+ const providedCallback = args.options?.onResponse;
808
828
  const callback = (rawResponse, flatResponse) => {
809
829
  currentRawResponse = rawResponse;
810
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
830
+ providedCallback?.(rawResponse, flatResponse);
831
+ };
832
+ const updatedArgs = {
833
+ ...args,
834
+ options: {
835
+ ...args.options,
836
+ onResponse: callback,
837
+ },
811
838
  };
812
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
813
839
  const flatResponse = await directSendOperation(updatedArgs, spec);
814
840
  return {
815
841
  flatResponse,
@@ -826,8 +852,8 @@ export class BareMetalMachinesImpl {
826
852
  spec: startOperationSpec,
827
853
  });
828
854
  const poller = await createHttpPoller(lro, {
829
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
830
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
855
+ restoreFrom: options?.resumeFrom,
856
+ intervalInMs: options?.updateIntervalInMs,
831
857
  resourceLocationConfig: "location",
832
858
  });
833
859
  await poller.poll();
@@ -854,14 +880,19 @@ export class BareMetalMachinesImpl {
854
880
  return this.client.sendOperationRequest(args, spec);
855
881
  };
856
882
  const sendOperationFn = async (args, spec) => {
857
- var _a;
858
883
  let currentRawResponse = undefined;
859
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
884
+ const providedCallback = args.options?.onResponse;
860
885
  const callback = (rawResponse, flatResponse) => {
861
886
  currentRawResponse = rawResponse;
862
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
887
+ providedCallback?.(rawResponse, flatResponse);
888
+ };
889
+ const updatedArgs = {
890
+ ...args,
891
+ options: {
892
+ ...args.options,
893
+ onResponse: callback,
894
+ },
863
895
  };
864
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
865
896
  const flatResponse = await directSendOperation(updatedArgs, spec);
866
897
  return {
867
898
  flatResponse,
@@ -878,8 +909,8 @@ export class BareMetalMachinesImpl {
878
909
  spec: uncordonOperationSpec,
879
910
  });
880
911
  const poller = await createHttpPoller(lro, {
881
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
882
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
912
+ restoreFrom: options?.resumeFrom,
913
+ intervalInMs: options?.updateIntervalInMs,
883
914
  resourceLocationConfig: "location",
884
915
  });
885
916
  await poller.poll();