@azure/arm-dynatrace 2.0.0-alpha.20250718.1 → 2.0.0-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/browser/dynatraceObservability.js +17 -5
  2. package/dist/browser/dynatraceObservability.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 +59 -27
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/monitors.js +155 -247
  8. package/dist/browser/operations/monitors.js.map +1 -1
  9. package/dist/browser/operations/operations.js +23 -40
  10. package/dist/browser/operations/operations.js.map +1 -1
  11. package/dist/browser/operations/singleSignOn.js +34 -46
  12. package/dist/browser/operations/singleSignOn.js.map +1 -1
  13. package/dist/browser/operations/tagRules.js +45 -52
  14. package/dist/browser/operations/tagRules.js.map +1 -1
  15. package/dist/browser/pagingHelper.js +2 -4
  16. package/dist/browser/pagingHelper.js.map +1 -1
  17. package/dist/commonjs/dynatraceObservability.js +17 -5
  18. package/dist/commonjs/dynatraceObservability.js.map +1 -1
  19. package/dist/commonjs/lroImpl.js +7 -3
  20. package/dist/commonjs/lroImpl.js.map +1 -1
  21. package/dist/commonjs/models/mappers.js +59 -27
  22. package/dist/commonjs/models/mappers.js.map +1 -1
  23. package/dist/commonjs/operations/monitors.js +155 -246
  24. package/dist/commonjs/operations/monitors.js.map +1 -1
  25. package/dist/commonjs/operations/operations.js +23 -39
  26. package/dist/commonjs/operations/operations.js.map +1 -1
  27. package/dist/commonjs/operations/singleSignOn.js +34 -45
  28. package/dist/commonjs/operations/singleSignOn.js.map +1 -1
  29. package/dist/commonjs/operations/tagRules.js +45 -51
  30. package/dist/commonjs/operations/tagRules.js.map +1 -1
  31. package/dist/commonjs/pagingHelper.js +2 -4
  32. package/dist/commonjs/pagingHelper.js.map +1 -1
  33. package/dist/commonjs/tsdoc-metadata.json +1 -1
  34. package/dist/esm/dynatraceObservability.js +17 -5
  35. package/dist/esm/dynatraceObservability.js.map +1 -1
  36. package/dist/esm/lroImpl.js +7 -3
  37. package/dist/esm/lroImpl.js.map +1 -1
  38. package/dist/esm/models/mappers.js +59 -27
  39. package/dist/esm/models/mappers.js.map +1 -1
  40. package/dist/esm/operations/monitors.js +155 -247
  41. package/dist/esm/operations/monitors.js.map +1 -1
  42. package/dist/esm/operations/operations.js +23 -40
  43. package/dist/esm/operations/operations.js.map +1 -1
  44. package/dist/esm/operations/singleSignOn.js +34 -46
  45. package/dist/esm/operations/singleSignOn.js.map +1 -1
  46. package/dist/esm/operations/tagRules.js +45 -52
  47. package/dist/esm/operations/tagRules.js.map +1 -1
  48. package/dist/esm/pagingHelper.js +2 -4
  49. package/dist/esm/pagingHelper.js.map +1 -1
  50. package/dist/react-native/dynatraceObservability.js +17 -5
  51. package/dist/react-native/dynatraceObservability.js.map +1 -1
  52. package/dist/react-native/lroImpl.js +7 -3
  53. package/dist/react-native/lroImpl.js.map +1 -1
  54. package/dist/react-native/models/mappers.js +59 -27
  55. package/dist/react-native/models/mappers.js.map +1 -1
  56. package/dist/react-native/operations/monitors.js +155 -247
  57. package/dist/react-native/operations/monitors.js.map +1 -1
  58. package/dist/react-native/operations/operations.js +23 -40
  59. package/dist/react-native/operations/operations.js.map +1 -1
  60. package/dist/react-native/operations/singleSignOn.js +34 -46
  61. package/dist/react-native/operations/singleSignOn.js.map +1 -1
  62. package/dist/react-native/operations/tagRules.js +45 -52
  63. package/dist/react-native/operations/tagRules.js.map +1 -1
  64. package/dist/react-native/pagingHelper.js +2 -4
  65. package/dist/react-native/pagingHelper.js.map +1 -1
  66. package/package.json +2 -2
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Monitors operations. */
20
20
  class MonitorsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Monitors class.
23
24
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class MonitorsImpl {
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.listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings);
48
49
  }
49
50
  };
50
51
  }
51
- listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listMonitoredResourcesPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._listMonitoredResources(resourceGroupName, monitorName, options));
57
- let page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listMonitoredResourcesNext(resourceGroupName, monitorName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- let page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._listMonitoredResources(resourceGroupName, monitorName, options);
57
+ let page = result.value || [];
58
+ continuationToken = result.nextLink;
59
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
+ yield page;
61
+ }
62
+ while (continuationToken) {
63
+ result = await this._listMonitoredResourcesNext(resourceGroupName, monitorName, continuationToken, options);
64
+ continuationToken = result.nextLink;
65
+ let page = result.value || [];
66
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
+ yield page;
68
+ }
70
69
  }
71
- listMonitoredResourcesPagingAll(resourceGroupName, monitorName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listMonitoredResourcesPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
76
- _c = _f.value;
77
- _d = false;
78
- const page = _c;
79
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
80
- }
81
- }
82
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
83
- finally {
84
- try {
85
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
86
- }
87
- finally { if (e_1) throw e_1.error; }
88
- }
89
- });
70
+ async *listMonitoredResourcesPagingAll(resourceGroupName, monitorName, options) {
71
+ for await (const page of this.listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * List all MonitorResource by subscriptionId
@@ -102,52 +86,35 @@ class MonitorsImpl {
102
86
  return this;
103
87
  },
104
88
  byPage: (settings) => {
105
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
89
+ if (settings?.maxPageSize) {
106
90
  throw new Error("maxPageSize is not supported by this operation.");
107
91
  }
108
92
  return this.listBySubscriptionIdPagingPage(options, settings);
109
93
  }
110
94
  };
111
95
  }
112
- listBySubscriptionIdPagingPage(options, settings) {
113
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionIdPagingPage_1() {
114
- let result;
115
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
116
- if (!continuationToken) {
117
- result = yield tslib_1.__await(this._listBySubscriptionId(options));
118
- let page = result.value || [];
119
- continuationToken = result.nextLink;
120
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
121
- yield yield tslib_1.__await(page);
122
- }
123
- while (continuationToken) {
124
- result = yield tslib_1.__await(this._listBySubscriptionIdNext(continuationToken, options));
125
- continuationToken = result.nextLink;
126
- let page = result.value || [];
127
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
128
- yield yield tslib_1.__await(page);
129
- }
130
- });
96
+ async *listBySubscriptionIdPagingPage(options, settings) {
97
+ let result;
98
+ let continuationToken = settings?.continuationToken;
99
+ if (!continuationToken) {
100
+ result = await this._listBySubscriptionId(options);
101
+ let page = result.value || [];
102
+ continuationToken = result.nextLink;
103
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
104
+ yield page;
105
+ }
106
+ while (continuationToken) {
107
+ result = await this._listBySubscriptionIdNext(continuationToken, options);
108
+ continuationToken = result.nextLink;
109
+ let page = result.value || [];
110
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
111
+ yield page;
112
+ }
131
113
  }
132
- listBySubscriptionIdPagingAll(options) {
133
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionIdPagingAll_1() {
134
- var _a, e_2, _b, _c;
135
- try {
136
- for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionIdPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
137
- _c = _f.value;
138
- _d = false;
139
- const page = _c;
140
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
141
- }
142
- }
143
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
144
- finally {
145
- try {
146
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
147
- }
148
- finally { if (e_2) throw e_2.error; }
149
- }
150
- });
114
+ async *listBySubscriptionIdPagingAll(options) {
115
+ for await (const page of this.listBySubscriptionIdPagingPage(options)) {
116
+ yield* page;
117
+ }
151
118
  }
152
119
  /**
153
120
  * List MonitorResource resources by resource group
@@ -164,52 +131,35 @@ class MonitorsImpl {
164
131
  return this;
165
132
  },
166
133
  byPage: (settings) => {
167
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
134
+ if (settings?.maxPageSize) {
168
135
  throw new Error("maxPageSize is not supported by this operation.");
169
136
  }
170
137
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
171
138
  }
172
139
  };
173
140
  }
174
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
175
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
176
- let result;
177
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
178
- if (!continuationToken) {
179
- result = yield tslib_1.__await(this._listByResourceGroup(resourceGroupName, options));
180
- let page = result.value || [];
181
- continuationToken = result.nextLink;
182
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
183
- yield yield tslib_1.__await(page);
184
- }
185
- while (continuationToken) {
186
- result = yield tslib_1.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
187
- continuationToken = result.nextLink;
188
- let page = result.value || [];
189
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
190
- yield yield tslib_1.__await(page);
191
- }
192
- });
141
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
142
+ let result;
143
+ let continuationToken = settings?.continuationToken;
144
+ if (!continuationToken) {
145
+ result = await this._listByResourceGroup(resourceGroupName, options);
146
+ let page = result.value || [];
147
+ continuationToken = result.nextLink;
148
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
149
+ yield page;
150
+ }
151
+ while (continuationToken) {
152
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
153
+ continuationToken = result.nextLink;
154
+ let page = result.value || [];
155
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
156
+ yield page;
157
+ }
193
158
  }
194
- listByResourceGroupPagingAll(resourceGroupName, options) {
195
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
196
- var _a, e_3, _b, _c;
197
- try {
198
- 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) {
199
- _c = _f.value;
200
- _d = false;
201
- const page = _c;
202
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
203
- }
204
- }
205
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
206
- finally {
207
- try {
208
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
209
- }
210
- finally { if (e_3) throw e_3.error; }
211
- }
212
- });
159
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
160
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
161
+ yield* page;
162
+ }
213
163
  }
214
164
  /**
215
165
  * List the VM/VMSS resources currently being monitored by the Dynatrace resource.
@@ -227,52 +177,35 @@ class MonitorsImpl {
227
177
  return this;
228
178
  },
229
179
  byPage: (settings) => {
230
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
180
+ if (settings?.maxPageSize) {
231
181
  throw new Error("maxPageSize is not supported by this operation.");
232
182
  }
233
183
  return this.listHostsPagingPage(resourceGroupName, monitorName, options, settings);
234
184
  }
235
185
  };
236
186
  }
237
- listHostsPagingPage(resourceGroupName, monitorName, options, settings) {
238
- return tslib_1.__asyncGenerator(this, arguments, function* listHostsPagingPage_1() {
239
- let result;
240
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
241
- if (!continuationToken) {
242
- result = yield tslib_1.__await(this._listHosts(resourceGroupName, monitorName, options));
243
- let page = result.value || [];
244
- continuationToken = result.nextLink;
245
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
246
- yield yield tslib_1.__await(page);
247
- }
248
- while (continuationToken) {
249
- result = yield tslib_1.__await(this._listHostsNext(resourceGroupName, monitorName, continuationToken, options));
250
- continuationToken = result.nextLink;
251
- let page = result.value || [];
252
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
253
- yield yield tslib_1.__await(page);
254
- }
255
- });
187
+ async *listHostsPagingPage(resourceGroupName, monitorName, options, settings) {
188
+ let result;
189
+ let continuationToken = settings?.continuationToken;
190
+ if (!continuationToken) {
191
+ result = await this._listHosts(resourceGroupName, monitorName, options);
192
+ let page = result.value || [];
193
+ continuationToken = result.nextLink;
194
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
195
+ yield page;
196
+ }
197
+ while (continuationToken) {
198
+ result = await this._listHostsNext(resourceGroupName, monitorName, continuationToken, options);
199
+ continuationToken = result.nextLink;
200
+ let page = result.value || [];
201
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
202
+ yield page;
203
+ }
256
204
  }
257
- listHostsPagingAll(resourceGroupName, monitorName, options) {
258
- return tslib_1.__asyncGenerator(this, arguments, function* listHostsPagingAll_1() {
259
- var _a, e_4, _b, _c;
260
- try {
261
- for (var _d = true, _e = tslib_1.__asyncValues(this.listHostsPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
262
- _c = _f.value;
263
- _d = false;
264
- const page = _c;
265
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
266
- }
267
- }
268
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
269
- finally {
270
- try {
271
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
272
- }
273
- finally { if (e_4) throw e_4.error; }
274
- }
275
- });
205
+ async *listHostsPagingAll(resourceGroupName, monitorName, options) {
206
+ for await (const page of this.listHostsPagingPage(resourceGroupName, monitorName, options)) {
207
+ yield* page;
208
+ }
276
209
  }
277
210
  /**
278
211
  * Gets list of App Services with Dynatrace PaaS OneAgent enabled
@@ -290,52 +223,35 @@ class MonitorsImpl {
290
223
  return this;
291
224
  },
292
225
  byPage: (settings) => {
293
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
226
+ if (settings?.maxPageSize) {
294
227
  throw new Error("maxPageSize is not supported by this operation.");
295
228
  }
296
229
  return this.listAppServicesPagingPage(resourceGroupName, monitorName, options, settings);
297
230
  }
298
231
  };
299
232
  }
300
- listAppServicesPagingPage(resourceGroupName, monitorName, options, settings) {
301
- return tslib_1.__asyncGenerator(this, arguments, function* listAppServicesPagingPage_1() {
302
- let result;
303
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
304
- if (!continuationToken) {
305
- result = yield tslib_1.__await(this._listAppServices(resourceGroupName, monitorName, options));
306
- let page = result.value || [];
307
- continuationToken = result.nextLink;
308
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
309
- yield yield tslib_1.__await(page);
310
- }
311
- while (continuationToken) {
312
- result = yield tslib_1.__await(this._listAppServicesNext(resourceGroupName, monitorName, continuationToken, options));
313
- continuationToken = result.nextLink;
314
- let page = result.value || [];
315
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
316
- yield yield tslib_1.__await(page);
317
- }
318
- });
233
+ async *listAppServicesPagingPage(resourceGroupName, monitorName, options, settings) {
234
+ let result;
235
+ let continuationToken = settings?.continuationToken;
236
+ if (!continuationToken) {
237
+ result = await this._listAppServices(resourceGroupName, monitorName, options);
238
+ let page = result.value || [];
239
+ continuationToken = result.nextLink;
240
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
241
+ yield page;
242
+ }
243
+ while (continuationToken) {
244
+ result = await this._listAppServicesNext(resourceGroupName, monitorName, continuationToken, options);
245
+ continuationToken = result.nextLink;
246
+ let page = result.value || [];
247
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
248
+ yield page;
249
+ }
319
250
  }
320
- listAppServicesPagingAll(resourceGroupName, monitorName, options) {
321
- return tslib_1.__asyncGenerator(this, arguments, function* listAppServicesPagingAll_1() {
322
- var _a, e_5, _b, _c;
323
- try {
324
- for (var _d = true, _e = tslib_1.__asyncValues(this.listAppServicesPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
325
- _c = _f.value;
326
- _d = false;
327
- const page = _c;
328
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
329
- }
330
- }
331
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
332
- finally {
333
- try {
334
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
335
- }
336
- finally { if (e_5) throw e_5.error; }
337
- }
338
- });
251
+ async *listAppServicesPagingAll(resourceGroupName, monitorName, options) {
252
+ for await (const page of this.listAppServicesPagingPage(resourceGroupName, monitorName, options)) {
253
+ yield* page;
254
+ }
339
255
  }
340
256
  /**
341
257
  * Gets all the Dynatrace environments that a user can link a azure resource to
@@ -354,52 +270,35 @@ class MonitorsImpl {
354
270
  return this;
355
271
  },
356
272
  byPage: (settings) => {
357
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
273
+ if (settings?.maxPageSize) {
358
274
  throw new Error("maxPageSize is not supported by this operation.");
359
275
  }
360
276
  return this.listLinkableEnvironmentsPagingPage(resourceGroupName, monitorName, request, options, settings);
361
277
  }
362
278
  };
363
279
  }
364
- listLinkableEnvironmentsPagingPage(resourceGroupName, monitorName, request, options, settings) {
365
- return tslib_1.__asyncGenerator(this, arguments, function* listLinkableEnvironmentsPagingPage_1() {
366
- let result;
367
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
368
- if (!continuationToken) {
369
- result = yield tslib_1.__await(this._listLinkableEnvironments(resourceGroupName, monitorName, request, options));
370
- let page = result.value || [];
371
- continuationToken = result.nextLink;
372
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
373
- yield yield tslib_1.__await(page);
374
- }
375
- while (continuationToken) {
376
- result = yield tslib_1.__await(this._listLinkableEnvironmentsNext(resourceGroupName, monitorName, request, continuationToken, options));
377
- continuationToken = result.nextLink;
378
- let page = result.value || [];
379
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
380
- yield yield tslib_1.__await(page);
381
- }
382
- });
280
+ async *listLinkableEnvironmentsPagingPage(resourceGroupName, monitorName, request, options, settings) {
281
+ let result;
282
+ let continuationToken = settings?.continuationToken;
283
+ if (!continuationToken) {
284
+ result = await this._listLinkableEnvironments(resourceGroupName, monitorName, request, options);
285
+ let page = result.value || [];
286
+ continuationToken = result.nextLink;
287
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
288
+ yield page;
289
+ }
290
+ while (continuationToken) {
291
+ result = await this._listLinkableEnvironmentsNext(resourceGroupName, monitorName, request, continuationToken, options);
292
+ continuationToken = result.nextLink;
293
+ let page = result.value || [];
294
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
295
+ yield page;
296
+ }
383
297
  }
384
- listLinkableEnvironmentsPagingAll(resourceGroupName, monitorName, request, options) {
385
- return tslib_1.__asyncGenerator(this, arguments, function* listLinkableEnvironmentsPagingAll_1() {
386
- var _a, e_6, _b, _c;
387
- try {
388
- for (var _d = true, _e = tslib_1.__asyncValues(this.listLinkableEnvironmentsPagingPage(resourceGroupName, monitorName, request, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
389
- _c = _f.value;
390
- _d = false;
391
- const page = _c;
392
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
393
- }
394
- }
395
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
396
- finally {
397
- try {
398
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
399
- }
400
- finally { if (e_6) throw e_6.error; }
401
- }
402
- });
298
+ async *listLinkableEnvironmentsPagingAll(resourceGroupName, monitorName, request, options) {
299
+ for await (const page of this.listLinkableEnvironmentsPagingPage(resourceGroupName, monitorName, request, options)) {
300
+ yield* page;
301
+ }
403
302
  }
404
303
  /**
405
304
  * List the resources currently being monitored by the Dynatrace monitor resource.
@@ -441,14 +340,19 @@ class MonitorsImpl {
441
340
  return this.client.sendOperationRequest(args, spec);
442
341
  };
443
342
  const sendOperationFn = async (args, spec) => {
444
- var _a;
445
343
  let currentRawResponse = undefined;
446
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
344
+ const providedCallback = args.options?.onResponse;
447
345
  const callback = (rawResponse, flatResponse) => {
448
346
  currentRawResponse = rawResponse;
449
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
347
+ providedCallback?.(rawResponse, flatResponse);
348
+ };
349
+ const updatedArgs = {
350
+ ...args,
351
+ options: {
352
+ ...args.options,
353
+ onResponse: callback
354
+ }
450
355
  };
451
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
452
356
  const flatResponse = await directSendOperation(updatedArgs, spec);
453
357
  return {
454
358
  flatResponse,
@@ -465,8 +369,8 @@ class MonitorsImpl {
465
369
  spec: createOrUpdateOperationSpec
466
370
  });
467
371
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
468
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
469
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
372
+ restoreFrom: options?.resumeFrom,
373
+ intervalInMs: options?.updateIntervalInMs,
470
374
  resourceLocationConfig: "azure-async-operation"
471
375
  });
472
376
  await poller.poll();
@@ -504,14 +408,19 @@ class MonitorsImpl {
504
408
  return this.client.sendOperationRequest(args, spec);
505
409
  };
506
410
  const sendOperationFn = async (args, spec) => {
507
- var _a;
508
411
  let currentRawResponse = undefined;
509
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
412
+ const providedCallback = args.options?.onResponse;
510
413
  const callback = (rawResponse, flatResponse) => {
511
414
  currentRawResponse = rawResponse;
512
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
415
+ providedCallback?.(rawResponse, flatResponse);
416
+ };
417
+ const updatedArgs = {
418
+ ...args,
419
+ options: {
420
+ ...args.options,
421
+ onResponse: callback
422
+ }
513
423
  };
514
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
515
424
  const flatResponse = await directSendOperation(updatedArgs, spec);
516
425
  return {
517
426
  flatResponse,
@@ -528,8 +437,8 @@ class MonitorsImpl {
528
437
  spec: deleteOperationSpec
529
438
  });
530
439
  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,
440
+ restoreFrom: options?.resumeFrom,
441
+ intervalInMs: options?.updateIntervalInMs,
533
442
  resourceLocationConfig: "azure-async-operation"
534
443
  });
535
444
  await poller.poll();