@azure/arm-monitor 8.0.0-alpha.20250619.1 → 8.0.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 (291) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +449 -195
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/monitorClient.js +55 -11
  6. package/dist/browser/monitorClient.js.map +1 -1
  7. package/dist/browser/operations/actionGroups.js +30 -59
  8. package/dist/browser/operations/actionGroups.js.map +1 -1
  9. package/dist/browser/operations/activityLogAlerts.js +45 -79
  10. package/dist/browser/operations/activityLogAlerts.js.map +1 -1
  11. package/dist/browser/operations/activityLogs.js +23 -40
  12. package/dist/browser/operations/activityLogs.js.map +1 -1
  13. package/dist/browser/operations/alertRuleIncidents.js +10 -27
  14. package/dist/browser/operations/alertRuleIncidents.js.map +1 -1
  15. package/dist/browser/operations/alertRules.js +19 -53
  16. package/dist/browser/operations/alertRules.js.map +1 -1
  17. package/dist/browser/operations/autoscaleSettings.js +45 -79
  18. package/dist/browser/operations/autoscaleSettings.js.map +1 -1
  19. package/dist/browser/operations/azureMonitorWorkspaces.js +56 -85
  20. package/dist/browser/operations/azureMonitorWorkspaces.js.map +1 -1
  21. package/dist/browser/operations/baselines.js +10 -27
  22. package/dist/browser/operations/baselines.js.map +1 -1
  23. package/dist/browser/operations/dataCollectionEndpoints.js +45 -79
  24. package/dist/browser/operations/dataCollectionEndpoints.js.map +1 -1
  25. package/dist/browser/operations/dataCollectionRuleAssociations.js +67 -118
  26. package/dist/browser/operations/dataCollectionRuleAssociations.js.map +1 -1
  27. package/dist/browser/operations/dataCollectionRules.js +45 -79
  28. package/dist/browser/operations/dataCollectionRules.js.map +1 -1
  29. package/dist/browser/operations/diagnosticSettings.js +10 -27
  30. package/dist/browser/operations/diagnosticSettings.js.map +1 -1
  31. package/dist/browser/operations/diagnosticSettingsCategory.js +10 -27
  32. package/dist/browser/operations/diagnosticSettingsCategory.js.map +1 -1
  33. package/dist/browser/operations/eventCategories.js +10 -27
  34. package/dist/browser/operations/eventCategories.js.map +1 -1
  35. package/dist/browser/operations/logProfiles.js +10 -27
  36. package/dist/browser/operations/logProfiles.js.map +1 -1
  37. package/dist/browser/operations/metricAlerts.js +19 -53
  38. package/dist/browser/operations/metricAlerts.js.map +1 -1
  39. package/dist/browser/operations/metricAlertsStatus.js +1 -0
  40. package/dist/browser/operations/metricAlertsStatus.js.map +1 -1
  41. package/dist/browser/operations/metricDefinitions.js +19 -53
  42. package/dist/browser/operations/metricDefinitions.js.map +1 -1
  43. package/dist/browser/operations/metricNamespaces.js +10 -27
  44. package/dist/browser/operations/metricNamespaces.js.map +1 -1
  45. package/dist/browser/operations/metricsOperations.js +1 -0
  46. package/dist/browser/operations/metricsOperations.js.map +1 -1
  47. package/dist/browser/operations/monitorOperations.js +23 -40
  48. package/dist/browser/operations/monitorOperations.js.map +1 -1
  49. package/dist/browser/operations/operations.js +1 -0
  50. package/dist/browser/operations/operations.js.map +1 -1
  51. package/dist/browser/operations/predictiveMetric.js +1 -0
  52. package/dist/browser/operations/predictiveMetric.js.map +1 -1
  53. package/dist/browser/operations/privateEndpointConnections.js +23 -12
  54. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  55. package/dist/browser/operations/privateLinkResources.js +1 -0
  56. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  57. package/dist/browser/operations/privateLinkScopeOperationStatus.js +1 -0
  58. package/dist/browser/operations/privateLinkScopeOperationStatus.js.map +1 -1
  59. package/dist/browser/operations/privateLinkScopedResources.js +45 -52
  60. package/dist/browser/operations/privateLinkScopedResources.js.map +1 -1
  61. package/dist/browser/operations/privateLinkScopes.js +56 -85
  62. package/dist/browser/operations/privateLinkScopes.js.map +1 -1
  63. package/dist/browser/operations/scheduledQueryRules.js +45 -79
  64. package/dist/browser/operations/scheduledQueryRules.js.map +1 -1
  65. package/dist/browser/operations/tenantActionGroups.js +10 -27
  66. package/dist/browser/operations/tenantActionGroups.js.map +1 -1
  67. package/dist/browser/operations/tenantActivityLogs.js +23 -40
  68. package/dist/browser/operations/tenantActivityLogs.js.map +1 -1
  69. package/dist/browser/operations/vMInsights.js +1 -0
  70. package/dist/browser/operations/vMInsights.js.map +1 -1
  71. package/dist/browser/pagingHelper.js +2 -4
  72. package/dist/browser/pagingHelper.js.map +1 -1
  73. package/dist/commonjs/lroImpl.js +7 -3
  74. package/dist/commonjs/lroImpl.js.map +1 -1
  75. package/dist/commonjs/models/mappers.js +449 -195
  76. package/dist/commonjs/models/mappers.js.map +1 -1
  77. package/dist/commonjs/monitorClient.js +55 -11
  78. package/dist/commonjs/monitorClient.js.map +1 -1
  79. package/dist/commonjs/operations/actionGroups.js +30 -58
  80. package/dist/commonjs/operations/actionGroups.js.map +1 -1
  81. package/dist/commonjs/operations/activityLogAlerts.js +45 -78
  82. package/dist/commonjs/operations/activityLogAlerts.js.map +1 -1
  83. package/dist/commonjs/operations/activityLogs.js +23 -39
  84. package/dist/commonjs/operations/activityLogs.js.map +1 -1
  85. package/dist/commonjs/operations/alertRuleIncidents.js +10 -26
  86. package/dist/commonjs/operations/alertRuleIncidents.js.map +1 -1
  87. package/dist/commonjs/operations/alertRules.js +19 -52
  88. package/dist/commonjs/operations/alertRules.js.map +1 -1
  89. package/dist/commonjs/operations/autoscaleSettings.js +45 -78
  90. package/dist/commonjs/operations/autoscaleSettings.js.map +1 -1
  91. package/dist/commonjs/operations/azureMonitorWorkspaces.js +56 -84
  92. package/dist/commonjs/operations/azureMonitorWorkspaces.js.map +1 -1
  93. package/dist/commonjs/operations/baselines.js +10 -26
  94. package/dist/commonjs/operations/baselines.js.map +1 -1
  95. package/dist/commonjs/operations/dataCollectionEndpoints.js +45 -78
  96. package/dist/commonjs/operations/dataCollectionEndpoints.js.map +1 -1
  97. package/dist/commonjs/operations/dataCollectionRuleAssociations.js +67 -117
  98. package/dist/commonjs/operations/dataCollectionRuleAssociations.js.map +1 -1
  99. package/dist/commonjs/operations/dataCollectionRules.js +45 -78
  100. package/dist/commonjs/operations/dataCollectionRules.js.map +1 -1
  101. package/dist/commonjs/operations/diagnosticSettings.js +10 -26
  102. package/dist/commonjs/operations/diagnosticSettings.js.map +1 -1
  103. package/dist/commonjs/operations/diagnosticSettingsCategory.js +10 -26
  104. package/dist/commonjs/operations/diagnosticSettingsCategory.js.map +1 -1
  105. package/dist/commonjs/operations/eventCategories.js +10 -26
  106. package/dist/commonjs/operations/eventCategories.js.map +1 -1
  107. package/dist/commonjs/operations/logProfiles.js +10 -26
  108. package/dist/commonjs/operations/logProfiles.js.map +1 -1
  109. package/dist/commonjs/operations/metricAlerts.js +19 -52
  110. package/dist/commonjs/operations/metricAlerts.js.map +1 -1
  111. package/dist/commonjs/operations/metricAlertsStatus.js +1 -0
  112. package/dist/commonjs/operations/metricAlertsStatus.js.map +1 -1
  113. package/dist/commonjs/operations/metricDefinitions.js +19 -52
  114. package/dist/commonjs/operations/metricDefinitions.js.map +1 -1
  115. package/dist/commonjs/operations/metricNamespaces.js +10 -26
  116. package/dist/commonjs/operations/metricNamespaces.js.map +1 -1
  117. package/dist/commonjs/operations/metricsOperations.js +1 -0
  118. package/dist/commonjs/operations/metricsOperations.js.map +1 -1
  119. package/dist/commonjs/operations/monitorOperations.js +23 -39
  120. package/dist/commonjs/operations/monitorOperations.js.map +1 -1
  121. package/dist/commonjs/operations/operations.js +1 -0
  122. package/dist/commonjs/operations/operations.js.map +1 -1
  123. package/dist/commonjs/operations/predictiveMetric.js +1 -0
  124. package/dist/commonjs/operations/predictiveMetric.js.map +1 -1
  125. package/dist/commonjs/operations/privateEndpointConnections.js +23 -12
  126. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  127. package/dist/commonjs/operations/privateLinkResources.js +1 -0
  128. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  129. package/dist/commonjs/operations/privateLinkScopeOperationStatus.js +1 -0
  130. package/dist/commonjs/operations/privateLinkScopeOperationStatus.js.map +1 -1
  131. package/dist/commonjs/operations/privateLinkScopedResources.js +45 -51
  132. package/dist/commonjs/operations/privateLinkScopedResources.js.map +1 -1
  133. package/dist/commonjs/operations/privateLinkScopes.js +56 -84
  134. package/dist/commonjs/operations/privateLinkScopes.js.map +1 -1
  135. package/dist/commonjs/operations/scheduledQueryRules.js +45 -78
  136. package/dist/commonjs/operations/scheduledQueryRules.js.map +1 -1
  137. package/dist/commonjs/operations/tenantActionGroups.js +10 -26
  138. package/dist/commonjs/operations/tenantActionGroups.js.map +1 -1
  139. package/dist/commonjs/operations/tenantActivityLogs.js +23 -39
  140. package/dist/commonjs/operations/tenantActivityLogs.js.map +1 -1
  141. package/dist/commonjs/operations/vMInsights.js +1 -0
  142. package/dist/commonjs/operations/vMInsights.js.map +1 -1
  143. package/dist/commonjs/pagingHelper.js +2 -4
  144. package/dist/commonjs/pagingHelper.js.map +1 -1
  145. package/dist/commonjs/tsdoc-metadata.json +11 -11
  146. package/dist/esm/lroImpl.js +7 -3
  147. package/dist/esm/lroImpl.js.map +1 -1
  148. package/dist/esm/models/mappers.js +449 -195
  149. package/dist/esm/models/mappers.js.map +1 -1
  150. package/dist/esm/monitorClient.js +55 -11
  151. package/dist/esm/monitorClient.js.map +1 -1
  152. package/dist/esm/operations/actionGroups.js +30 -59
  153. package/dist/esm/operations/actionGroups.js.map +1 -1
  154. package/dist/esm/operations/activityLogAlerts.js +45 -79
  155. package/dist/esm/operations/activityLogAlerts.js.map +1 -1
  156. package/dist/esm/operations/activityLogs.js +23 -40
  157. package/dist/esm/operations/activityLogs.js.map +1 -1
  158. package/dist/esm/operations/alertRuleIncidents.js +10 -27
  159. package/dist/esm/operations/alertRuleIncidents.js.map +1 -1
  160. package/dist/esm/operations/alertRules.js +19 -53
  161. package/dist/esm/operations/alertRules.js.map +1 -1
  162. package/dist/esm/operations/autoscaleSettings.js +45 -79
  163. package/dist/esm/operations/autoscaleSettings.js.map +1 -1
  164. package/dist/esm/operations/azureMonitorWorkspaces.js +56 -85
  165. package/dist/esm/operations/azureMonitorWorkspaces.js.map +1 -1
  166. package/dist/esm/operations/baselines.js +10 -27
  167. package/dist/esm/operations/baselines.js.map +1 -1
  168. package/dist/esm/operations/dataCollectionEndpoints.js +45 -79
  169. package/dist/esm/operations/dataCollectionEndpoints.js.map +1 -1
  170. package/dist/esm/operations/dataCollectionRuleAssociations.js +67 -118
  171. package/dist/esm/operations/dataCollectionRuleAssociations.js.map +1 -1
  172. package/dist/esm/operations/dataCollectionRules.js +45 -79
  173. package/dist/esm/operations/dataCollectionRules.js.map +1 -1
  174. package/dist/esm/operations/diagnosticSettings.js +10 -27
  175. package/dist/esm/operations/diagnosticSettings.js.map +1 -1
  176. package/dist/esm/operations/diagnosticSettingsCategory.js +10 -27
  177. package/dist/esm/operations/diagnosticSettingsCategory.js.map +1 -1
  178. package/dist/esm/operations/eventCategories.js +10 -27
  179. package/dist/esm/operations/eventCategories.js.map +1 -1
  180. package/dist/esm/operations/logProfiles.js +10 -27
  181. package/dist/esm/operations/logProfiles.js.map +1 -1
  182. package/dist/esm/operations/metricAlerts.js +19 -53
  183. package/dist/esm/operations/metricAlerts.js.map +1 -1
  184. package/dist/esm/operations/metricAlertsStatus.js +1 -0
  185. package/dist/esm/operations/metricAlertsStatus.js.map +1 -1
  186. package/dist/esm/operations/metricDefinitions.js +19 -53
  187. package/dist/esm/operations/metricDefinitions.js.map +1 -1
  188. package/dist/esm/operations/metricNamespaces.js +10 -27
  189. package/dist/esm/operations/metricNamespaces.js.map +1 -1
  190. package/dist/esm/operations/metricsOperations.js +1 -0
  191. package/dist/esm/operations/metricsOperations.js.map +1 -1
  192. package/dist/esm/operations/monitorOperations.js +23 -40
  193. package/dist/esm/operations/monitorOperations.js.map +1 -1
  194. package/dist/esm/operations/operations.js +1 -0
  195. package/dist/esm/operations/operations.js.map +1 -1
  196. package/dist/esm/operations/predictiveMetric.js +1 -0
  197. package/dist/esm/operations/predictiveMetric.js.map +1 -1
  198. package/dist/esm/operations/privateEndpointConnections.js +23 -12
  199. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  200. package/dist/esm/operations/privateLinkResources.js +1 -0
  201. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  202. package/dist/esm/operations/privateLinkScopeOperationStatus.js +1 -0
  203. package/dist/esm/operations/privateLinkScopeOperationStatus.js.map +1 -1
  204. package/dist/esm/operations/privateLinkScopedResources.js +45 -52
  205. package/dist/esm/operations/privateLinkScopedResources.js.map +1 -1
  206. package/dist/esm/operations/privateLinkScopes.js +56 -85
  207. package/dist/esm/operations/privateLinkScopes.js.map +1 -1
  208. package/dist/esm/operations/scheduledQueryRules.js +45 -79
  209. package/dist/esm/operations/scheduledQueryRules.js.map +1 -1
  210. package/dist/esm/operations/tenantActionGroups.js +10 -27
  211. package/dist/esm/operations/tenantActionGroups.js.map +1 -1
  212. package/dist/esm/operations/tenantActivityLogs.js +23 -40
  213. package/dist/esm/operations/tenantActivityLogs.js.map +1 -1
  214. package/dist/esm/operations/vMInsights.js +1 -0
  215. package/dist/esm/operations/vMInsights.js.map +1 -1
  216. package/dist/esm/pagingHelper.js +2 -4
  217. package/dist/esm/pagingHelper.js.map +1 -1
  218. package/dist/react-native/lroImpl.js +7 -3
  219. package/dist/react-native/lroImpl.js.map +1 -1
  220. package/dist/react-native/models/mappers.js +449 -195
  221. package/dist/react-native/models/mappers.js.map +1 -1
  222. package/dist/react-native/monitorClient.js +55 -11
  223. package/dist/react-native/monitorClient.js.map +1 -1
  224. package/dist/react-native/operations/actionGroups.js +30 -59
  225. package/dist/react-native/operations/actionGroups.js.map +1 -1
  226. package/dist/react-native/operations/activityLogAlerts.js +45 -79
  227. package/dist/react-native/operations/activityLogAlerts.js.map +1 -1
  228. package/dist/react-native/operations/activityLogs.js +23 -40
  229. package/dist/react-native/operations/activityLogs.js.map +1 -1
  230. package/dist/react-native/operations/alertRuleIncidents.js +10 -27
  231. package/dist/react-native/operations/alertRuleIncidents.js.map +1 -1
  232. package/dist/react-native/operations/alertRules.js +19 -53
  233. package/dist/react-native/operations/alertRules.js.map +1 -1
  234. package/dist/react-native/operations/autoscaleSettings.js +45 -79
  235. package/dist/react-native/operations/autoscaleSettings.js.map +1 -1
  236. package/dist/react-native/operations/azureMonitorWorkspaces.js +56 -85
  237. package/dist/react-native/operations/azureMonitorWorkspaces.js.map +1 -1
  238. package/dist/react-native/operations/baselines.js +10 -27
  239. package/dist/react-native/operations/baselines.js.map +1 -1
  240. package/dist/react-native/operations/dataCollectionEndpoints.js +45 -79
  241. package/dist/react-native/operations/dataCollectionEndpoints.js.map +1 -1
  242. package/dist/react-native/operations/dataCollectionRuleAssociations.js +67 -118
  243. package/dist/react-native/operations/dataCollectionRuleAssociations.js.map +1 -1
  244. package/dist/react-native/operations/dataCollectionRules.js +45 -79
  245. package/dist/react-native/operations/dataCollectionRules.js.map +1 -1
  246. package/dist/react-native/operations/diagnosticSettings.js +10 -27
  247. package/dist/react-native/operations/diagnosticSettings.js.map +1 -1
  248. package/dist/react-native/operations/diagnosticSettingsCategory.js +10 -27
  249. package/dist/react-native/operations/diagnosticSettingsCategory.js.map +1 -1
  250. package/dist/react-native/operations/eventCategories.js +10 -27
  251. package/dist/react-native/operations/eventCategories.js.map +1 -1
  252. package/dist/react-native/operations/logProfiles.js +10 -27
  253. package/dist/react-native/operations/logProfiles.js.map +1 -1
  254. package/dist/react-native/operations/metricAlerts.js +19 -53
  255. package/dist/react-native/operations/metricAlerts.js.map +1 -1
  256. package/dist/react-native/operations/metricAlertsStatus.js +1 -0
  257. package/dist/react-native/operations/metricAlertsStatus.js.map +1 -1
  258. package/dist/react-native/operations/metricDefinitions.js +19 -53
  259. package/dist/react-native/operations/metricDefinitions.js.map +1 -1
  260. package/dist/react-native/operations/metricNamespaces.js +10 -27
  261. package/dist/react-native/operations/metricNamespaces.js.map +1 -1
  262. package/dist/react-native/operations/metricsOperations.js +1 -0
  263. package/dist/react-native/operations/metricsOperations.js.map +1 -1
  264. package/dist/react-native/operations/monitorOperations.js +23 -40
  265. package/dist/react-native/operations/monitorOperations.js.map +1 -1
  266. package/dist/react-native/operations/operations.js +1 -0
  267. package/dist/react-native/operations/operations.js.map +1 -1
  268. package/dist/react-native/operations/predictiveMetric.js +1 -0
  269. package/dist/react-native/operations/predictiveMetric.js.map +1 -1
  270. package/dist/react-native/operations/privateEndpointConnections.js +23 -12
  271. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  272. package/dist/react-native/operations/privateLinkResources.js +1 -0
  273. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  274. package/dist/react-native/operations/privateLinkScopeOperationStatus.js +1 -0
  275. package/dist/react-native/operations/privateLinkScopeOperationStatus.js.map +1 -1
  276. package/dist/react-native/operations/privateLinkScopedResources.js +45 -52
  277. package/dist/react-native/operations/privateLinkScopedResources.js.map +1 -1
  278. package/dist/react-native/operations/privateLinkScopes.js +56 -85
  279. package/dist/react-native/operations/privateLinkScopes.js.map +1 -1
  280. package/dist/react-native/operations/scheduledQueryRules.js +45 -79
  281. package/dist/react-native/operations/scheduledQueryRules.js.map +1 -1
  282. package/dist/react-native/operations/tenantActionGroups.js +10 -27
  283. package/dist/react-native/operations/tenantActionGroups.js.map +1 -1
  284. package/dist/react-native/operations/tenantActivityLogs.js +23 -40
  285. package/dist/react-native/operations/tenantActivityLogs.js.map +1 -1
  286. package/dist/react-native/operations/vMInsights.js +1 -0
  287. package/dist/react-native/operations/vMInsights.js.map +1 -1
  288. package/dist/react-native/pagingHelper.js +2 -4
  289. package/dist/react-native/pagingHelper.js.map +1 -1
  290. package/package.json +2 -2
  291. /package/review/{arm-monitor.api.md → arm-monitor-node.api.md} +0 -0
@@ -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";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing DataCollectionRules operations. */
15
14
  export class DataCollectionRulesImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class DataCollectionRules class.
18
18
  * @param client Reference to the service client
@@ -35,52 +35,35 @@ export class DataCollectionRulesImpl {
35
35
  return this;
36
36
  },
37
37
  byPage: (settings) => {
38
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
38
+ if (settings?.maxPageSize) {
39
39
  throw new Error("maxPageSize is not supported by this operation.");
40
40
  }
41
41
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
42
42
  },
43
43
  };
44
44
  }
45
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
46
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
47
- let result;
48
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
49
- if (!continuationToken) {
50
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
51
- let page = result.value || [];
52
- continuationToken = result.nextLink;
53
- setContinuationToken(page, continuationToken);
54
- yield yield __await(page);
55
- }
56
- while (continuationToken) {
57
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
58
- continuationToken = result.nextLink;
59
- let page = result.value || [];
60
- setContinuationToken(page, continuationToken);
61
- yield yield __await(page);
62
- }
63
- });
45
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
46
+ let result;
47
+ let continuationToken = settings?.continuationToken;
48
+ if (!continuationToken) {
49
+ result = await this._listByResourceGroup(resourceGroupName, options);
50
+ let page = result.value || [];
51
+ continuationToken = result.nextLink;
52
+ setContinuationToken(page, continuationToken);
53
+ yield page;
54
+ }
55
+ while (continuationToken) {
56
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
57
+ continuationToken = result.nextLink;
58
+ let page = result.value || [];
59
+ setContinuationToken(page, continuationToken);
60
+ yield page;
61
+ }
64
62
  }
65
- listByResourceGroupPagingAll(resourceGroupName, options) {
66
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
67
- var _a, e_1, _b, _c;
68
- try {
69
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
70
- _c = _f.value;
71
- _d = false;
72
- const page = _c;
73
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
74
- }
75
- }
76
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
77
- finally {
78
- try {
79
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
80
- }
81
- finally { if (e_1) throw e_1.error; }
82
- }
83
- });
63
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
64
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
65
+ yield* page;
66
+ }
84
67
  }
85
68
  /**
86
69
  * Lists all data collection rules in the specified subscription.
@@ -96,52 +79,35 @@ export class DataCollectionRulesImpl {
96
79
  return this;
97
80
  },
98
81
  byPage: (settings) => {
99
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
82
+ if (settings?.maxPageSize) {
100
83
  throw new Error("maxPageSize is not supported by this operation.");
101
84
  }
102
85
  return this.listBySubscriptionPagingPage(options, settings);
103
86
  },
104
87
  };
105
88
  }
106
- listBySubscriptionPagingPage(options, settings) {
107
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
108
- let result;
109
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
110
- if (!continuationToken) {
111
- result = yield __await(this._listBySubscription(options));
112
- let page = result.value || [];
113
- continuationToken = result.nextLink;
114
- setContinuationToken(page, continuationToken);
115
- yield yield __await(page);
116
- }
117
- while (continuationToken) {
118
- result = yield __await(this._listBySubscriptionNext(continuationToken, options));
119
- continuationToken = result.nextLink;
120
- let page = result.value || [];
121
- setContinuationToken(page, continuationToken);
122
- yield yield __await(page);
123
- }
124
- });
89
+ async *listBySubscriptionPagingPage(options, settings) {
90
+ let result;
91
+ let continuationToken = settings?.continuationToken;
92
+ if (!continuationToken) {
93
+ result = await this._listBySubscription(options);
94
+ let page = result.value || [];
95
+ continuationToken = result.nextLink;
96
+ setContinuationToken(page, continuationToken);
97
+ yield page;
98
+ }
99
+ while (continuationToken) {
100
+ result = await this._listBySubscriptionNext(continuationToken, options);
101
+ continuationToken = result.nextLink;
102
+ let page = result.value || [];
103
+ setContinuationToken(page, continuationToken);
104
+ yield page;
105
+ }
125
106
  }
126
- listBySubscriptionPagingAll(options) {
127
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
128
- var _a, e_2, _b, _c;
129
- try {
130
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
131
- _c = _f.value;
132
- _d = false;
133
- const page = _c;
134
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
135
- }
136
- }
137
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
138
- finally {
139
- try {
140
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
141
- }
142
- finally { if (e_2) throw e_2.error; }
143
- }
144
- });
107
+ async *listBySubscriptionPagingAll(options) {
108
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
109
+ yield* page;
110
+ }
145
111
  }
146
112
  /**
147
113
  * Lists all data collection rules in the specified resource group.
@@ -1 +1 @@
1
- {"version":3,"file":"dataCollectionRules.js","sourceRoot":"","sources":["../../../src/operations/dataCollectionRules.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sB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,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mCAAmC,GAA6B;IACpE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { DataCollectionRules } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n DataCollectionRuleResource,\n DataCollectionRulesListByResourceGroupNextOptionalParams,\n DataCollectionRulesListByResourceGroupOptionalParams,\n DataCollectionRulesListByResourceGroupResponse,\n DataCollectionRulesListBySubscriptionNextOptionalParams,\n DataCollectionRulesListBySubscriptionOptionalParams,\n DataCollectionRulesListBySubscriptionResponse,\n DataCollectionRulesGetOptionalParams,\n DataCollectionRulesGetResponse,\n DataCollectionRulesCreateOptionalParams,\n DataCollectionRulesCreateResponse,\n DataCollectionRulesUpdateOptionalParams,\n DataCollectionRulesUpdateResponse,\n DataCollectionRulesDeleteOptionalParams,\n DataCollectionRulesListByResourceGroupNextResponse,\n DataCollectionRulesListBySubscriptionNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DataCollectionRules operations. */\nexport class DataCollectionRulesImpl implements DataCollectionRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class DataCollectionRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists all data collection rules in the specified resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<DataCollectionRuleResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DataCollectionRuleResource[]> {\n let result: DataCollectionRulesListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByResourceGroupNext(\n resourceGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<DataCollectionRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all data collection rules in the specified subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<DataCollectionRuleResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DataCollectionRuleResource[]> {\n let result: DataCollectionRulesListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<DataCollectionRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all data collection rules in the specified resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n ): Promise<DataCollectionRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Lists all data collection rules in the specified subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n ): Promise<DataCollectionRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * Returns the specified data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesGetOptionalParams,\n ): Promise<DataCollectionRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates a data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesCreateOptionalParams,\n ): Promise<DataCollectionRulesCreateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n createOperationSpec,\n );\n }\n\n /**\n * Updates part of a data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesUpdateOptionalParams,\n ): Promise<DataCollectionRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Deletes a data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: DataCollectionRulesListByResourceGroupNextOptionalParams,\n ): Promise<DataCollectionRulesListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: DataCollectionRulesListBySubscriptionNextOptionalParams,\n ): Promise<DataCollectionRulesListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n 201: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n requestBody: Parameters.body4,\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n requestBody: Parameters.body2,\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"dataCollectionRules.js","sourceRoot":"","sources":["../../../src/operations/dataCollectionRules.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAqBtD,4CAA4C;AAC5C,uDAAuD;AACvD,MAAM,O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microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { DataCollectionRules } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n DataCollectionRuleResource,\n DataCollectionRulesListByResourceGroupNextOptionalParams,\n DataCollectionRulesListByResourceGroupOptionalParams,\n DataCollectionRulesListByResourceGroupResponse,\n DataCollectionRulesListBySubscriptionNextOptionalParams,\n DataCollectionRulesListBySubscriptionOptionalParams,\n DataCollectionRulesListBySubscriptionResponse,\n DataCollectionRulesGetOptionalParams,\n DataCollectionRulesGetResponse,\n DataCollectionRulesCreateOptionalParams,\n DataCollectionRulesCreateResponse,\n DataCollectionRulesUpdateOptionalParams,\n DataCollectionRulesUpdateResponse,\n DataCollectionRulesDeleteOptionalParams,\n DataCollectionRulesListByResourceGroupNextResponse,\n DataCollectionRulesListBySubscriptionNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DataCollectionRules operations. */\nexport class DataCollectionRulesImpl implements DataCollectionRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class DataCollectionRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists all data collection rules in the specified resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<DataCollectionRuleResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DataCollectionRuleResource[]> {\n let result: DataCollectionRulesListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByResourceGroupNext(\n resourceGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<DataCollectionRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all data collection rules in the specified subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<DataCollectionRuleResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DataCollectionRuleResource[]> {\n let result: DataCollectionRulesListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<DataCollectionRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all data collection rules in the specified resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: DataCollectionRulesListByResourceGroupOptionalParams,\n ): Promise<DataCollectionRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Lists all data collection rules in the specified subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: DataCollectionRulesListBySubscriptionOptionalParams,\n ): Promise<DataCollectionRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * Returns the specified data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesGetOptionalParams,\n ): Promise<DataCollectionRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates a data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesCreateOptionalParams,\n ): Promise<DataCollectionRulesCreateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n createOperationSpec,\n );\n }\n\n /**\n * Updates part of a data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesUpdateOptionalParams,\n ): Promise<DataCollectionRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Deletes a data collection rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n dataCollectionRuleName: string,\n options?: DataCollectionRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, dataCollectionRuleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: DataCollectionRulesListByResourceGroupNextOptionalParams,\n ): Promise<DataCollectionRulesListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: DataCollectionRulesListBySubscriptionNextOptionalParams,\n ): Promise<DataCollectionRulesListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n 201: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n requestBody: Parameters.body4,\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n requestBody: Parameters.body2,\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n queryParameters: [Parameters.apiVersion14],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.dataCollectionRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DataCollectionRuleResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseCommonV2,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -5,13 +5,13 @@
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 * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing DiagnosticSettings operations. */
14
13
  export class DiagnosticSettingsImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class DiagnosticSettings class.
17
17
  * @param client Reference to the service client
@@ -34,39 +34,22 @@ export class DiagnosticSettingsImpl {
34
34
  return this;
35
35
  },
36
36
  byPage: (settings) => {
37
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
37
+ if (settings?.maxPageSize) {
38
38
  throw new Error("maxPageSize is not supported by this operation.");
39
39
  }
40
40
  return this.listPagingPage(resourceUri, options, settings);
41
41
  },
42
42
  };
43
43
  }
44
- listPagingPage(resourceUri, options, _settings) {
45
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- result = yield __await(this._list(resourceUri, options));
48
- yield yield __await(result.value || []);
49
- });
44
+ async *listPagingPage(resourceUri, options, _settings) {
45
+ let result;
46
+ result = await this._list(resourceUri, options);
47
+ yield result.value || [];
50
48
  }
51
- listPagingAll(resourceUri, options) {
52
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
53
- var _a, e_1, _b, _c;
54
- try {
55
- for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
56
- _c = _f.value;
57
- _d = false;
58
- const page = _c;
59
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
60
- }
61
- }
62
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
63
- finally {
64
- try {
65
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
66
- }
67
- finally { if (e_1) throw e_1.error; }
68
- }
69
- });
49
+ async *listPagingAll(resourceUri, options) {
50
+ for await (const page of this.listPagingPage(resourceUri, options)) {
51
+ yield* page;
52
+ }
70
53
  }
71
54
  /**
72
55
  * Gets the active diagnostic settings for the specified resource.
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticSettings.js","sourceRoot":"","sources":["../../../src/operations/diagnosticSettings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAatD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAGjC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,WAAmB,EACnB,OAA8C;QAE9C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACtD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,a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;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC;IAC1E,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,uEAAuE;IAC7E,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC;IAC1E,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,gEAAgE;IACtE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { DiagnosticSettings } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n DiagnosticSettingsResource,\n DiagnosticSettingsListOptionalParams,\n DiagnosticSettingsListResponse,\n DiagnosticSettingsGetOptionalParams,\n DiagnosticSettingsGetResponse,\n DiagnosticSettingsCreateOrUpdateOptionalParams,\n DiagnosticSettingsCreateOrUpdateResponse,\n DiagnosticSettingsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DiagnosticSettings operations. */\nexport class DiagnosticSettingsImpl implements DiagnosticSettings {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class DiagnosticSettings class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Gets the active diagnostic settings list for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n ): PagedAsyncIterableIterator<DiagnosticSettingsResource> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<DiagnosticSettingsResource[]> {\n let result: DiagnosticSettingsListResponse;\n result = await this._list(resourceUri, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n ): AsyncIterableIterator<DiagnosticSettingsResource> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the active diagnostic settings for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n name: string,\n options?: DiagnosticSettingsGetOptionalParams,\n ): Promise<DiagnosticSettingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, name, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates diagnostic settings for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceUri: string,\n name: string,\n parameters: DiagnosticSettingsResource,\n options?: DiagnosticSettingsCreateOrUpdateOptionalParams,\n ): Promise<DiagnosticSettingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, name, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes existing diagnostic settings for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param options The options parameters.\n */\n delete(\n resourceUri: string,\n name: string,\n options?: DiagnosticSettingsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceUri, name, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets the active diagnostic settings list for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n ): Promise<DiagnosticSettingsListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"diagnosticSettings.js","sourceRoot":"","sources":["../../../src/operations/diagnosticSettings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;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C;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { DiagnosticSettings } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n DiagnosticSettingsResource,\n DiagnosticSettingsListOptionalParams,\n DiagnosticSettingsListResponse,\n DiagnosticSettingsGetOptionalParams,\n DiagnosticSettingsGetResponse,\n DiagnosticSettingsCreateOrUpdateOptionalParams,\n DiagnosticSettingsCreateOrUpdateResponse,\n DiagnosticSettingsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DiagnosticSettings operations. */\nexport class DiagnosticSettingsImpl implements DiagnosticSettings {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class DiagnosticSettings class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Gets the active diagnostic settings list for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n ): PagedAsyncIterableIterator<DiagnosticSettingsResource> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<DiagnosticSettingsResource[]> {\n let result: DiagnosticSettingsListResponse;\n result = await this._list(resourceUri, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n ): AsyncIterableIterator<DiagnosticSettingsResource> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the active diagnostic settings for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n name: string,\n options?: DiagnosticSettingsGetOptionalParams,\n ): Promise<DiagnosticSettingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, name, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates diagnostic settings for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceUri: string,\n name: string,\n parameters: DiagnosticSettingsResource,\n options?: DiagnosticSettingsCreateOrUpdateOptionalParams,\n ): Promise<DiagnosticSettingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, name, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes existing diagnostic settings for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param options The options parameters.\n */\n delete(\n resourceUri: string,\n name: string,\n options?: DiagnosticSettingsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceUri, name, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets the active diagnostic settings list for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: DiagnosticSettingsListOptionalParams,\n ): Promise<DiagnosticSettingsListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -5,13 +5,13 @@
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 * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing DiagnosticSettingsCategory operations. */
14
13
  export class DiagnosticSettingsCategoryImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class DiagnosticSettingsCategory class.
17
17
  * @param client Reference to the service client
@@ -34,39 +34,22 @@ export class DiagnosticSettingsCategoryImpl {
34
34
  return this;
35
35
  },
36
36
  byPage: (settings) => {
37
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
37
+ if (settings?.maxPageSize) {
38
38
  throw new Error("maxPageSize is not supported by this operation.");
39
39
  }
40
40
  return this.listPagingPage(resourceUri, options, settings);
41
41
  },
42
42
  };
43
43
  }
44
- listPagingPage(resourceUri, options, _settings) {
45
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- result = yield __await(this._list(resourceUri, options));
48
- yield yield __await(result.value || []);
49
- });
44
+ async *listPagingPage(resourceUri, options, _settings) {
45
+ let result;
46
+ result = await this._list(resourceUri, options);
47
+ yield result.value || [];
50
48
  }
51
- listPagingAll(resourceUri, options) {
52
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
53
- var _a, e_1, _b, _c;
54
- try {
55
- for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
56
- _c = _f.value;
57
- _d = false;
58
- const page = _c;
59
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
60
- }
61
- }
62
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
63
- finally {
64
- try {
65
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
66
- }
67
- finally { if (e_1) throw e_1.error; }
68
- }
69
- });
49
+ async *listPagingAll(resourceUri, options) {
50
+ for await (const page of this.listPagingPage(resourceUri, options)) {
51
+ yield* page;
52
+ }
70
53
  }
71
54
  /**
72
55
  * Gets the diagnostic settings category for the specified resource.
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticSettingsCategory.js","sourceRoot":"","sources":["../../../src/operations/diagnosticSettingsCategory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAM,OAAO,8BAA8B;IAKzC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,WAAmB,EACnB,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACtD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAi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E,iFAAiF;IACvF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC;IAC1E,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,0EAA0E;IAChF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,4CAA4C;SACjE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { DiagnosticSettingsCategory } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n DiagnosticSettingsCategoryResource,\n DiagnosticSettingsCategoryListOptionalParams,\n DiagnosticSettingsCategoryListResponse,\n DiagnosticSettingsCategoryGetOptionalParams,\n DiagnosticSettingsCategoryGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DiagnosticSettingsCategory operations. */\nexport class DiagnosticSettingsCategoryImpl\n implements DiagnosticSettingsCategory\n{\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class DiagnosticSettingsCategory class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the diagnostic settings categories for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n ): PagedAsyncIterableIterator<DiagnosticSettingsCategoryResource> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<DiagnosticSettingsCategoryResource[]> {\n let result: DiagnosticSettingsCategoryListResponse;\n result = await this._list(resourceUri, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n ): AsyncIterableIterator<DiagnosticSettingsCategoryResource> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the diagnostic settings category for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n name: string,\n options?: DiagnosticSettingsCategoryGetOptionalParams,\n ): Promise<DiagnosticSettingsCategoryGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, name, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists the diagnostic settings categories for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n ): Promise<DiagnosticSettingsCategoryListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsCategoryResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsCategoryResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"diagnosticSettingsCategory.js","sourceRoot":"","sources":["../../../src/operations/diagnosticSettingsCategory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAM,OAAO,8BAA8B;IAGxB,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,C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CAAC;IAED;;;;OAIG;IACK,KAAK,CACX,WAAmB,EACnB,OAAsD;QAEtD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,iFAAiF;IACvF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC;IAC1E,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,0EAA0E;IAChF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,4CAA4C;SACjE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { DiagnosticSettingsCategory } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n DiagnosticSettingsCategoryResource,\n DiagnosticSettingsCategoryListOptionalParams,\n DiagnosticSettingsCategoryListResponse,\n DiagnosticSettingsCategoryGetOptionalParams,\n DiagnosticSettingsCategoryGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DiagnosticSettingsCategory operations. */\nexport class DiagnosticSettingsCategoryImpl\n implements DiagnosticSettingsCategory\n{\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class DiagnosticSettingsCategory class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the diagnostic settings categories for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n ): PagedAsyncIterableIterator<DiagnosticSettingsCategoryResource> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<DiagnosticSettingsCategoryResource[]> {\n let result: DiagnosticSettingsCategoryListResponse;\n result = await this._list(resourceUri, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n ): AsyncIterableIterator<DiagnosticSettingsCategoryResource> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the diagnostic settings category for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param name The name of the diagnostic setting.\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n name: string,\n options?: DiagnosticSettingsCategoryGetOptionalParams,\n ): Promise<DiagnosticSettingsCategoryGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, name, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists the diagnostic settings categories for the specified resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: DiagnosticSettingsCategoryListOptionalParams,\n ): Promise<DiagnosticSettingsCategoryListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsCategoryResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DiagnosticSettingsCategoryResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion5],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -5,13 +5,13 @@
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 * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing EventCategories operations. */
14
13
  export class EventCategoriesImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class EventCategories class.
17
17
  * @param client Reference to the service client
@@ -34,39 +34,22 @@ export class EventCategoriesImpl {
34
34
  return this;
35
35
  },
36
36
  byPage: (settings) => {
37
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
37
+ if (settings?.maxPageSize) {
38
38
  throw new Error("maxPageSize is not supported by this operation.");
39
39
  }
40
40
  return this.listPagingPage(options, settings);
41
41
  },
42
42
  };
43
43
  }
44
- listPagingPage(options, _settings) {
45
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- result = yield __await(this._list(options));
48
- yield yield __await(result.value || []);
49
- });
44
+ async *listPagingPage(options, _settings) {
45
+ let result;
46
+ result = await this._list(options);
47
+ yield result.value || [];
50
48
  }
51
- listPagingAll(options) {
52
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
53
- var _a, e_1, _b, _c;
54
- try {
55
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
56
- _c = _f.value;
57
- _d = false;
58
- const page = _c;
59
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
60
- }
61
- }
62
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
63
- finally {
64
- try {
65
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
66
- }
67
- finally { if (e_1) throw e_1.error; }
68
- }
69
- });
49
+ async *listPagingAll(options) {
50
+ for await (const page of this.listPagingPage(options)) {
51
+ yield* page;
52
+ }
70
53
  }
71
54
  /**
72
55
  * Get the list of available event categories supported in the Activity Logs Service.<br>The current
@@ -1 +1 @@
1
- {"version":3,"file":"eventCategories.js","sourceRoot":"","sources":["../../../src/operations/eventCategories.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAA2C,EAC3C,SAAwB;;YAExB,IAAI,MAAmC,CAAC;YACxC,MAAM,GAAG,cAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA,CAAC;YACnC,oBAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;QAC3B,CAAC;KAAA;IAEc,aAAa,CAC1B,OAA2C;;;;gBAE3C,KAAyB,eAAA,KAAA,cAAA,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA,IAAA,+DAAE,CAAC;oBAA/B,cAA4B;oBAA5B,WAA4B;oBAA1C,MAAM,IAAI,KAAA,CAAA;oBACnB,cAAA,KAAK,CAAC,CAAC,iBAAA,cAAA,IAAI,CAAA,CAAA,CAAA,CAAC;gBACd,CAAC;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;OAIG;IACK,KAAK,CACX,OAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,+CAA+C;IACrD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { EventCategories } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n LocalizableStringAutoGenerated,\n EventCategoriesListOptionalParams,\n EventCategoriesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EventCategories operations. */\nexport class EventCategoriesImpl implements EventCategories {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class EventCategories class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Get the list of available event categories supported in the Activity Logs Service.<br>The current\n * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.\n * @param options The options parameters.\n */\n public list(\n options?: EventCategoriesListOptionalParams,\n ): PagedAsyncIterableIterator<LocalizableStringAutoGenerated> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: EventCategoriesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<LocalizableStringAutoGenerated[]> {\n let result: EventCategoriesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: EventCategoriesListOptionalParams,\n ): AsyncIterableIterator<LocalizableStringAutoGenerated> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get the list of available event categories supported in the Activity Logs Service.<br>The current\n * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.\n * @param options The options parameters.\n */\n private _list(\n options?: EventCategoriesListOptionalParams,\n ): Promise<EventCategoriesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Insights/eventcategories\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventCategoryCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion3],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"eventCategories.js","sourceRoot":"","sources":["../../../src/operations/eventCategories.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IACb,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAA2C,EAC3C,SAAwB;QAExB,IAAI,MAAmC,CAAC;QACxC,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEO,KAAK,CAAC,CAAC,aAAa,CAC1B,OAA2C;QAE3C,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACtD,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,KAAK,CACX,OAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,+CAA+C;IACrD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { EventCategories } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n LocalizableStringAutoGenerated,\n EventCategoriesListOptionalParams,\n EventCategoriesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EventCategories operations. */\nexport class EventCategoriesImpl implements EventCategories {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class EventCategories class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Get the list of available event categories supported in the Activity Logs Service.<br>The current\n * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.\n * @param options The options parameters.\n */\n public list(\n options?: EventCategoriesListOptionalParams,\n ): PagedAsyncIterableIterator<LocalizableStringAutoGenerated> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: EventCategoriesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<LocalizableStringAutoGenerated[]> {\n let result: EventCategoriesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: EventCategoriesListOptionalParams,\n ): AsyncIterableIterator<LocalizableStringAutoGenerated> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get the list of available event categories supported in the Activity Logs Service.<br>The current\n * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.\n * @param options The options parameters.\n */\n private _list(\n options?: EventCategoriesListOptionalParams,\n ): Promise<EventCategoriesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Insights/eventcategories\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventCategoryCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion3],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}