@azure/arm-datadog 3.1.0-alpha.20250717.1 → 3.1.0-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 (83) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/microsoftDatadogClient.js +20 -5
  4. package/dist/browser/microsoftDatadogClient.js.map +1 -1
  5. package/dist/browser/operations/creationSupported.js +10 -27
  6. package/dist/browser/operations/creationSupported.js.map +1 -1
  7. package/dist/browser/operations/marketplaceAgreements.js +23 -40
  8. package/dist/browser/operations/marketplaceAgreements.js.map +1 -1
  9. package/dist/browser/operations/monitoredSubscriptions.js +43 -45
  10. package/dist/browser/operations/monitoredSubscriptions.js.map +1 -1
  11. package/dist/browser/operations/monitors.js +166 -253
  12. package/dist/browser/operations/monitors.js.map +1 -1
  13. package/dist/browser/operations/operations.js +23 -40
  14. package/dist/browser/operations/operations.js.map +1 -1
  15. package/dist/browser/operations/singleSignOnConfigurations.js +34 -46
  16. package/dist/browser/operations/singleSignOnConfigurations.js.map +1 -1
  17. package/dist/browser/operations/tagRules.js +23 -40
  18. package/dist/browser/operations/tagRules.js.map +1 -1
  19. package/dist/browser/pagingHelper.js +2 -4
  20. package/dist/browser/pagingHelper.js.map +1 -1
  21. package/dist/commonjs/lroImpl.js +7 -3
  22. package/dist/commonjs/lroImpl.js.map +1 -1
  23. package/dist/commonjs/microsoftDatadogClient.js +20 -5
  24. package/dist/commonjs/microsoftDatadogClient.js.map +1 -1
  25. package/dist/commonjs/operations/creationSupported.js +10 -26
  26. package/dist/commonjs/operations/creationSupported.js.map +1 -1
  27. package/dist/commonjs/operations/marketplaceAgreements.js +23 -39
  28. package/dist/commonjs/operations/marketplaceAgreements.js.map +1 -1
  29. package/dist/commonjs/operations/monitoredSubscriptions.js +43 -44
  30. package/dist/commonjs/operations/monitoredSubscriptions.js.map +1 -1
  31. package/dist/commonjs/operations/monitors.js +166 -252
  32. package/dist/commonjs/operations/monitors.js.map +1 -1
  33. package/dist/commonjs/operations/operations.js +23 -39
  34. package/dist/commonjs/operations/operations.js.map +1 -1
  35. package/dist/commonjs/operations/singleSignOnConfigurations.js +34 -45
  36. package/dist/commonjs/operations/singleSignOnConfigurations.js.map +1 -1
  37. package/dist/commonjs/operations/tagRules.js +23 -39
  38. package/dist/commonjs/operations/tagRules.js.map +1 -1
  39. package/dist/commonjs/pagingHelper.js +2 -4
  40. package/dist/commonjs/pagingHelper.js.map +1 -1
  41. package/dist/commonjs/tsdoc-metadata.json +11 -11
  42. package/dist/esm/lroImpl.js +7 -3
  43. package/dist/esm/lroImpl.js.map +1 -1
  44. package/dist/esm/microsoftDatadogClient.js +20 -5
  45. package/dist/esm/microsoftDatadogClient.js.map +1 -1
  46. package/dist/esm/operations/creationSupported.js +10 -27
  47. package/dist/esm/operations/creationSupported.js.map +1 -1
  48. package/dist/esm/operations/marketplaceAgreements.js +23 -40
  49. package/dist/esm/operations/marketplaceAgreements.js.map +1 -1
  50. package/dist/esm/operations/monitoredSubscriptions.js +43 -45
  51. package/dist/esm/operations/monitoredSubscriptions.js.map +1 -1
  52. package/dist/esm/operations/monitors.js +166 -253
  53. package/dist/esm/operations/monitors.js.map +1 -1
  54. package/dist/esm/operations/operations.js +23 -40
  55. package/dist/esm/operations/operations.js.map +1 -1
  56. package/dist/esm/operations/singleSignOnConfigurations.js +34 -46
  57. package/dist/esm/operations/singleSignOnConfigurations.js.map +1 -1
  58. package/dist/esm/operations/tagRules.js +23 -40
  59. package/dist/esm/operations/tagRules.js.map +1 -1
  60. package/dist/esm/pagingHelper.js +2 -4
  61. package/dist/esm/pagingHelper.js.map +1 -1
  62. package/dist/react-native/lroImpl.js +7 -3
  63. package/dist/react-native/lroImpl.js.map +1 -1
  64. package/dist/react-native/microsoftDatadogClient.js +20 -5
  65. package/dist/react-native/microsoftDatadogClient.js.map +1 -1
  66. package/dist/react-native/operations/creationSupported.js +10 -27
  67. package/dist/react-native/operations/creationSupported.js.map +1 -1
  68. package/dist/react-native/operations/marketplaceAgreements.js +23 -40
  69. package/dist/react-native/operations/marketplaceAgreements.js.map +1 -1
  70. package/dist/react-native/operations/monitoredSubscriptions.js +43 -45
  71. package/dist/react-native/operations/monitoredSubscriptions.js.map +1 -1
  72. package/dist/react-native/operations/monitors.js +166 -253
  73. package/dist/react-native/operations/monitors.js.map +1 -1
  74. package/dist/react-native/operations/operations.js +23 -40
  75. package/dist/react-native/operations/operations.js.map +1 -1
  76. package/dist/react-native/operations/singleSignOnConfigurations.js +34 -46
  77. package/dist/react-native/operations/singleSignOnConfigurations.js.map +1 -1
  78. package/dist/react-native/operations/tagRules.js +23 -40
  79. package/dist/react-native/operations/tagRules.js.map +1 -1
  80. package/dist/react-native/pagingHelper.js +2 -4
  81. package/dist/react-native/pagingHelper.js.map +1 -1
  82. package/package.json +2 -2
  83. package/review/arm-datadog-node.api.md +867 -867
@@ -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 Monitors operations. */
17
16
  export class MonitorsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Monitors class.
20
20
  * @param client Reference to the service client
@@ -38,52 +38,35 @@ export class MonitorsImpl {
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.listApiKeysPagingPage(resourceGroupName, monitorName, options, settings);
45
45
  }
46
46
  };
47
47
  }
48
- listApiKeysPagingPage(resourceGroupName, monitorName, options, settings) {
49
- return __asyncGenerator(this, arguments, function* listApiKeysPagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield __await(this._listApiKeys(resourceGroupName, monitorName, options));
54
- let page = result.value || [];
55
- continuationToken = result.nextLink;
56
- setContinuationToken(page, continuationToken);
57
- yield yield __await(page);
58
- }
59
- while (continuationToken) {
60
- result = yield __await(this._listApiKeysNext(resourceGroupName, monitorName, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- setContinuationToken(page, continuationToken);
64
- yield yield __await(page);
65
- }
66
- });
48
+ async *listApiKeysPagingPage(resourceGroupName, monitorName, options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._listApiKeys(resourceGroupName, monitorName, options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ setContinuationToken(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listApiKeysNext(resourceGroupName, monitorName, continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ setContinuationToken(page, continuationToken);
63
+ yield page;
64
+ }
67
65
  }
68
- listApiKeysPagingAll(resourceGroupName, monitorName, options) {
69
- return __asyncGenerator(this, arguments, function* listApiKeysPagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = __asyncValues(this.listApiKeysPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
73
- _c = _f.value;
74
- _d = false;
75
- const page = _c;
76
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
77
- }
78
- }
79
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
80
- finally {
81
- try {
82
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
83
- }
84
- finally { if (e_1) throw e_1.error; }
85
- }
86
- });
66
+ async *listApiKeysPagingAll(resourceGroupName, monitorName, options) {
67
+ for await (const page of this.listApiKeysPagingPage(resourceGroupName, monitorName, options)) {
68
+ yield* page;
69
+ }
87
70
  }
88
71
  /**
89
72
  * List the hosts for a given monitor resource.
@@ -101,52 +84,35 @@ export class MonitorsImpl {
101
84
  return this;
102
85
  },
103
86
  byPage: (settings) => {
104
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
87
+ if (settings?.maxPageSize) {
105
88
  throw new Error("maxPageSize is not supported by this operation.");
106
89
  }
107
90
  return this.listHostsPagingPage(resourceGroupName, monitorName, options, settings);
108
91
  }
109
92
  };
110
93
  }
111
- listHostsPagingPage(resourceGroupName, monitorName, options, settings) {
112
- return __asyncGenerator(this, arguments, function* listHostsPagingPage_1() {
113
- let result;
114
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
115
- if (!continuationToken) {
116
- result = yield __await(this._listHosts(resourceGroupName, monitorName, options));
117
- let page = result.value || [];
118
- continuationToken = result.nextLink;
119
- setContinuationToken(page, continuationToken);
120
- yield yield __await(page);
121
- }
122
- while (continuationToken) {
123
- result = yield __await(this._listHostsNext(resourceGroupName, monitorName, continuationToken, options));
124
- continuationToken = result.nextLink;
125
- let page = result.value || [];
126
- setContinuationToken(page, continuationToken);
127
- yield yield __await(page);
128
- }
129
- });
94
+ async *listHostsPagingPage(resourceGroupName, monitorName, options, settings) {
95
+ let result;
96
+ let continuationToken = settings?.continuationToken;
97
+ if (!continuationToken) {
98
+ result = await this._listHosts(resourceGroupName, monitorName, options);
99
+ let page = result.value || [];
100
+ continuationToken = result.nextLink;
101
+ setContinuationToken(page, continuationToken);
102
+ yield page;
103
+ }
104
+ while (continuationToken) {
105
+ result = await this._listHostsNext(resourceGroupName, monitorName, continuationToken, options);
106
+ continuationToken = result.nextLink;
107
+ let page = result.value || [];
108
+ setContinuationToken(page, continuationToken);
109
+ yield page;
110
+ }
130
111
  }
131
- listHostsPagingAll(resourceGroupName, monitorName, options) {
132
- return __asyncGenerator(this, arguments, function* listHostsPagingAll_1() {
133
- var _a, e_2, _b, _c;
134
- try {
135
- for (var _d = true, _e = __asyncValues(this.listHostsPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
136
- _c = _f.value;
137
- _d = false;
138
- const page = _c;
139
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
140
- }
141
- }
142
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
143
- finally {
144
- try {
145
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
146
- }
147
- finally { if (e_2) throw e_2.error; }
148
- }
149
- });
112
+ async *listHostsPagingAll(resourceGroupName, monitorName, options) {
113
+ for await (const page of this.listHostsPagingPage(resourceGroupName, monitorName, options)) {
114
+ yield* page;
115
+ }
150
116
  }
151
117
  /**
152
118
  * List all Azure resources associated to the same Datadog organization as the target resource.
@@ -164,52 +130,35 @@ export class MonitorsImpl {
164
130
  return this;
165
131
  },
166
132
  byPage: (settings) => {
167
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
133
+ if (settings?.maxPageSize) {
168
134
  throw new Error("maxPageSize is not supported by this operation.");
169
135
  }
170
136
  return this.listLinkedResourcesPagingPage(resourceGroupName, monitorName, options, settings);
171
137
  }
172
138
  };
173
139
  }
174
- listLinkedResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
175
- return __asyncGenerator(this, arguments, function* listLinkedResourcesPagingPage_1() {
176
- let result;
177
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
178
- if (!continuationToken) {
179
- result = yield __await(this._listLinkedResources(resourceGroupName, monitorName, options));
180
- let page = result.value || [];
181
- continuationToken = result.nextLink;
182
- setContinuationToken(page, continuationToken);
183
- yield yield __await(page);
184
- }
185
- while (continuationToken) {
186
- result = yield __await(this._listLinkedResourcesNext(resourceGroupName, monitorName, continuationToken, options));
187
- continuationToken = result.nextLink;
188
- let page = result.value || [];
189
- setContinuationToken(page, continuationToken);
190
- yield yield __await(page);
191
- }
192
- });
140
+ async *listLinkedResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
141
+ let result;
142
+ let continuationToken = settings?.continuationToken;
143
+ if (!continuationToken) {
144
+ result = await this._listLinkedResources(resourceGroupName, monitorName, options);
145
+ let page = result.value || [];
146
+ continuationToken = result.nextLink;
147
+ setContinuationToken(page, continuationToken);
148
+ yield page;
149
+ }
150
+ while (continuationToken) {
151
+ result = await this._listLinkedResourcesNext(resourceGroupName, monitorName, continuationToken, options);
152
+ continuationToken = result.nextLink;
153
+ let page = result.value || [];
154
+ setContinuationToken(page, continuationToken);
155
+ yield page;
156
+ }
193
157
  }
194
- listLinkedResourcesPagingAll(resourceGroupName, monitorName, options) {
195
- return __asyncGenerator(this, arguments, function* listLinkedResourcesPagingAll_1() {
196
- var _a, e_3, _b, _c;
197
- try {
198
- for (var _d = true, _e = __asyncValues(this.listLinkedResourcesPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
199
- _c = _f.value;
200
- _d = false;
201
- const page = _c;
202
- yield __await(yield* __asyncDelegator(__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 __await(_b.call(_e));
209
- }
210
- finally { if (e_3) throw e_3.error; }
211
- }
212
- });
158
+ async *listLinkedResourcesPagingAll(resourceGroupName, monitorName, options) {
159
+ for await (const page of this.listLinkedResourcesPagingPage(resourceGroupName, monitorName, options)) {
160
+ yield* page;
161
+ }
213
162
  }
214
163
  /**
215
164
  * List the resources currently being monitored by the Datadog monitor resource.
@@ -227,52 +176,35 @@ export class MonitorsImpl {
227
176
  return this;
228
177
  },
229
178
  byPage: (settings) => {
230
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
179
+ if (settings?.maxPageSize) {
231
180
  throw new Error("maxPageSize is not supported by this operation.");
232
181
  }
233
182
  return this.listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings);
234
183
  }
235
184
  };
236
185
  }
237
- listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
238
- return __asyncGenerator(this, arguments, function* listMonitoredResourcesPagingPage_1() {
239
- let result;
240
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
241
- if (!continuationToken) {
242
- result = yield __await(this._listMonitoredResources(resourceGroupName, monitorName, options));
243
- let page = result.value || [];
244
- continuationToken = result.nextLink;
245
- setContinuationToken(page, continuationToken);
246
- yield yield __await(page);
247
- }
248
- while (continuationToken) {
249
- result = yield __await(this._listMonitoredResourcesNext(resourceGroupName, monitorName, continuationToken, options));
250
- continuationToken = result.nextLink;
251
- let page = result.value || [];
252
- setContinuationToken(page, continuationToken);
253
- yield yield __await(page);
254
- }
255
- });
186
+ async *listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
187
+ let result;
188
+ let continuationToken = settings?.continuationToken;
189
+ if (!continuationToken) {
190
+ result = await this._listMonitoredResources(resourceGroupName, monitorName, options);
191
+ let page = result.value || [];
192
+ continuationToken = result.nextLink;
193
+ setContinuationToken(page, continuationToken);
194
+ yield page;
195
+ }
196
+ while (continuationToken) {
197
+ result = await this._listMonitoredResourcesNext(resourceGroupName, monitorName, continuationToken, options);
198
+ continuationToken = result.nextLink;
199
+ let page = result.value || [];
200
+ setContinuationToken(page, continuationToken);
201
+ yield page;
202
+ }
256
203
  }
257
- listMonitoredResourcesPagingAll(resourceGroupName, monitorName, options) {
258
- return __asyncGenerator(this, arguments, function* listMonitoredResourcesPagingAll_1() {
259
- var _a, e_4, _b, _c;
260
- try {
261
- for (var _d = true, _e = __asyncValues(this.listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
262
- _c = _f.value;
263
- _d = false;
264
- const page = _c;
265
- yield __await(yield* __asyncDelegator(__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 __await(_b.call(_e));
272
- }
273
- finally { if (e_4) throw e_4.error; }
274
- }
275
- });
204
+ async *listMonitoredResourcesPagingAll(resourceGroupName, monitorName, options) {
205
+ for await (const page of this.listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options)) {
206
+ yield* page;
207
+ }
276
208
  }
277
209
  /**
278
210
  * List all monitors under the specified subscription.
@@ -288,52 +220,35 @@ export class MonitorsImpl {
288
220
  return this;
289
221
  },
290
222
  byPage: (settings) => {
291
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
223
+ if (settings?.maxPageSize) {
292
224
  throw new Error("maxPageSize is not supported by this operation.");
293
225
  }
294
226
  return this.listPagingPage(options, settings);
295
227
  }
296
228
  };
297
229
  }
298
- listPagingPage(options, settings) {
299
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
300
- let result;
301
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
302
- if (!continuationToken) {
303
- result = yield __await(this._list(options));
304
- let page = result.value || [];
305
- continuationToken = result.nextLink;
306
- setContinuationToken(page, continuationToken);
307
- yield yield __await(page);
308
- }
309
- while (continuationToken) {
310
- result = yield __await(this._listNext(continuationToken, options));
311
- continuationToken = result.nextLink;
312
- let page = result.value || [];
313
- setContinuationToken(page, continuationToken);
314
- yield yield __await(page);
315
- }
316
- });
230
+ async *listPagingPage(options, settings) {
231
+ let result;
232
+ let continuationToken = settings?.continuationToken;
233
+ if (!continuationToken) {
234
+ result = await this._list(options);
235
+ let page = result.value || [];
236
+ continuationToken = result.nextLink;
237
+ setContinuationToken(page, continuationToken);
238
+ yield page;
239
+ }
240
+ while (continuationToken) {
241
+ result = await this._listNext(continuationToken, options);
242
+ continuationToken = result.nextLink;
243
+ let page = result.value || [];
244
+ setContinuationToken(page, continuationToken);
245
+ yield page;
246
+ }
317
247
  }
318
- listPagingAll(options) {
319
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
320
- var _a, e_5, _b, _c;
321
- try {
322
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
323
- _c = _f.value;
324
- _d = false;
325
- const page = _c;
326
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
327
- }
328
- }
329
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
330
- finally {
331
- try {
332
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
333
- }
334
- finally { if (e_5) throw e_5.error; }
335
- }
336
- });
248
+ async *listPagingAll(options) {
249
+ for await (const page of this.listPagingPage(options)) {
250
+ yield* page;
251
+ }
337
252
  }
338
253
  /**
339
254
  * List all monitors under the specified resource group.
@@ -350,52 +265,35 @@ export class MonitorsImpl {
350
265
  return this;
351
266
  },
352
267
  byPage: (settings) => {
353
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
268
+ if (settings?.maxPageSize) {
354
269
  throw new Error("maxPageSize is not supported by this operation.");
355
270
  }
356
271
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
357
272
  }
358
273
  };
359
274
  }
360
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
361
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
362
- let result;
363
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
364
- if (!continuationToken) {
365
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
366
- let page = result.value || [];
367
- continuationToken = result.nextLink;
368
- setContinuationToken(page, continuationToken);
369
- yield yield __await(page);
370
- }
371
- while (continuationToken) {
372
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
373
- continuationToken = result.nextLink;
374
- let page = result.value || [];
375
- setContinuationToken(page, continuationToken);
376
- yield yield __await(page);
377
- }
378
- });
275
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
276
+ let result;
277
+ let continuationToken = settings?.continuationToken;
278
+ if (!continuationToken) {
279
+ result = await this._listByResourceGroup(resourceGroupName, options);
280
+ let page = result.value || [];
281
+ continuationToken = result.nextLink;
282
+ setContinuationToken(page, continuationToken);
283
+ yield page;
284
+ }
285
+ while (continuationToken) {
286
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
287
+ continuationToken = result.nextLink;
288
+ let page = result.value || [];
289
+ setContinuationToken(page, continuationToken);
290
+ yield page;
291
+ }
379
292
  }
380
- listByResourceGroupPagingAll(resourceGroupName, options) {
381
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
382
- var _a, e_6, _b, _c;
383
- try {
384
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
385
- _c = _f.value;
386
- _d = false;
387
- const page = _c;
388
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
389
- }
390
- }
391
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
392
- finally {
393
- try {
394
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
395
- }
396
- finally { if (e_6) throw e_6.error; }
397
- }
398
- });
293
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
294
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
295
+ yield* page;
296
+ }
399
297
  }
400
298
  /**
401
299
  * List the api keys for a given monitor resource.
@@ -486,14 +384,19 @@ export class MonitorsImpl {
486
384
  return this.client.sendOperationRequest(args, spec);
487
385
  };
488
386
  const sendOperationFn = async (args, spec) => {
489
- var _a;
490
387
  let currentRawResponse = undefined;
491
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
388
+ const providedCallback = args.options?.onResponse;
492
389
  const callback = (rawResponse, flatResponse) => {
493
390
  currentRawResponse = rawResponse;
494
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
391
+ providedCallback?.(rawResponse, flatResponse);
392
+ };
393
+ const updatedArgs = {
394
+ ...args,
395
+ options: {
396
+ ...args.options,
397
+ onResponse: callback
398
+ }
495
399
  };
496
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
497
400
  const flatResponse = await directSendOperation(updatedArgs, spec);
498
401
  return {
499
402
  flatResponse,
@@ -510,8 +413,8 @@ export class MonitorsImpl {
510
413
  spec: createOperationSpec
511
414
  });
512
415
  const poller = await createHttpPoller(lro, {
513
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
514
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
416
+ restoreFrom: options?.resumeFrom,
417
+ intervalInMs: options?.updateIntervalInMs,
515
418
  resourceLocationConfig: "azure-async-operation"
516
419
  });
517
420
  await poller.poll();
@@ -538,14 +441,19 @@ export class MonitorsImpl {
538
441
  return this.client.sendOperationRequest(args, spec);
539
442
  };
540
443
  const sendOperationFn = async (args, spec) => {
541
- var _a;
542
444
  let currentRawResponse = undefined;
543
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
445
+ const providedCallback = args.options?.onResponse;
544
446
  const callback = (rawResponse, flatResponse) => {
545
447
  currentRawResponse = rawResponse;
546
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
448
+ providedCallback?.(rawResponse, flatResponse);
449
+ };
450
+ const updatedArgs = {
451
+ ...args,
452
+ options: {
453
+ ...args.options,
454
+ onResponse: callback
455
+ }
547
456
  };
548
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
549
457
  const flatResponse = await directSendOperation(updatedArgs, spec);
550
458
  return {
551
459
  flatResponse,
@@ -562,8 +470,8 @@ export class MonitorsImpl {
562
470
  spec: updateOperationSpec
563
471
  });
564
472
  const poller = await createHttpPoller(lro, {
565
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
566
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
473
+ restoreFrom: options?.resumeFrom,
474
+ intervalInMs: options?.updateIntervalInMs
567
475
  });
568
476
  await poller.poll();
569
477
  return poller;
@@ -589,14 +497,19 @@ export class MonitorsImpl {
589
497
  return this.client.sendOperationRequest(args, spec);
590
498
  };
591
499
  const sendOperationFn = async (args, spec) => {
592
- var _a;
593
500
  let currentRawResponse = undefined;
594
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
501
+ const providedCallback = args.options?.onResponse;
595
502
  const callback = (rawResponse, flatResponse) => {
596
503
  currentRawResponse = rawResponse;
597
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
504
+ providedCallback?.(rawResponse, flatResponse);
505
+ };
506
+ const updatedArgs = {
507
+ ...args,
508
+ options: {
509
+ ...args.options,
510
+ onResponse: callback
511
+ }
598
512
  };
599
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
600
513
  const flatResponse = await directSendOperation(updatedArgs, spec);
601
514
  return {
602
515
  flatResponse,
@@ -613,8 +526,8 @@ export class MonitorsImpl {
613
526
  spec: deleteOperationSpec
614
527
  });
615
528
  const poller = await createHttpPoller(lro, {
616
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
617
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
529
+ restoreFrom: options?.resumeFrom,
530
+ intervalInMs: options?.updateIntervalInMs
618
531
  });
619
532
  await poller.poll();
620
533
  return poller;