@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
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Clusters operations. */
20
20
  class ClustersImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Clusters class.
23
24
  * @param client Reference to the service client
@@ -41,39 +42,22 @@ class ClustersImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options, _settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listFollowerDatabasesGetPagingPage_1() {
53
- let result;
54
- result = yield tslib_1.__await(this._listFollowerDatabasesGet(resourceGroupName, clusterName, options));
55
- yield yield tslib_1.__await(result.value || []);
56
- });
52
+ async *listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options, _settings) {
53
+ let result;
54
+ result = await this._listFollowerDatabasesGet(resourceGroupName, clusterName, options);
55
+ yield result.value || [];
57
56
  }
58
- listFollowerDatabasesGetPagingAll(resourceGroupName, clusterName, options) {
59
- return tslib_1.__asyncGenerator(this, arguments, function* listFollowerDatabasesGetPagingAll_1() {
60
- var _a, e_1, _b, _c;
61
- try {
62
- for (var _d = true, _e = tslib_1.__asyncValues(this.listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
63
- _c = _f.value;
64
- _d = false;
65
- const page = _c;
66
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
67
- }
68
- }
69
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
70
- finally {
71
- try {
72
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
73
- }
74
- finally { if (e_1) throw e_1.error; }
75
- }
76
- });
57
+ async *listFollowerDatabasesGetPagingAll(resourceGroupName, clusterName, options) {
58
+ for await (const page of this.listFollowerDatabasesGetPagingPage(resourceGroupName, clusterName, options)) {
59
+ yield* page;
60
+ }
77
61
  }
78
62
  /**
79
63
  * Returns a list of databases that are owned by this cluster and were followed by another cluster.
@@ -91,39 +75,22 @@ class ClustersImpl {
91
75
  return this;
92
76
  },
93
77
  byPage: (settings) => {
94
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
78
+ if (settings?.maxPageSize) {
95
79
  throw new Error("maxPageSize is not supported by this operation.");
96
80
  }
97
81
  return this.listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options, settings);
98
82
  },
99
83
  };
100
84
  }
101
- listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options, _settings) {
102
- return tslib_1.__asyncGenerator(this, arguments, function* listFollowerDatabasesPagingPage_1() {
103
- let result;
104
- result = yield tslib_1.__await(this._listFollowerDatabases(resourceGroupName, clusterName, options));
105
- yield yield tslib_1.__await(result.value || []);
106
- });
85
+ async *listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options, _settings) {
86
+ let result;
87
+ result = await this._listFollowerDatabases(resourceGroupName, clusterName, options);
88
+ yield result.value || [];
107
89
  }
108
- listFollowerDatabasesPagingAll(resourceGroupName, clusterName, options) {
109
- return tslib_1.__asyncGenerator(this, arguments, function* listFollowerDatabasesPagingAll_1() {
110
- var _a, e_2, _b, _c;
111
- try {
112
- for (var _d = true, _e = tslib_1.__asyncValues(this.listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
113
- _c = _f.value;
114
- _d = false;
115
- const page = _c;
116
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
117
- }
118
- }
119
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
120
- finally {
121
- try {
122
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
123
- }
124
- finally { if (e_2) throw e_2.error; }
125
- }
126
- });
90
+ async *listFollowerDatabasesPagingAll(resourceGroupName, clusterName, options) {
91
+ for await (const page of this.listFollowerDatabasesPagingPage(resourceGroupName, clusterName, options)) {
92
+ yield* page;
93
+ }
127
94
  }
128
95
  /**
129
96
  * Lists all Kusto clusters within a resource group.
@@ -140,39 +107,22 @@ class ClustersImpl {
140
107
  return this;
141
108
  },
142
109
  byPage: (settings) => {
143
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
110
+ if (settings?.maxPageSize) {
144
111
  throw new Error("maxPageSize is not supported by this operation.");
145
112
  }
146
113
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
147
114
  },
148
115
  };
149
116
  }
150
- listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
151
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
152
- let result;
153
- result = yield tslib_1.__await(this._listByResourceGroup(resourceGroupName, options));
154
- yield yield tslib_1.__await(result.value || []);
155
- });
117
+ async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
118
+ let result;
119
+ result = await this._listByResourceGroup(resourceGroupName, options);
120
+ yield result.value || [];
156
121
  }
157
- listByResourceGroupPagingAll(resourceGroupName, options) {
158
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
159
- var _a, e_3, _b, _c;
160
- try {
161
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
162
- _c = _f.value;
163
- _d = false;
164
- const page = _c;
165
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
166
- }
167
- }
168
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
169
- finally {
170
- try {
171
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
172
- }
173
- finally { if (e_3) throw e_3.error; }
174
- }
175
- });
122
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
123
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
124
+ yield* page;
125
+ }
176
126
  }
177
127
  /**
178
128
  * Lists all Kusto clusters within a subscription.
@@ -188,39 +138,22 @@ class ClustersImpl {
188
138
  return this;
189
139
  },
190
140
  byPage: (settings) => {
191
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
141
+ if (settings?.maxPageSize) {
192
142
  throw new Error("maxPageSize is not supported by this operation.");
193
143
  }
194
144
  return this.listPagingPage(options, settings);
195
145
  },
196
146
  };
197
147
  }
198
- listPagingPage(options, _settings) {
199
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
200
- let result;
201
- result = yield tslib_1.__await(this._list(options));
202
- yield yield tslib_1.__await(result.value || []);
203
- });
148
+ async *listPagingPage(options, _settings) {
149
+ let result;
150
+ result = await this._list(options);
151
+ yield result.value || [];
204
152
  }
205
- listPagingAll(options) {
206
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
207
- var _a, e_4, _b, _c;
208
- try {
209
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
210
- _c = _f.value;
211
- _d = false;
212
- const page = _c;
213
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
214
- }
215
- }
216
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
217
- finally {
218
- try {
219
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
220
- }
221
- finally { if (e_4) throw e_4.error; }
222
- }
223
- });
153
+ async *listPagingAll(options) {
154
+ for await (const page of this.listPagingPage(options)) {
155
+ yield* page;
156
+ }
224
157
  }
225
158
  /**
226
159
  * Lists eligible SKUs for Kusto resource provider.
@@ -236,39 +169,22 @@ class ClustersImpl {
236
169
  return this;
237
170
  },
238
171
  byPage: (settings) => {
239
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
172
+ if (settings?.maxPageSize) {
240
173
  throw new Error("maxPageSize is not supported by this operation.");
241
174
  }
242
175
  return this.listSkusPagingPage(options, settings);
243
176
  },
244
177
  };
245
178
  }
246
- listSkusPagingPage(options, _settings) {
247
- return tslib_1.__asyncGenerator(this, arguments, function* listSkusPagingPage_1() {
248
- let result;
249
- result = yield tslib_1.__await(this._listSkus(options));
250
- yield yield tslib_1.__await(result.value || []);
251
- });
179
+ async *listSkusPagingPage(options, _settings) {
180
+ let result;
181
+ result = await this._listSkus(options);
182
+ yield result.value || [];
252
183
  }
253
- listSkusPagingAll(options) {
254
- return tslib_1.__asyncGenerator(this, arguments, function* listSkusPagingAll_1() {
255
- var _a, e_5, _b, _c;
256
- try {
257
- for (var _d = true, _e = tslib_1.__asyncValues(this.listSkusPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
258
- _c = _f.value;
259
- _d = false;
260
- const page = _c;
261
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
262
- }
263
- }
264
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
265
- finally {
266
- try {
267
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
268
- }
269
- finally { if (e_5) throw e_5.error; }
270
- }
271
- });
184
+ async *listSkusPagingAll(options) {
185
+ for await (const page of this.listSkusPagingPage(options)) {
186
+ yield* page;
187
+ }
272
188
  }
273
189
  /**
274
190
  * Returns the SKUs available for the provided resource.
@@ -286,39 +202,22 @@ class ClustersImpl {
286
202
  return this;
287
203
  },
288
204
  byPage: (settings) => {
289
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
205
+ if (settings?.maxPageSize) {
290
206
  throw new Error("maxPageSize is not supported by this operation.");
291
207
  }
292
208
  return this.listSkusByResourcePagingPage(resourceGroupName, clusterName, options, settings);
293
209
  },
294
210
  };
295
211
  }
296
- listSkusByResourcePagingPage(resourceGroupName, clusterName, options, _settings) {
297
- return tslib_1.__asyncGenerator(this, arguments, function* listSkusByResourcePagingPage_1() {
298
- let result;
299
- result = yield tslib_1.__await(this._listSkusByResource(resourceGroupName, clusterName, options));
300
- yield yield tslib_1.__await(result.value || []);
301
- });
212
+ async *listSkusByResourcePagingPage(resourceGroupName, clusterName, options, _settings) {
213
+ let result;
214
+ result = await this._listSkusByResource(resourceGroupName, clusterName, options);
215
+ yield result.value || [];
302
216
  }
303
- listSkusByResourcePagingAll(resourceGroupName, clusterName, options) {
304
- return tslib_1.__asyncGenerator(this, arguments, function* listSkusByResourcePagingAll_1() {
305
- var _a, e_6, _b, _c;
306
- try {
307
- for (var _d = true, _e = tslib_1.__asyncValues(this.listSkusByResourcePagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
308
- _c = _f.value;
309
- _d = false;
310
- const page = _c;
311
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
312
- }
313
- }
314
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
315
- finally {
316
- try {
317
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
318
- }
319
- finally { if (e_6) throw e_6.error; }
320
- }
321
- });
217
+ async *listSkusByResourcePagingAll(resourceGroupName, clusterName, options) {
218
+ for await (const page of this.listSkusByResourcePagingPage(resourceGroupName, clusterName, options)) {
219
+ yield* page;
220
+ }
322
221
  }
323
222
  /**
324
223
  * Gets the network endpoints of all outbound dependencies of a Kusto cluster
@@ -336,52 +235,35 @@ class ClustersImpl {
336
235
  return this;
337
236
  },
338
237
  byPage: (settings) => {
339
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
238
+ if (settings?.maxPageSize) {
340
239
  throw new Error("maxPageSize is not supported by this operation.");
341
240
  }
342
241
  return this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options, settings);
343
242
  },
344
243
  };
345
244
  }
346
- listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options, settings) {
347
- return tslib_1.__asyncGenerator(this, arguments, function* listOutboundNetworkDependenciesEndpointsPagingPage_1() {
348
- let result;
349
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
350
- if (!continuationToken) {
351
- result = yield tslib_1.__await(this._listOutboundNetworkDependenciesEndpoints(resourceGroupName, clusterName, options));
352
- let page = result.value || [];
353
- continuationToken = result.nextLink;
354
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
355
- yield yield tslib_1.__await(page);
356
- }
357
- while (continuationToken) {
358
- result = yield tslib_1.__await(this._listOutboundNetworkDependenciesEndpointsNext(resourceGroupName, clusterName, continuationToken, options));
359
- continuationToken = result.nextLink;
360
- let page = result.value || [];
361
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
362
- yield yield tslib_1.__await(page);
363
- }
364
- });
365
- }
366
- listOutboundNetworkDependenciesEndpointsPagingAll(resourceGroupName, clusterName, options) {
367
- return tslib_1.__asyncGenerator(this, arguments, function* listOutboundNetworkDependenciesEndpointsPagingAll_1() {
368
- var _a, e_7, _b, _c;
369
- try {
370
- for (var _d = true, _e = tslib_1.__asyncValues(this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
371
- _c = _f.value;
372
- _d = false;
373
- const page = _c;
374
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
375
- }
376
- }
377
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
378
- finally {
379
- try {
380
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
381
- }
382
- finally { if (e_7) throw e_7.error; }
383
- }
384
- });
245
+ async *listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options, settings) {
246
+ let result;
247
+ let continuationToken = settings?.continuationToken;
248
+ if (!continuationToken) {
249
+ result = await this._listOutboundNetworkDependenciesEndpoints(resourceGroupName, clusterName, options);
250
+ let page = result.value || [];
251
+ continuationToken = result.nextLink;
252
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
253
+ yield page;
254
+ }
255
+ while (continuationToken) {
256
+ result = await this._listOutboundNetworkDependenciesEndpointsNext(resourceGroupName, clusterName, continuationToken, options);
257
+ continuationToken = result.nextLink;
258
+ let page = result.value || [];
259
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
260
+ yield page;
261
+ }
262
+ }
263
+ async *listOutboundNetworkDependenciesEndpointsPagingAll(resourceGroupName, clusterName, options) {
264
+ for await (const page of this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, clusterName, options)) {
265
+ yield* page;
266
+ }
385
267
  }
386
268
  /**
387
269
  * Returns the allowed callout policies for the specified service.
@@ -399,39 +281,22 @@ class ClustersImpl {
399
281
  return this;
400
282
  },
401
283
  byPage: (settings) => {
402
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
284
+ if (settings?.maxPageSize) {
403
285
  throw new Error("maxPageSize is not supported by this operation.");
404
286
  }
405
287
  return this.listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options, settings);
406
288
  },
407
289
  };
408
290
  }
409
- listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options, _settings) {
410
- return tslib_1.__asyncGenerator(this, arguments, function* listCalloutPoliciesPagingPage_1() {
411
- let result;
412
- result = yield tslib_1.__await(this._listCalloutPolicies(resourceGroupName, clusterName, options));
413
- yield yield tslib_1.__await(result.value || []);
414
- });
291
+ async *listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options, _settings) {
292
+ let result;
293
+ result = await this._listCalloutPolicies(resourceGroupName, clusterName, options);
294
+ yield result.value || [];
415
295
  }
416
- listCalloutPoliciesPagingAll(resourceGroupName, clusterName, options) {
417
- return tslib_1.__asyncGenerator(this, arguments, function* listCalloutPoliciesPagingAll_1() {
418
- var _a, e_8, _b, _c;
419
- try {
420
- for (var _d = true, _e = tslib_1.__asyncValues(this.listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
421
- _c = _f.value;
422
- _d = false;
423
- const page = _c;
424
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
425
- }
426
- }
427
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
428
- finally {
429
- try {
430
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
431
- }
432
- finally { if (e_8) throw e_8.error; }
433
- }
434
- });
296
+ async *listCalloutPoliciesPagingAll(resourceGroupName, clusterName, options) {
297
+ for await (const page of this.listCalloutPoliciesPagingPage(resourceGroupName, clusterName, options)) {
298
+ yield* page;
299
+ }
435
300
  }
436
301
  /**
437
302
  * Returns a list of language extensions that can run within KQL queries.
@@ -449,39 +314,22 @@ class ClustersImpl {
449
314
  return this;
450
315
  },
451
316
  byPage: (settings) => {
452
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
317
+ if (settings?.maxPageSize) {
453
318
  throw new Error("maxPageSize is not supported by this operation.");
454
319
  }
455
320
  return this.listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options, settings);
456
321
  },
457
322
  };
458
323
  }
459
- listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options, _settings) {
460
- return tslib_1.__asyncGenerator(this, arguments, function* listLanguageExtensionsPagingPage_1() {
461
- let result;
462
- result = yield tslib_1.__await(this._listLanguageExtensions(resourceGroupName, clusterName, options));
463
- yield yield tslib_1.__await(result.value || []);
464
- });
324
+ async *listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options, _settings) {
325
+ let result;
326
+ result = await this._listLanguageExtensions(resourceGroupName, clusterName, options);
327
+ yield result.value || [];
465
328
  }
466
- listLanguageExtensionsPagingAll(resourceGroupName, clusterName, options) {
467
- return tslib_1.__asyncGenerator(this, arguments, function* listLanguageExtensionsPagingAll_1() {
468
- var _a, e_9, _b, _c;
469
- try {
470
- for (var _d = true, _e = tslib_1.__asyncValues(this.listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
471
- _c = _f.value;
472
- _d = false;
473
- const page = _c;
474
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
475
- }
476
- }
477
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
478
- finally {
479
- try {
480
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
481
- }
482
- finally { if (e_9) throw e_9.error; }
483
- }
484
- });
329
+ async *listLanguageExtensionsPagingAll(resourceGroupName, clusterName, options) {
330
+ for await (const page of this.listLanguageExtensionsPagingPage(resourceGroupName, clusterName, options)) {
331
+ yield* page;
332
+ }
485
333
  }
486
334
  /**
487
335
  * Gets a Kusto cluster.
@@ -504,14 +352,19 @@ class ClustersImpl {
504
352
  return this.client.sendOperationRequest(args, spec);
505
353
  };
506
354
  const sendOperationFn = async (args, spec) => {
507
- var _a;
508
355
  let currentRawResponse = undefined;
509
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
356
+ const providedCallback = args.options?.onResponse;
510
357
  const callback = (rawResponse, flatResponse) => {
511
358
  currentRawResponse = rawResponse;
512
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
359
+ providedCallback?.(rawResponse, flatResponse);
360
+ };
361
+ const updatedArgs = {
362
+ ...args,
363
+ options: {
364
+ ...args.options,
365
+ onResponse: callback,
366
+ },
513
367
  };
514
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
515
368
  const flatResponse = await directSendOperation(updatedArgs, spec);
516
369
  return {
517
370
  flatResponse,
@@ -528,8 +381,8 @@ class ClustersImpl {
528
381
  spec: createOrUpdateOperationSpec,
529
382
  });
530
383
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
531
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
532
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
384
+ restoreFrom: options?.resumeFrom,
385
+ intervalInMs: options?.updateIntervalInMs,
533
386
  });
534
387
  await poller.poll();
535
388
  return poller;
@@ -557,14 +410,19 @@ class ClustersImpl {
557
410
  return this.client.sendOperationRequest(args, spec);
558
411
  };
559
412
  const sendOperationFn = async (args, spec) => {
560
- var _a;
561
413
  let currentRawResponse = undefined;
562
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
414
+ const providedCallback = args.options?.onResponse;
563
415
  const callback = (rawResponse, flatResponse) => {
564
416
  currentRawResponse = rawResponse;
565
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
417
+ providedCallback?.(rawResponse, flatResponse);
418
+ };
419
+ const updatedArgs = {
420
+ ...args,
421
+ options: {
422
+ ...args.options,
423
+ onResponse: callback,
424
+ },
566
425
  };
567
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
568
426
  const flatResponse = await directSendOperation(updatedArgs, spec);
569
427
  return {
570
428
  flatResponse,
@@ -581,8 +439,8 @@ class ClustersImpl {
581
439
  spec: updateOperationSpec,
582
440
  });
583
441
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
584
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
585
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
442
+ restoreFrom: options?.resumeFrom,
443
+ intervalInMs: options?.updateIntervalInMs,
586
444
  });
587
445
  await poller.poll();
588
446
  return poller;
@@ -609,14 +467,19 @@ class ClustersImpl {
609
467
  return this.client.sendOperationRequest(args, spec);
610
468
  };
611
469
  const sendOperationFn = async (args, spec) => {
612
- var _a;
613
470
  let currentRawResponse = undefined;
614
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
471
+ const providedCallback = args.options?.onResponse;
615
472
  const callback = (rawResponse, flatResponse) => {
616
473
  currentRawResponse = rawResponse;
617
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
474
+ providedCallback?.(rawResponse, flatResponse);
475
+ };
476
+ const updatedArgs = {
477
+ ...args,
478
+ options: {
479
+ ...args.options,
480
+ onResponse: callback,
481
+ },
618
482
  };
619
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
620
483
  const flatResponse = await directSendOperation(updatedArgs, spec);
621
484
  return {
622
485
  flatResponse,
@@ -633,8 +496,8 @@ class ClustersImpl {
633
496
  spec: deleteOperationSpec,
634
497
  });
635
498
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
636
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
637
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
499
+ restoreFrom: options?.resumeFrom,
500
+ intervalInMs: options?.updateIntervalInMs,
638
501
  });
639
502
  await poller.poll();
640
503
  return poller;
@@ -660,14 +523,19 @@ class ClustersImpl {
660
523
  return this.client.sendOperationRequest(args, spec);
661
524
  };
662
525
  const sendOperationFn = async (args, spec) => {
663
- var _a;
664
526
  let currentRawResponse = undefined;
665
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
527
+ const providedCallback = args.options?.onResponse;
666
528
  const callback = (rawResponse, flatResponse) => {
667
529
  currentRawResponse = rawResponse;
668
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
530
+ providedCallback?.(rawResponse, flatResponse);
531
+ };
532
+ const updatedArgs = {
533
+ ...args,
534
+ options: {
535
+ ...args.options,
536
+ onResponse: callback,
537
+ },
669
538
  };
670
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
671
539
  const flatResponse = await directSendOperation(updatedArgs, spec);
672
540
  return {
673
541
  flatResponse,
@@ -684,8 +552,8 @@ class ClustersImpl {
684
552
  spec: stopOperationSpec,
685
553
  });
686
554
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
687
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
688
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
555
+ restoreFrom: options?.resumeFrom,
556
+ intervalInMs: options?.updateIntervalInMs,
689
557
  });
690
558
  await poller.poll();
691
559
  return poller;
@@ -711,14 +579,19 @@ class ClustersImpl {
711
579
  return this.client.sendOperationRequest(args, spec);
712
580
  };
713
581
  const sendOperationFn = async (args, spec) => {
714
- var _a;
715
582
  let currentRawResponse = undefined;
716
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
583
+ const providedCallback = args.options?.onResponse;
717
584
  const callback = (rawResponse, flatResponse) => {
718
585
  currentRawResponse = rawResponse;
719
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
586
+ providedCallback?.(rawResponse, flatResponse);
587
+ };
588
+ const updatedArgs = {
589
+ ...args,
590
+ options: {
591
+ ...args.options,
592
+ onResponse: callback,
593
+ },
720
594
  };
721
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
722
595
  const flatResponse = await directSendOperation(updatedArgs, spec);
723
596
  return {
724
597
  flatResponse,
@@ -735,8 +608,8 @@ class ClustersImpl {
735
608
  spec: startOperationSpec,
736
609
  });
737
610
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
738
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
739
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
611
+ restoreFrom: options?.resumeFrom,
612
+ intervalInMs: options?.updateIntervalInMs,
740
613
  });
741
614
  await poller.poll();
742
615
  return poller;
@@ -763,14 +636,19 @@ class ClustersImpl {
763
636
  return this.client.sendOperationRequest(args, spec);
764
637
  };
765
638
  const sendOperationFn = async (args, spec) => {
766
- var _a;
767
639
  let currentRawResponse = undefined;
768
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
640
+ const providedCallback = args.options?.onResponse;
769
641
  const callback = (rawResponse, flatResponse) => {
770
642
  currentRawResponse = rawResponse;
771
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
643
+ providedCallback?.(rawResponse, flatResponse);
644
+ };
645
+ const updatedArgs = {
646
+ ...args,
647
+ options: {
648
+ ...args.options,
649
+ onResponse: callback,
650
+ },
772
651
  };
773
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
774
652
  const flatResponse = await directSendOperation(updatedArgs, spec);
775
653
  return {
776
654
  flatResponse,
@@ -787,8 +665,8 @@ class ClustersImpl {
787
665
  spec: migrateOperationSpec,
788
666
  });
789
667
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
790
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
791
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
668
+ restoreFrom: options?.resumeFrom,
669
+ intervalInMs: options?.updateIntervalInMs,
792
670
  });
793
671
  await poller.poll();
794
672
  return poller;
@@ -834,14 +712,19 @@ class ClustersImpl {
834
712
  return this.client.sendOperationRequest(args, spec);
835
713
  };
836
714
  const sendOperationFn = async (args, spec) => {
837
- var _a;
838
715
  let currentRawResponse = undefined;
839
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
716
+ const providedCallback = args.options?.onResponse;
840
717
  const callback = (rawResponse, flatResponse) => {
841
718
  currentRawResponse = rawResponse;
842
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
719
+ providedCallback?.(rawResponse, flatResponse);
720
+ };
721
+ const updatedArgs = {
722
+ ...args,
723
+ options: {
724
+ ...args.options,
725
+ onResponse: callback,
726
+ },
843
727
  };
844
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
845
728
  const flatResponse = await directSendOperation(updatedArgs, spec);
846
729
  return {
847
730
  flatResponse,
@@ -863,8 +746,8 @@ class ClustersImpl {
863
746
  spec: detachFollowerDatabasesOperationSpec,
864
747
  });
865
748
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
866
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
867
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
749
+ restoreFrom: options?.resumeFrom,
750
+ intervalInMs: options?.updateIntervalInMs,
868
751
  });
869
752
  await poller.poll();
870
753
  return poller;
@@ -891,14 +774,19 @@ class ClustersImpl {
891
774
  return this.client.sendOperationRequest(args, spec);
892
775
  };
893
776
  const sendOperationFn = async (args, spec) => {
894
- var _a;
895
777
  let currentRawResponse = undefined;
896
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
778
+ const providedCallback = args.options?.onResponse;
897
779
  const callback = (rawResponse, flatResponse) => {
898
780
  currentRawResponse = rawResponse;
899
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
781
+ providedCallback?.(rawResponse, flatResponse);
782
+ };
783
+ const updatedArgs = {
784
+ ...args,
785
+ options: {
786
+ ...args.options,
787
+ onResponse: callback,
788
+ },
900
789
  };
901
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
902
790
  const flatResponse = await directSendOperation(updatedArgs, spec);
903
791
  return {
904
792
  flatResponse,
@@ -915,8 +803,8 @@ class ClustersImpl {
915
803
  spec: diagnoseVirtualNetworkOperationSpec,
916
804
  });
917
805
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
918
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
919
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
806
+ restoreFrom: options?.resumeFrom,
807
+ intervalInMs: options?.updateIntervalInMs,
920
808
  });
921
809
  await poller.poll();
922
810
  return poller;
@@ -992,14 +880,19 @@ class ClustersImpl {
992
880
  return this.client.sendOperationRequest(args, spec);
993
881
  };
994
882
  const sendOperationFn = async (args, spec) => {
995
- var _a;
996
883
  let currentRawResponse = undefined;
997
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
884
+ const providedCallback = args.options?.onResponse;
998
885
  const callback = (rawResponse, flatResponse) => {
999
886
  currentRawResponse = rawResponse;
1000
- 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
+ },
1001
895
  };
1002
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1003
896
  const flatResponse = await directSendOperation(updatedArgs, spec);
1004
897
  return {
1005
898
  flatResponse,
@@ -1016,8 +909,8 @@ class ClustersImpl {
1016
909
  spec: addCalloutPoliciesOperationSpec,
1017
910
  });
1018
911
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1019
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1020
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
912
+ restoreFrom: options?.resumeFrom,
913
+ intervalInMs: options?.updateIntervalInMs,
1021
914
  });
1022
915
  await poller.poll();
1023
916
  return poller;
@@ -1045,14 +938,19 @@ class ClustersImpl {
1045
938
  return this.client.sendOperationRequest(args, spec);
1046
939
  };
1047
940
  const sendOperationFn = async (args, spec) => {
1048
- var _a;
1049
941
  let currentRawResponse = undefined;
1050
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
942
+ const providedCallback = args.options?.onResponse;
1051
943
  const callback = (rawResponse, flatResponse) => {
1052
944
  currentRawResponse = rawResponse;
1053
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
945
+ providedCallback?.(rawResponse, flatResponse);
946
+ };
947
+ const updatedArgs = {
948
+ ...args,
949
+ options: {
950
+ ...args.options,
951
+ onResponse: callback,
952
+ },
1054
953
  };
1055
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1056
954
  const flatResponse = await directSendOperation(updatedArgs, spec);
1057
955
  return {
1058
956
  flatResponse,
@@ -1069,8 +967,8 @@ class ClustersImpl {
1069
967
  spec: removeCalloutPolicyOperationSpec,
1070
968
  });
1071
969
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1072
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1073
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
970
+ restoreFrom: options?.resumeFrom,
971
+ intervalInMs: options?.updateIntervalInMs,
1074
972
  });
1075
973
  await poller.poll();
1076
974
  return poller;
@@ -1116,14 +1014,19 @@ class ClustersImpl {
1116
1014
  return this.client.sendOperationRequest(args, spec);
1117
1015
  };
1118
1016
  const sendOperationFn = async (args, spec) => {
1119
- var _a;
1120
1017
  let currentRawResponse = undefined;
1121
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1018
+ const providedCallback = args.options?.onResponse;
1122
1019
  const callback = (rawResponse, flatResponse) => {
1123
1020
  currentRawResponse = rawResponse;
1124
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1021
+ providedCallback?.(rawResponse, flatResponse);
1022
+ };
1023
+ const updatedArgs = {
1024
+ ...args,
1025
+ options: {
1026
+ ...args.options,
1027
+ onResponse: callback,
1028
+ },
1125
1029
  };
1126
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1127
1030
  const flatResponse = await directSendOperation(updatedArgs, spec);
1128
1031
  return {
1129
1032
  flatResponse,
@@ -1145,8 +1048,8 @@ class ClustersImpl {
1145
1048
  spec: addLanguageExtensionsOperationSpec,
1146
1049
  });
1147
1050
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1148
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1149
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1051
+ restoreFrom: options?.resumeFrom,
1052
+ intervalInMs: options?.updateIntervalInMs,
1150
1053
  });
1151
1054
  await poller.poll();
1152
1055
  return poller;
@@ -1174,14 +1077,19 @@ class ClustersImpl {
1174
1077
  return this.client.sendOperationRequest(args, spec);
1175
1078
  };
1176
1079
  const sendOperationFn = async (args, spec) => {
1177
- var _a;
1178
1080
  let currentRawResponse = undefined;
1179
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1081
+ const providedCallback = args.options?.onResponse;
1180
1082
  const callback = (rawResponse, flatResponse) => {
1181
1083
  currentRawResponse = rawResponse;
1182
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1084
+ providedCallback?.(rawResponse, flatResponse);
1085
+ };
1086
+ const updatedArgs = {
1087
+ ...args,
1088
+ options: {
1089
+ ...args.options,
1090
+ onResponse: callback,
1091
+ },
1183
1092
  };
1184
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1185
1093
  const flatResponse = await directSendOperation(updatedArgs, spec);
1186
1094
  return {
1187
1095
  flatResponse,
@@ -1203,8 +1111,8 @@ class ClustersImpl {
1203
1111
  spec: removeLanguageExtensionsOperationSpec,
1204
1112
  });
1205
1113
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
1206
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1207
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1114
+ restoreFrom: options?.resumeFrom,
1115
+ intervalInMs: options?.updateIntervalInMs,
1208
1116
  });
1209
1117
  await poller.poll();
1210
1118
  return poller;