@azure/arm-kusto 8.2.1-alpha.20250717.1 → 8.2.1-alpha.20250718.2

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 (163) hide show
  1. package/dist/browser/kustoManagementClient.js +29 -5
  2. package/dist/browser/kustoManagementClient.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 +443 -211
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/attachedDatabaseConfigurations.js +32 -39
  8. package/dist/browser/operations/attachedDatabaseConfigurations.js.map +1 -1
  9. package/dist/browser/operations/clusterPrincipalAssignments.js +32 -39
  10. package/dist/browser/operations/clusterPrincipalAssignments.js.map +1 -1
  11. package/dist/browser/operations/clusters.js +228 -321
  12. package/dist/browser/operations/clusters.js.map +1 -1
  13. package/dist/browser/operations/dataConnections.js +54 -51
  14. package/dist/browser/operations/dataConnections.js.map +1 -1
  15. package/dist/browser/operations/databaseOperations.js +1 -0
  16. package/dist/browser/operations/databaseOperations.js.map +1 -1
  17. package/dist/browser/operations/databasePrincipalAssignments.js +32 -39
  18. package/dist/browser/operations/databasePrincipalAssignments.js.map +1 -1
  19. package/dist/browser/operations/databases.js +65 -84
  20. package/dist/browser/operations/databases.js.map +1 -1
  21. package/dist/browser/operations/managedPrivateEndpoints.js +43 -45
  22. package/dist/browser/operations/managedPrivateEndpoints.js.map +1 -1
  23. package/dist/browser/operations/operations.js +23 -40
  24. package/dist/browser/operations/operations.js.map +1 -1
  25. package/dist/browser/operations/operationsResults.js +1 -0
  26. package/dist/browser/operations/operationsResults.js.map +1 -1
  27. package/dist/browser/operations/operationsResultsLocation.js +1 -0
  28. package/dist/browser/operations/operationsResultsLocation.js.map +1 -1
  29. package/dist/browser/operations/privateEndpointConnections.js +32 -39
  30. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  31. package/dist/browser/operations/privateLinkResources.js +10 -27
  32. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  33. package/dist/browser/operations/sandboxCustomImages.js +43 -45
  34. package/dist/browser/operations/sandboxCustomImages.js.map +1 -1
  35. package/dist/browser/operations/scripts.js +43 -45
  36. package/dist/browser/operations/scripts.js.map +1 -1
  37. package/dist/browser/operations/skus.js +10 -27
  38. package/dist/browser/operations/skus.js.map +1 -1
  39. package/dist/browser/pagingHelper.js +2 -4
  40. package/dist/browser/pagingHelper.js.map +1 -1
  41. package/dist/commonjs/kustoManagementClient.js +29 -5
  42. package/dist/commonjs/kustoManagementClient.js.map +1 -1
  43. package/dist/commonjs/lroImpl.js +7 -3
  44. package/dist/commonjs/lroImpl.js.map +1 -1
  45. package/dist/commonjs/models/mappers.js +443 -211
  46. package/dist/commonjs/models/mappers.js.map +1 -1
  47. package/dist/commonjs/operations/attachedDatabaseConfigurations.js +32 -38
  48. package/dist/commonjs/operations/attachedDatabaseConfigurations.js.map +1 -1
  49. package/dist/commonjs/operations/clusterPrincipalAssignments.js +32 -38
  50. package/dist/commonjs/operations/clusterPrincipalAssignments.js.map +1 -1
  51. package/dist/commonjs/operations/clusters.js +228 -320
  52. package/dist/commonjs/operations/clusters.js.map +1 -1
  53. package/dist/commonjs/operations/dataConnections.js +54 -50
  54. package/dist/commonjs/operations/dataConnections.js.map +1 -1
  55. package/dist/commonjs/operations/databaseOperations.js +1 -0
  56. package/dist/commonjs/operations/databaseOperations.js.map +1 -1
  57. package/dist/commonjs/operations/databasePrincipalAssignments.js +32 -38
  58. package/dist/commonjs/operations/databasePrincipalAssignments.js.map +1 -1
  59. package/dist/commonjs/operations/databases.js +65 -83
  60. package/dist/commonjs/operations/databases.js.map +1 -1
  61. package/dist/commonjs/operations/managedPrivateEndpoints.js +43 -44
  62. package/dist/commonjs/operations/managedPrivateEndpoints.js.map +1 -1
  63. package/dist/commonjs/operations/operations.js +23 -39
  64. package/dist/commonjs/operations/operations.js.map +1 -1
  65. package/dist/commonjs/operations/operationsResults.js +1 -0
  66. package/dist/commonjs/operations/operationsResults.js.map +1 -1
  67. package/dist/commonjs/operations/operationsResultsLocation.js +1 -0
  68. package/dist/commonjs/operations/operationsResultsLocation.js.map +1 -1
  69. package/dist/commonjs/operations/privateEndpointConnections.js +32 -38
  70. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  71. package/dist/commonjs/operations/privateLinkResources.js +10 -26
  72. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  73. package/dist/commonjs/operations/sandboxCustomImages.js +43 -44
  74. package/dist/commonjs/operations/sandboxCustomImages.js.map +1 -1
  75. package/dist/commonjs/operations/scripts.js +43 -44
  76. package/dist/commonjs/operations/scripts.js.map +1 -1
  77. package/dist/commonjs/operations/skus.js +10 -26
  78. package/dist/commonjs/operations/skus.js.map +1 -1
  79. package/dist/commonjs/pagingHelper.js +2 -4
  80. package/dist/commonjs/pagingHelper.js.map +1 -1
  81. package/dist/commonjs/tsdoc-metadata.json +11 -11
  82. package/dist/esm/kustoManagementClient.js +29 -5
  83. package/dist/esm/kustoManagementClient.js.map +1 -1
  84. package/dist/esm/lroImpl.js +7 -3
  85. package/dist/esm/lroImpl.js.map +1 -1
  86. package/dist/esm/models/mappers.js +443 -211
  87. package/dist/esm/models/mappers.js.map +1 -1
  88. package/dist/esm/operations/attachedDatabaseConfigurations.js +32 -39
  89. package/dist/esm/operations/attachedDatabaseConfigurations.js.map +1 -1
  90. package/dist/esm/operations/clusterPrincipalAssignments.js +32 -39
  91. package/dist/esm/operations/clusterPrincipalAssignments.js.map +1 -1
  92. package/dist/esm/operations/clusters.js +228 -321
  93. package/dist/esm/operations/clusters.js.map +1 -1
  94. package/dist/esm/operations/dataConnections.js +54 -51
  95. package/dist/esm/operations/dataConnections.js.map +1 -1
  96. package/dist/esm/operations/databaseOperations.js +1 -0
  97. package/dist/esm/operations/databaseOperations.js.map +1 -1
  98. package/dist/esm/operations/databasePrincipalAssignments.js +32 -39
  99. package/dist/esm/operations/databasePrincipalAssignments.js.map +1 -1
  100. package/dist/esm/operations/databases.js +65 -84
  101. package/dist/esm/operations/databases.js.map +1 -1
  102. package/dist/esm/operations/managedPrivateEndpoints.js +43 -45
  103. package/dist/esm/operations/managedPrivateEndpoints.js.map +1 -1
  104. package/dist/esm/operations/operations.js +23 -40
  105. package/dist/esm/operations/operations.js.map +1 -1
  106. package/dist/esm/operations/operationsResults.js +1 -0
  107. package/dist/esm/operations/operationsResults.js.map +1 -1
  108. package/dist/esm/operations/operationsResultsLocation.js +1 -0
  109. package/dist/esm/operations/operationsResultsLocation.js.map +1 -1
  110. package/dist/esm/operations/privateEndpointConnections.js +32 -39
  111. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  112. package/dist/esm/operations/privateLinkResources.js +10 -27
  113. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  114. package/dist/esm/operations/sandboxCustomImages.js +43 -45
  115. package/dist/esm/operations/sandboxCustomImages.js.map +1 -1
  116. package/dist/esm/operations/scripts.js +43 -45
  117. package/dist/esm/operations/scripts.js.map +1 -1
  118. package/dist/esm/operations/skus.js +10 -27
  119. package/dist/esm/operations/skus.js.map +1 -1
  120. package/dist/esm/pagingHelper.js +2 -4
  121. package/dist/esm/pagingHelper.js.map +1 -1
  122. package/dist/react-native/kustoManagementClient.js +29 -5
  123. package/dist/react-native/kustoManagementClient.js.map +1 -1
  124. package/dist/react-native/lroImpl.js +7 -3
  125. package/dist/react-native/lroImpl.js.map +1 -1
  126. package/dist/react-native/models/mappers.js +443 -211
  127. package/dist/react-native/models/mappers.js.map +1 -1
  128. package/dist/react-native/operations/attachedDatabaseConfigurations.js +32 -39
  129. package/dist/react-native/operations/attachedDatabaseConfigurations.js.map +1 -1
  130. package/dist/react-native/operations/clusterPrincipalAssignments.js +32 -39
  131. package/dist/react-native/operations/clusterPrincipalAssignments.js.map +1 -1
  132. package/dist/react-native/operations/clusters.js +228 -321
  133. package/dist/react-native/operations/clusters.js.map +1 -1
  134. package/dist/react-native/operations/dataConnections.js +54 -51
  135. package/dist/react-native/operations/dataConnections.js.map +1 -1
  136. package/dist/react-native/operations/databaseOperations.js +1 -0
  137. package/dist/react-native/operations/databaseOperations.js.map +1 -1
  138. package/dist/react-native/operations/databasePrincipalAssignments.js +32 -39
  139. package/dist/react-native/operations/databasePrincipalAssignments.js.map +1 -1
  140. package/dist/react-native/operations/databases.js +65 -84
  141. package/dist/react-native/operations/databases.js.map +1 -1
  142. package/dist/react-native/operations/managedPrivateEndpoints.js +43 -45
  143. package/dist/react-native/operations/managedPrivateEndpoints.js.map +1 -1
  144. package/dist/react-native/operations/operations.js +23 -40
  145. package/dist/react-native/operations/operations.js.map +1 -1
  146. package/dist/react-native/operations/operationsResults.js +1 -0
  147. package/dist/react-native/operations/operationsResults.js.map +1 -1
  148. package/dist/react-native/operations/operationsResultsLocation.js +1 -0
  149. package/dist/react-native/operations/operationsResultsLocation.js.map +1 -1
  150. package/dist/react-native/operations/privateEndpointConnections.js +32 -39
  151. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  152. package/dist/react-native/operations/privateLinkResources.js +10 -27
  153. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  154. package/dist/react-native/operations/sandboxCustomImages.js +43 -45
  155. package/dist/react-native/operations/sandboxCustomImages.js.map +1 -1
  156. package/dist/react-native/operations/scripts.js +43 -45
  157. package/dist/react-native/operations/scripts.js.map +1 -1
  158. package/dist/react-native/operations/skus.js +10 -27
  159. package/dist/react-native/operations/skus.js.map +1 -1
  160. package/dist/react-native/pagingHelper.js +2 -4
  161. package/dist/react-native/pagingHelper.js.map +1 -1
  162. package/package.json +2 -2
  163. package/review/arm-kusto-node.api.md +2342 -2342
@@ -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
@@ -38,39 +38,22 @@ export class ClustersImpl {
38
38
  return this;
39
39
  },
40
40
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
42
42
  throw new Error("maxPageSize is not supported by this operation.");
43
43
  }
44
44
  return this.listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options, settings);
45
45
  },
46
46
  };
47
47
  }
48
- listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options, _settings) {
49
- return __asyncGenerator(this, arguments, function* listFollowerDatabasesGetPagingPage_1() {
50
- let result;
51
- result = yield __await(this._listFollowerDatabasesGet(resourceGroupName, clusterName, options));
52
- yield yield __await(result.value || []);
53
- });
48
+ async *listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options, _settings) {
49
+ let result;
50
+ result = await this._listFollowerDatabasesGet(resourceGroupName, clusterName, options);
51
+ yield result.value || [];
54
52
  }
55
- listFollowerDatabasesGetPagingAll(resourceGroupName, clusterName, options) {
56
- return __asyncGenerator(this, arguments, function* listFollowerDatabasesGetPagingAll_1() {
57
- var _a, e_1, _b, _c;
58
- try {
59
- for (var _d = true, _e = __asyncValues(this.listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
60
- _c = _f.value;
61
- _d = false;
62
- const page = _c;
63
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
64
- }
65
- }
66
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
67
- finally {
68
- try {
69
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
70
- }
71
- finally { if (e_1) throw e_1.error; }
72
- }
73
- });
53
+ async *listFollowerDatabasesGetPagingAll(resourceGroupName, clusterName, options) {
54
+ for await (const page of this.listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options)) {
55
+ yield* page;
56
+ }
74
57
  }
75
58
  /**
76
59
  * Returns a list of databases that are owned by this cluster and were followed by another cluster.
@@ -88,39 +71,22 @@ export class ClustersImpl {
88
71
  return this;
89
72
  },
90
73
  byPage: (settings) => {
91
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
74
+ if (settings?.maxPageSize) {
92
75
  throw new Error("maxPageSize is not supported by this operation.");
93
76
  }
94
77
  return this.listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options, settings);
95
78
  },
96
79
  };
97
80
  }
98
- listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options, _settings) {
99
- return __asyncGenerator(this, arguments, function* listFollowerDatabasesPagingPage_1() {
100
- let result;
101
- result = yield __await(this._listFollowerDatabases(resourceGroupName, clusterName, options));
102
- yield yield __await(result.value || []);
103
- });
81
+ async *listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options, _settings) {
82
+ let result;
83
+ result = await this._listFollowerDatabases(resourceGroupName, clusterName, options);
84
+ yield result.value || [];
104
85
  }
105
- listFollowerDatabasesPagingAll(resourceGroupName, clusterName, options) {
106
- return __asyncGenerator(this, arguments, function* listFollowerDatabasesPagingAll_1() {
107
- var _a, e_2, _b, _c;
108
- try {
109
- for (var _d = true, _e = __asyncValues(this.listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
110
- _c = _f.value;
111
- _d = false;
112
- const page = _c;
113
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
114
- }
115
- }
116
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
117
- finally {
118
- try {
119
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
120
- }
121
- finally { if (e_2) throw e_2.error; }
122
- }
123
- });
86
+ async *listFollowerDatabasesPagingAll(resourceGroupName, clusterName, options) {
87
+ for await (const page of this.listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options)) {
88
+ yield* page;
89
+ }
124
90
  }
125
91
  /**
126
92
  * Lists all Kusto clusters within a resource group.
@@ -137,39 +103,22 @@ export class ClustersImpl {
137
103
  return this;
138
104
  },
139
105
  byPage: (settings) => {
140
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
106
+ if (settings?.maxPageSize) {
141
107
  throw new Error("maxPageSize is not supported by this operation.");
142
108
  }
143
109
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
144
110
  },
145
111
  };
146
112
  }
147
- listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
148
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
149
- let result;
150
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
151
- yield yield __await(result.value || []);
152
- });
113
+ async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
114
+ let result;
115
+ result = await this._listByResourceGroup(resourceGroupName, options);
116
+ yield result.value || [];
153
117
  }
154
- listByResourceGroupPagingAll(resourceGroupName, options) {
155
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
156
- var _a, e_3, _b, _c;
157
- try {
158
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
159
- _c = _f.value;
160
- _d = false;
161
- const page = _c;
162
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
163
- }
164
- }
165
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
166
- finally {
167
- try {
168
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
169
- }
170
- finally { if (e_3) throw e_3.error; }
171
- }
172
- });
118
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
119
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
120
+ yield* page;
121
+ }
173
122
  }
174
123
  /**
175
124
  * Lists all Kusto clusters within a subscription.
@@ -185,39 +134,22 @@ export class ClustersImpl {
185
134
  return this;
186
135
  },
187
136
  byPage: (settings) => {
188
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
137
+ if (settings?.maxPageSize) {
189
138
  throw new Error("maxPageSize is not supported by this operation.");
190
139
  }
191
140
  return this.listPagingPage(options, settings);
192
141
  },
193
142
  };
194
143
  }
195
- listPagingPage(options, _settings) {
196
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
197
- let result;
198
- result = yield __await(this._list(options));
199
- yield yield __await(result.value || []);
200
- });
144
+ async *listPagingPage(options, _settings) {
145
+ let result;
146
+ result = await this._list(options);
147
+ yield result.value || [];
201
148
  }
202
- listPagingAll(options) {
203
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
204
- var _a, e_4, _b, _c;
205
- try {
206
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
207
- _c = _f.value;
208
- _d = false;
209
- const page = _c;
210
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
211
- }
212
- }
213
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
214
- finally {
215
- try {
216
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
217
- }
218
- finally { if (e_4) throw e_4.error; }
219
- }
220
- });
149
+ async *listPagingAll(options) {
150
+ for await (const page of this.listPagingPage(options)) {
151
+ yield* page;
152
+ }
221
153
  }
222
154
  /**
223
155
  * Lists eligible SKUs for Kusto resource provider.
@@ -233,39 +165,22 @@ export class ClustersImpl {
233
165
  return this;
234
166
  },
235
167
  byPage: (settings) => {
236
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
168
+ if (settings?.maxPageSize) {
237
169
  throw new Error("maxPageSize is not supported by this operation.");
238
170
  }
239
171
  return this.listSkusPagingPage(options, settings);
240
172
  },
241
173
  };
242
174
  }
243
- listSkusPagingPage(options, _settings) {
244
- return __asyncGenerator(this, arguments, function* listSkusPagingPage_1() {
245
- let result;
246
- result = yield __await(this._listSkus(options));
247
- yield yield __await(result.value || []);
248
- });
175
+ async *listSkusPagingPage(options, _settings) {
176
+ let result;
177
+ result = await this._listSkus(options);
178
+ yield result.value || [];
249
179
  }
250
- listSkusPagingAll(options) {
251
- return __asyncGenerator(this, arguments, function* listSkusPagingAll_1() {
252
- var _a, e_5, _b, _c;
253
- try {
254
- for (var _d = true, _e = __asyncValues(this.listSkusPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
255
- _c = _f.value;
256
- _d = false;
257
- const page = _c;
258
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
259
- }
260
- }
261
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
262
- finally {
263
- try {
264
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
265
- }
266
- finally { if (e_5) throw e_5.error; }
267
- }
268
- });
180
+ async *listSkusPagingAll(options) {
181
+ for await (const page of this.listSkusPagingPage(options)) {
182
+ yield* page;
183
+ }
269
184
  }
270
185
  /**
271
186
  * Returns the SKUs available for the provided resource.
@@ -283,39 +198,22 @@ export class ClustersImpl {
283
198
  return this;
284
199
  },
285
200
  byPage: (settings) => {
286
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
201
+ if (settings?.maxPageSize) {
287
202
  throw new Error("maxPageSize is not supported by this operation.");
288
203
  }
289
204
  return this.listSkusByResourcePagingPage(resourceGroupName, clusterName, options, settings);
290
205
  },
291
206
  };
292
207
  }
293
- listSkusByResourcePagingPage(resourceGroupName, clusterName, options, _settings) {
294
- return __asyncGenerator(this, arguments, function* listSkusByResourcePagingPage_1() {
295
- let result;
296
- result = yield __await(this._listSkusByResource(resourceGroupName, clusterName, options));
297
- yield yield __await(result.value || []);
298
- });
208
+ async *listSkusByResourcePagingPage(resourceGroupName, clusterName, options, _settings) {
209
+ let result;
210
+ result = await this._listSkusByResource(resourceGroupName, clusterName, options);
211
+ yield result.value || [];
299
212
  }
300
- listSkusByResourcePagingAll(resourceGroupName, clusterName, options) {
301
- return __asyncGenerator(this, arguments, function* listSkusByResourcePagingAll_1() {
302
- var _a, e_6, _b, _c;
303
- try {
304
- for (var _d = true, _e = __asyncValues(this.listSkusByResourcePagingPage(resourceGroupName, clusterName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
305
- _c = _f.value;
306
- _d = false;
307
- const page = _c;
308
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
309
- }
310
- }
311
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
312
- finally {
313
- try {
314
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
315
- }
316
- finally { if (e_6) throw e_6.error; }
317
- }
318
- });
213
+ async *listSkusByResourcePagingAll(resourceGroupName, clusterName, options) {
214
+ for await (const page of this.listSkusByResourcePagingPage(resourceGroupName, clusterName, options)) {
215
+ yield* page;
216
+ }
319
217
  }
320
218
  /**
321
219
  * Gets the network endpoints of all outbound dependencies of a Kusto cluster
@@ -333,52 +231,35 @@ export class ClustersImpl {
333
231
  return this;
334
232
  },
335
233
  byPage: (settings) => {
336
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
234
+ if (settings?.maxPageSize) {
337
235
  throw new Error("maxPageSize is not supported by this operation.");
338
236
  }
339
237
  return this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options, settings);
340
238
  },
341
239
  };
342
240
  }
343
- listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options, settings) {
344
- return __asyncGenerator(this, arguments, function* listOutboundNetworkDependenciesEndpointsPagingPage_1() {
345
- let result;
346
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
347
- if (!continuationToken) {
348
- result = yield __await(this._listOutboundNetworkDependenciesEndpoints(resourceGroupName, clusterName, options));
349
- let page = result.value || [];
350
- continuationToken = result.nextLink;
351
- setContinuationToken(page, continuationToken);
352
- yield yield __await(page);
353
- }
354
- while (continuationToken) {
355
- result = yield __await(this._listOutboundNetworkDependenciesEndpointsNext(resourceGroupName, clusterName, continuationToken, options));
356
- continuationToken = result.nextLink;
357
- let page = result.value || [];
358
- setContinuationToken(page, continuationToken);
359
- yield yield __await(page);
360
- }
361
- });
362
- }
363
- listOutboundNetworkDependenciesEndpointsPagingAll(resourceGroupName, clusterName, options) {
364
- return __asyncGenerator(this, arguments, function* listOutboundNetworkDependenciesEndpointsPagingAll_1() {
365
- var _a, e_7, _b, _c;
366
- try {
367
- for (var _d = true, _e = __asyncValues(this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
368
- _c = _f.value;
369
- _d = false;
370
- const page = _c;
371
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
372
- }
373
- }
374
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
375
- finally {
376
- try {
377
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
378
- }
379
- finally { if (e_7) throw e_7.error; }
380
- }
381
- });
241
+ async *listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options, settings) {
242
+ let result;
243
+ let continuationToken = settings?.continuationToken;
244
+ if (!continuationToken) {
245
+ result = await this._listOutboundNetworkDependenciesEndpoints(resourceGroupName, clusterName, options);
246
+ let page = result.value || [];
247
+ continuationToken = result.nextLink;
248
+ setContinuationToken(page, continuationToken);
249
+ yield page;
250
+ }
251
+ while (continuationToken) {
252
+ result = await this._listOutboundNetworkDependenciesEndpointsNext(resourceGroupName, clusterName, continuationToken, options);
253
+ continuationToken = result.nextLink;
254
+ let page = result.value || [];
255
+ setContinuationToken(page, continuationToken);
256
+ yield page;
257
+ }
258
+ }
259
+ async *listOutboundNetworkDependenciesEndpointsPagingAll(resourceGroupName, clusterName, options) {
260
+ for await (const page of this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options)) {
261
+ yield* page;
262
+ }
382
263
  }
383
264
  /**
384
265
  * Returns the allowed callout policies for the specified service.
@@ -396,39 +277,22 @@ export class ClustersImpl {
396
277
  return this;
397
278
  },
398
279
  byPage: (settings) => {
399
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
280
+ if (settings?.maxPageSize) {
400
281
  throw new Error("maxPageSize is not supported by this operation.");
401
282
  }
402
283
  return this.listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options, settings);
403
284
  },
404
285
  };
405
286
  }
406
- listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options, _settings) {
407
- return __asyncGenerator(this, arguments, function* listCalloutPoliciesPagingPage_1() {
408
- let result;
409
- result = yield __await(this._listCalloutPolicies(resourceGroupName, clusterName, options));
410
- yield yield __await(result.value || []);
411
- });
287
+ async *listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options, _settings) {
288
+ let result;
289
+ result = await this._listCalloutPolicies(resourceGroupName, clusterName, options);
290
+ yield result.value || [];
412
291
  }
413
- listCalloutPoliciesPagingAll(resourceGroupName, clusterName, options) {
414
- return __asyncGenerator(this, arguments, function* listCalloutPoliciesPagingAll_1() {
415
- var _a, e_8, _b, _c;
416
- try {
417
- for (var _d = true, _e = __asyncValues(this.listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
418
- _c = _f.value;
419
- _d = false;
420
- const page = _c;
421
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
422
- }
423
- }
424
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
425
- finally {
426
- try {
427
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
428
- }
429
- finally { if (e_8) throw e_8.error; }
430
- }
431
- });
292
+ async *listCalloutPoliciesPagingAll(resourceGroupName, clusterName, options) {
293
+ for await (const page of this.listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options)) {
294
+ yield* page;
295
+ }
432
296
  }
433
297
  /**
434
298
  * Returns a list of language extensions that can run within KQL queries.
@@ -446,39 +310,22 @@ export class ClustersImpl {
446
310
  return this;
447
311
  },
448
312
  byPage: (settings) => {
449
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
313
+ if (settings?.maxPageSize) {
450
314
  throw new Error("maxPageSize is not supported by this operation.");
451
315
  }
452
316
  return this.listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options, settings);
453
317
  },
454
318
  };
455
319
  }
456
- listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options, _settings) {
457
- return __asyncGenerator(this, arguments, function* listLanguageExtensionsPagingPage_1() {
458
- let result;
459
- result = yield __await(this._listLanguageExtensions(resourceGroupName, clusterName, options));
460
- yield yield __await(result.value || []);
461
- });
320
+ async *listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options, _settings) {
321
+ let result;
322
+ result = await this._listLanguageExtensions(resourceGroupName, clusterName, options);
323
+ yield result.value || [];
462
324
  }
463
- listLanguageExtensionsPagingAll(resourceGroupName, clusterName, options) {
464
- return __asyncGenerator(this, arguments, function* listLanguageExtensionsPagingAll_1() {
465
- var _a, e_9, _b, _c;
466
- try {
467
- for (var _d = true, _e = __asyncValues(this.listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
468
- _c = _f.value;
469
- _d = false;
470
- const page = _c;
471
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
472
- }
473
- }
474
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
475
- finally {
476
- try {
477
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
478
- }
479
- finally { if (e_9) throw e_9.error; }
480
- }
481
- });
325
+ async *listLanguageExtensionsPagingAll(resourceGroupName, clusterName, options) {
326
+ for await (const page of this.listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options)) {
327
+ yield* page;
328
+ }
482
329
  }
483
330
  /**
484
331
  * Gets a Kusto cluster.
@@ -501,14 +348,19 @@ export class ClustersImpl {
501
348
  return this.client.sendOperationRequest(args, spec);
502
349
  };
503
350
  const sendOperationFn = async (args, spec) => {
504
- var _a;
505
351
  let currentRawResponse = undefined;
506
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
352
+ const providedCallback = args.options?.onResponse;
507
353
  const callback = (rawResponse, flatResponse) => {
508
354
  currentRawResponse = rawResponse;
509
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
355
+ providedCallback?.(rawResponse, flatResponse);
356
+ };
357
+ const updatedArgs = {
358
+ ...args,
359
+ options: {
360
+ ...args.options,
361
+ onResponse: callback,
362
+ },
510
363
  };
511
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
512
364
  const flatResponse = await directSendOperation(updatedArgs, spec);
513
365
  return {
514
366
  flatResponse,
@@ -525,8 +377,8 @@ export class ClustersImpl {
525
377
  spec: createOrUpdateOperationSpec,
526
378
  });
527
379
  const poller = await createHttpPoller(lro, {
528
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
529
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
380
+ restoreFrom: options?.resumeFrom,
381
+ intervalInMs: options?.updateIntervalInMs,
530
382
  });
531
383
  await poller.poll();
532
384
  return poller;
@@ -554,14 +406,19 @@ export class ClustersImpl {
554
406
  return this.client.sendOperationRequest(args, spec);
555
407
  };
556
408
  const sendOperationFn = async (args, spec) => {
557
- var _a;
558
409
  let currentRawResponse = undefined;
559
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
410
+ const providedCallback = args.options?.onResponse;
560
411
  const callback = (rawResponse, flatResponse) => {
561
412
  currentRawResponse = rawResponse;
562
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
413
+ providedCallback?.(rawResponse, flatResponse);
414
+ };
415
+ const updatedArgs = {
416
+ ...args,
417
+ options: {
418
+ ...args.options,
419
+ onResponse: callback,
420
+ },
563
421
  };
564
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
565
422
  const flatResponse = await directSendOperation(updatedArgs, spec);
566
423
  return {
567
424
  flatResponse,
@@ -578,8 +435,8 @@ export class ClustersImpl {
578
435
  spec: updateOperationSpec,
579
436
  });
580
437
  const poller = await createHttpPoller(lro, {
581
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
582
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
438
+ restoreFrom: options?.resumeFrom,
439
+ intervalInMs: options?.updateIntervalInMs,
583
440
  });
584
441
  await poller.poll();
585
442
  return poller;
@@ -606,14 +463,19 @@ export class ClustersImpl {
606
463
  return this.client.sendOperationRequest(args, spec);
607
464
  };
608
465
  const sendOperationFn = async (args, spec) => {
609
- var _a;
610
466
  let currentRawResponse = undefined;
611
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
467
+ const providedCallback = args.options?.onResponse;
612
468
  const callback = (rawResponse, flatResponse) => {
613
469
  currentRawResponse = rawResponse;
614
- 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
+ },
615
478
  };
616
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
617
479
  const flatResponse = await directSendOperation(updatedArgs, spec);
618
480
  return {
619
481
  flatResponse,
@@ -630,8 +492,8 @@ export class ClustersImpl {
630
492
  spec: deleteOperationSpec,
631
493
  });
632
494
  const poller = await createHttpPoller(lro, {
633
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
634
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
495
+ restoreFrom: options?.resumeFrom,
496
+ intervalInMs: options?.updateIntervalInMs,
635
497
  });
636
498
  await poller.poll();
637
499
  return poller;
@@ -657,14 +519,19 @@ export class ClustersImpl {
657
519
  return this.client.sendOperationRequest(args, spec);
658
520
  };
659
521
  const sendOperationFn = async (args, spec) => {
660
- var _a;
661
522
  let currentRawResponse = undefined;
662
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
523
+ const providedCallback = args.options?.onResponse;
663
524
  const callback = (rawResponse, flatResponse) => {
664
525
  currentRawResponse = rawResponse;
665
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
526
+ providedCallback?.(rawResponse, flatResponse);
527
+ };
528
+ const updatedArgs = {
529
+ ...args,
530
+ options: {
531
+ ...args.options,
532
+ onResponse: callback,
533
+ },
666
534
  };
667
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
668
535
  const flatResponse = await directSendOperation(updatedArgs, spec);
669
536
  return {
670
537
  flatResponse,
@@ -681,8 +548,8 @@ export class ClustersImpl {
681
548
  spec: stopOperationSpec,
682
549
  });
683
550
  const poller = await createHttpPoller(lro, {
684
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
685
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
551
+ restoreFrom: options?.resumeFrom,
552
+ intervalInMs: options?.updateIntervalInMs,
686
553
  });
687
554
  await poller.poll();
688
555
  return poller;
@@ -708,14 +575,19 @@ export class ClustersImpl {
708
575
  return this.client.sendOperationRequest(args, spec);
709
576
  };
710
577
  const sendOperationFn = async (args, spec) => {
711
- var _a;
712
578
  let currentRawResponse = undefined;
713
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
579
+ const providedCallback = args.options?.onResponse;
714
580
  const callback = (rawResponse, flatResponse) => {
715
581
  currentRawResponse = rawResponse;
716
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
582
+ providedCallback?.(rawResponse, flatResponse);
583
+ };
584
+ const updatedArgs = {
585
+ ...args,
586
+ options: {
587
+ ...args.options,
588
+ onResponse: callback,
589
+ },
717
590
  };
718
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
719
591
  const flatResponse = await directSendOperation(updatedArgs, spec);
720
592
  return {
721
593
  flatResponse,
@@ -732,8 +604,8 @@ export class ClustersImpl {
732
604
  spec: startOperationSpec,
733
605
  });
734
606
  const poller = await createHttpPoller(lro, {
735
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
736
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
607
+ restoreFrom: options?.resumeFrom,
608
+ intervalInMs: options?.updateIntervalInMs,
737
609
  });
738
610
  await poller.poll();
739
611
  return poller;
@@ -760,14 +632,19 @@ export class ClustersImpl {
760
632
  return this.client.sendOperationRequest(args, spec);
761
633
  };
762
634
  const sendOperationFn = async (args, spec) => {
763
- var _a;
764
635
  let currentRawResponse = undefined;
765
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
636
+ const providedCallback = args.options?.onResponse;
766
637
  const callback = (rawResponse, flatResponse) => {
767
638
  currentRawResponse = rawResponse;
768
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
639
+ providedCallback?.(rawResponse, flatResponse);
640
+ };
641
+ const updatedArgs = {
642
+ ...args,
643
+ options: {
644
+ ...args.options,
645
+ onResponse: callback,
646
+ },
769
647
  };
770
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
771
648
  const flatResponse = await directSendOperation(updatedArgs, spec);
772
649
  return {
773
650
  flatResponse,
@@ -784,8 +661,8 @@ export class ClustersImpl {
784
661
  spec: migrateOperationSpec,
785
662
  });
786
663
  const poller = await createHttpPoller(lro, {
787
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
788
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
664
+ restoreFrom: options?.resumeFrom,
665
+ intervalInMs: options?.updateIntervalInMs,
789
666
  });
790
667
  await poller.poll();
791
668
  return poller;
@@ -831,14 +708,19 @@ export class ClustersImpl {
831
708
  return this.client.sendOperationRequest(args, spec);
832
709
  };
833
710
  const sendOperationFn = async (args, spec) => {
834
- var _a;
835
711
  let currentRawResponse = undefined;
836
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
712
+ const providedCallback = args.options?.onResponse;
837
713
  const callback = (rawResponse, flatResponse) => {
838
714
  currentRawResponse = rawResponse;
839
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
715
+ providedCallback?.(rawResponse, flatResponse);
716
+ };
717
+ const updatedArgs = {
718
+ ...args,
719
+ options: {
720
+ ...args.options,
721
+ onResponse: callback,
722
+ },
840
723
  };
841
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
842
724
  const flatResponse = await directSendOperation(updatedArgs, spec);
843
725
  return {
844
726
  flatResponse,
@@ -860,8 +742,8 @@ export class ClustersImpl {
860
742
  spec: detachFollowerDatabasesOperationSpec,
861
743
  });
862
744
  const poller = await createHttpPoller(lro, {
863
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
864
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
745
+ restoreFrom: options?.resumeFrom,
746
+ intervalInMs: options?.updateIntervalInMs,
865
747
  });
866
748
  await poller.poll();
867
749
  return poller;
@@ -888,14 +770,19 @@ export class ClustersImpl {
888
770
  return this.client.sendOperationRequest(args, spec);
889
771
  };
890
772
  const sendOperationFn = async (args, spec) => {
891
- var _a;
892
773
  let currentRawResponse = undefined;
893
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
774
+ const providedCallback = args.options?.onResponse;
894
775
  const callback = (rawResponse, flatResponse) => {
895
776
  currentRawResponse = rawResponse;
896
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
777
+ providedCallback?.(rawResponse, flatResponse);
778
+ };
779
+ const updatedArgs = {
780
+ ...args,
781
+ options: {
782
+ ...args.options,
783
+ onResponse: callback,
784
+ },
897
785
  };
898
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
899
786
  const flatResponse = await directSendOperation(updatedArgs, spec);
900
787
  return {
901
788
  flatResponse,
@@ -912,8 +799,8 @@ export class ClustersImpl {
912
799
  spec: diagnoseVirtualNetworkOperationSpec,
913
800
  });
914
801
  const poller = await createHttpPoller(lro, {
915
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
916
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
802
+ restoreFrom: options?.resumeFrom,
803
+ intervalInMs: options?.updateIntervalInMs,
917
804
  });
918
805
  await poller.poll();
919
806
  return poller;
@@ -989,14 +876,19 @@ export class ClustersImpl {
989
876
  return this.client.sendOperationRequest(args, spec);
990
877
  };
991
878
  const sendOperationFn = async (args, spec) => {
992
- var _a;
993
879
  let currentRawResponse = undefined;
994
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
880
+ const providedCallback = args.options?.onResponse;
995
881
  const callback = (rawResponse, flatResponse) => {
996
882
  currentRawResponse = rawResponse;
997
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
883
+ providedCallback?.(rawResponse, flatResponse);
884
+ };
885
+ const updatedArgs = {
886
+ ...args,
887
+ options: {
888
+ ...args.options,
889
+ onResponse: callback,
890
+ },
998
891
  };
999
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1000
892
  const flatResponse = await directSendOperation(updatedArgs, spec);
1001
893
  return {
1002
894
  flatResponse,
@@ -1013,8 +905,8 @@ export class ClustersImpl {
1013
905
  spec: addCalloutPoliciesOperationSpec,
1014
906
  });
1015
907
  const poller = await createHttpPoller(lro, {
1016
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1017
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
908
+ restoreFrom: options?.resumeFrom,
909
+ intervalInMs: options?.updateIntervalInMs,
1018
910
  });
1019
911
  await poller.poll();
1020
912
  return poller;
@@ -1042,14 +934,19 @@ export class ClustersImpl {
1042
934
  return this.client.sendOperationRequest(args, spec);
1043
935
  };
1044
936
  const sendOperationFn = async (args, spec) => {
1045
- var _a;
1046
937
  let currentRawResponse = undefined;
1047
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
938
+ const providedCallback = args.options?.onResponse;
1048
939
  const callback = (rawResponse, flatResponse) => {
1049
940
  currentRawResponse = rawResponse;
1050
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
941
+ providedCallback?.(rawResponse, flatResponse);
942
+ };
943
+ const updatedArgs = {
944
+ ...args,
945
+ options: {
946
+ ...args.options,
947
+ onResponse: callback,
948
+ },
1051
949
  };
1052
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1053
950
  const flatResponse = await directSendOperation(updatedArgs, spec);
1054
951
  return {
1055
952
  flatResponse,
@@ -1066,8 +963,8 @@ export class ClustersImpl {
1066
963
  spec: removeCalloutPolicyOperationSpec,
1067
964
  });
1068
965
  const poller = await createHttpPoller(lro, {
1069
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1070
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
966
+ restoreFrom: options?.resumeFrom,
967
+ intervalInMs: options?.updateIntervalInMs,
1071
968
  });
1072
969
  await poller.poll();
1073
970
  return poller;
@@ -1113,14 +1010,19 @@ export class ClustersImpl {
1113
1010
  return this.client.sendOperationRequest(args, spec);
1114
1011
  };
1115
1012
  const sendOperationFn = async (args, spec) => {
1116
- var _a;
1117
1013
  let currentRawResponse = undefined;
1118
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1014
+ const providedCallback = args.options?.onResponse;
1119
1015
  const callback = (rawResponse, flatResponse) => {
1120
1016
  currentRawResponse = rawResponse;
1121
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1017
+ providedCallback?.(rawResponse, flatResponse);
1018
+ };
1019
+ const updatedArgs = {
1020
+ ...args,
1021
+ options: {
1022
+ ...args.options,
1023
+ onResponse: callback,
1024
+ },
1122
1025
  };
1123
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1124
1026
  const flatResponse = await directSendOperation(updatedArgs, spec);
1125
1027
  return {
1126
1028
  flatResponse,
@@ -1142,8 +1044,8 @@ export class ClustersImpl {
1142
1044
  spec: addLanguageExtensionsOperationSpec,
1143
1045
  });
1144
1046
  const poller = await createHttpPoller(lro, {
1145
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1146
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1047
+ restoreFrom: options?.resumeFrom,
1048
+ intervalInMs: options?.updateIntervalInMs,
1147
1049
  });
1148
1050
  await poller.poll();
1149
1051
  return poller;
@@ -1171,14 +1073,19 @@ export class ClustersImpl {
1171
1073
  return this.client.sendOperationRequest(args, spec);
1172
1074
  };
1173
1075
  const sendOperationFn = async (args, spec) => {
1174
- var _a;
1175
1076
  let currentRawResponse = undefined;
1176
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1077
+ const providedCallback = args.options?.onResponse;
1177
1078
  const callback = (rawResponse, flatResponse) => {
1178
1079
  currentRawResponse = rawResponse;
1179
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1080
+ providedCallback?.(rawResponse, flatResponse);
1081
+ };
1082
+ const updatedArgs = {
1083
+ ...args,
1084
+ options: {
1085
+ ...args.options,
1086
+ onResponse: callback,
1087
+ },
1180
1088
  };
1181
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1182
1089
  const flatResponse = await directSendOperation(updatedArgs, spec);
1183
1090
  return {
1184
1091
  flatResponse,
@@ -1200,8 +1107,8 @@ export class ClustersImpl {
1200
1107
  spec: removeLanguageExtensionsOperationSpec,
1201
1108
  });
1202
1109
  const poller = await createHttpPoller(lro, {
1203
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1204
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1110
+ restoreFrom: options?.resumeFrom,
1111
+ intervalInMs: options?.updateIntervalInMs,
1205
1112
  });
1206
1113
  await poller.poll();
1207
1114
  return poller;