@azure/arm-monitor 8.0.0-alpha.20250618.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
@@ -13,8 +13,9 @@ import { MetricNamespacesImpl, MetricDefinitionsImpl, MetricsOperationsImpl, Azu
13
13
  import * as Parameters from "./models/parameters.js";
14
14
  import * as Mappers from "./models/mappers.js";
15
15
  export class MonitorClient extends coreClient.ServiceClient {
16
+ $host;
17
+ subscriptionId;
16
18
  constructor(credentials, subscriptionIdOrOptions, options) {
17
- var _a, _b, _c;
18
19
  if (credentials === undefined) {
19
20
  throw new Error("'credentials' cannot be null");
20
21
  }
@@ -37,12 +38,17 @@ export class MonitorClient extends coreClient.ServiceClient {
37
38
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
38
39
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
39
40
  : `${packageDetails}`;
40
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
41
+ const optionsWithDefaults = {
42
+ ...defaults,
43
+ ...options,
44
+ userAgentOptions: {
41
45
  userAgentPrefix,
42
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
46
+ },
47
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
48
+ };
43
49
  super(optionsWithDefaults);
44
50
  let bearerTokenAuthenticationPolicyFound = false;
45
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
51
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
46
52
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
47
53
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
48
54
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -56,7 +62,8 @@ export class MonitorClient extends coreClient.ServiceClient {
56
62
  });
57
63
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
58
64
  credential: credentials,
59
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
65
+ scopes: optionsWithDefaults.credentialScopes ??
66
+ `${optionsWithDefaults.endpoint}/.default`,
60
67
  challengeCallbacks: {
61
68
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
62
69
  },
@@ -114,14 +121,19 @@ export class MonitorClient extends coreClient.ServiceClient {
114
121
  return this.sendOperationRequest(args, spec);
115
122
  };
116
123
  const sendOperationFn = async (args, spec) => {
117
- var _a;
118
124
  let currentRawResponse = undefined;
119
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
125
+ const providedCallback = args.options?.onResponse;
120
126
  const callback = (rawResponse, flatResponse) => {
121
127
  currentRawResponse = rawResponse;
122
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
128
+ providedCallback?.(rawResponse, flatResponse);
129
+ };
130
+ const updatedArgs = {
131
+ ...args,
132
+ options: {
133
+ ...args.options,
134
+ onResponse: callback,
135
+ },
123
136
  };
124
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
125
137
  const flatResponse = await directSendOperation(updatedArgs, spec);
126
138
  return {
127
139
  flatResponse,
@@ -144,8 +156,8 @@ export class MonitorClient extends coreClient.ServiceClient {
144
156
  spec: createNotificationsAtTenantActionGroupResourceLevelOperationSpec,
145
157
  });
146
158
  const poller = await createHttpPoller(lro, {
147
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
148
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
159
+ restoreFrom: options?.resumeFrom,
160
+ intervalInMs: options?.updateIntervalInMs,
149
161
  resourceLocationConfig: "location",
150
162
  });
151
163
  await poller.poll();
@@ -180,6 +192,38 @@ export class MonitorClient extends coreClient.ServiceClient {
180
192
  options,
181
193
  }, getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec);
182
194
  }
195
+ metricNamespaces;
196
+ metricDefinitions;
197
+ metricsOperations;
198
+ azureMonitorWorkspaces;
199
+ monitorOperations;
200
+ autoscaleSettings;
201
+ predictiveMetric;
202
+ operations;
203
+ alertRuleIncidents;
204
+ alertRules;
205
+ logProfiles;
206
+ diagnosticSettings;
207
+ diagnosticSettingsCategory;
208
+ actionGroups;
209
+ tenantActionGroups;
210
+ activityLogs;
211
+ eventCategories;
212
+ tenantActivityLogs;
213
+ baselines;
214
+ metricAlerts;
215
+ metricAlertsStatus;
216
+ scheduledQueryRules;
217
+ vMInsights;
218
+ privateLinkScopes;
219
+ privateLinkScopeOperationStatus;
220
+ privateLinkResources;
221
+ privateEndpointConnections;
222
+ privateLinkScopedResources;
223
+ activityLogAlerts;
224
+ dataCollectionEndpoints;
225
+ dataCollectionRuleAssociations;
226
+ dataCollectionRules;
183
227
  }
184
228
  // Operation Specifications
185
229
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -1 +1 @@
1
- {"version":3,"file":"monitorClient.js","sourceRoot":"","sources":["../../src/monitorClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,mCAAmC,EACnC,wBAAwB,EACxB,8BAA8B,EAC9B,8BAA8B,EAC9B,qBAAqB,EACrB,2BAA2B,EAC3B,kCAAkC,EAClC,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAmC/B,OAAO,KAAK,UAAU,MAAM,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KAC7B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACJ,MAAM,iEAAiE,GACrE;IACE,IAAI,EAAE,kLAAkL;IACxL,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;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,qBAAqB;KACjC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACnE,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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport {\n MetricNamespacesImpl,\n MetricDefinitionsImpl,\n MetricsOperationsImpl,\n AzureMonitorWorkspacesImpl,\n MonitorOperationsImpl,\n AutoscaleSettingsImpl,\n PredictiveMetricImpl,\n OperationsImpl,\n AlertRuleIncidentsImpl,\n AlertRulesImpl,\n LogProfilesImpl,\n DiagnosticSettingsImpl,\n DiagnosticSettingsCategoryImpl,\n ActionGroupsImpl,\n TenantActionGroupsImpl,\n ActivityLogsImpl,\n EventCategoriesImpl,\n TenantActivityLogsImpl,\n BaselinesImpl,\n MetricAlertsImpl,\n MetricAlertsStatusImpl,\n ScheduledQueryRulesImpl,\n VMInsightsImpl,\n PrivateLinkScopesImpl,\n PrivateLinkScopeOperationStatusImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkScopedResourcesImpl,\n ActivityLogAlertsImpl,\n DataCollectionEndpointsImpl,\n DataCollectionRuleAssociationsImpl,\n DataCollectionRulesImpl,\n} from \"./operations/index.js\";\nimport {\n MetricNamespaces,\n MetricDefinitions,\n MetricsOperations,\n AzureMonitorWorkspaces,\n MonitorOperations,\n AutoscaleSettings,\n PredictiveMetric,\n Operations,\n AlertRuleIncidents,\n AlertRules,\n LogProfiles,\n DiagnosticSettings,\n DiagnosticSettingsCategory,\n ActionGroups,\n TenantActionGroups,\n ActivityLogs,\n EventCategories,\n TenantActivityLogs,\n Baselines,\n MetricAlerts,\n MetricAlertsStatus,\n ScheduledQueryRules,\n VMInsights,\n PrivateLinkScopes,\n PrivateLinkScopeOperationStatus,\n PrivateLinkResources,\n PrivateEndpointConnections,\n PrivateLinkScopedResources,\n ActivityLogAlerts,\n DataCollectionEndpoints,\n DataCollectionRuleAssociations,\n DataCollectionRules,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MonitorClientOptionalParams,\n TenantNotificationRequestBody,\n CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n GetTestNotificationsAtTenantActionGroupResourceLevelResponse,\n} from \"./models/index.js\";\n\nexport class MonitorClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MonitorClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MonitorClientOptionalParams | string,\n options?: MonitorClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MonitorClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-monitor/8.0.0-beta.6`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.metricNamespaces = new MetricNamespacesImpl(this);\n this.metricDefinitions = new MetricDefinitionsImpl(this);\n this.metricsOperations = new MetricsOperationsImpl(this);\n this.azureMonitorWorkspaces = new AzureMonitorWorkspacesImpl(this);\n this.monitorOperations = new MonitorOperationsImpl(this);\n this.autoscaleSettings = new AutoscaleSettingsImpl(this);\n this.predictiveMetric = new PredictiveMetricImpl(this);\n this.operations = new OperationsImpl(this);\n this.alertRuleIncidents = new AlertRuleIncidentsImpl(this);\n this.alertRules = new AlertRulesImpl(this);\n this.logProfiles = new LogProfilesImpl(this);\n this.diagnosticSettings = new DiagnosticSettingsImpl(this);\n this.diagnosticSettingsCategory = new DiagnosticSettingsCategoryImpl(this);\n this.actionGroups = new ActionGroupsImpl(this);\n this.tenantActionGroups = new TenantActionGroupsImpl(this);\n this.activityLogs = new ActivityLogsImpl(this);\n this.eventCategories = new EventCategoriesImpl(this);\n this.tenantActivityLogs = new TenantActivityLogsImpl(this);\n this.baselines = new BaselinesImpl(this);\n this.metricAlerts = new MetricAlertsImpl(this);\n this.metricAlertsStatus = new MetricAlertsStatusImpl(this);\n this.scheduledQueryRules = new ScheduledQueryRulesImpl(this);\n this.vMInsights = new VMInsightsImpl(this);\n this.privateLinkScopes = new PrivateLinkScopesImpl(this);\n this.privateLinkScopeOperationStatus =\n new PrivateLinkScopeOperationStatusImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkScopedResources = new PrivateLinkScopedResourcesImpl(this);\n this.activityLogAlerts = new ActivityLogAlertsImpl(this);\n this.dataCollectionEndpoints = new DataCollectionEndpointsImpl(this);\n this.dataCollectionRuleAssociations =\n new DataCollectionRuleAssociationsImpl(this);\n this.dataCollectionRules = new DataCollectionRulesImpl(this);\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevelAndWait(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationId: string,\n options?: GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<GetTestNotificationsAtTenantActionGroupResourceLevelResponse> {\n return this.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationId,\n options,\n },\n getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n );\n }\n\n metricNamespaces: MetricNamespaces;\n metricDefinitions: MetricDefinitions;\n metricsOperations: MetricsOperations;\n azureMonitorWorkspaces: AzureMonitorWorkspaces;\n monitorOperations: MonitorOperations;\n autoscaleSettings: AutoscaleSettings;\n predictiveMetric: PredictiveMetric;\n operations: Operations;\n alertRuleIncidents: AlertRuleIncidents;\n alertRules: AlertRules;\n logProfiles: LogProfiles;\n diagnosticSettings: DiagnosticSettings;\n diagnosticSettingsCategory: DiagnosticSettingsCategory;\n actionGroups: ActionGroups;\n tenantActionGroups: TenantActionGroups;\n activityLogs: ActivityLogs;\n eventCategories: EventCategories;\n tenantActivityLogs: TenantActivityLogs;\n baselines: Baselines;\n metricAlerts: MetricAlerts;\n metricAlertsStatus: MetricAlertsStatus;\n scheduledQueryRules: ScheduledQueryRules;\n vMInsights: VMInsights;\n privateLinkScopes: PrivateLinkScopes;\n privateLinkScopeOperationStatus: PrivateLinkScopeOperationStatus;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkScopedResources: PrivateLinkScopedResources;\n activityLogAlerts: ActivityLogAlerts;\n dataCollectionEndpoints: DataCollectionEndpoints;\n dataCollectionRuleAssociations: DataCollectionRuleAssociations;\n dataCollectionRules: DataCollectionRules;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseAutoGenerated3,\n },\n },\n requestBody: Parameters.notificationRequest1,\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.xMsClientTenantId,\n ],\n mediaType: \"json\",\n serializer,\n };\nconst getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.notificationId,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n };\n"]}
1
+ {"version":3,"file":"monitorClient.js","sourceRoot":"","sources":["../../src/monitorClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,mCAAmC,EACnC,wBAAwB,EACxB,8BAA8B,EAC9B,8BAA8B,EAC9B,qBAAqB,EACrB,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E,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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport {\n MetricNamespacesImpl,\n MetricDefinitionsImpl,\n MetricsOperationsImpl,\n AzureMonitorWorkspacesImpl,\n MonitorOperationsImpl,\n AutoscaleSettingsImpl,\n PredictiveMetricImpl,\n OperationsImpl,\n AlertRuleIncidentsImpl,\n AlertRulesImpl,\n LogProfilesImpl,\n DiagnosticSettingsImpl,\n DiagnosticSettingsCategoryImpl,\n ActionGroupsImpl,\n TenantActionGroupsImpl,\n ActivityLogsImpl,\n EventCategoriesImpl,\n TenantActivityLogsImpl,\n BaselinesImpl,\n MetricAlertsImpl,\n MetricAlertsStatusImpl,\n ScheduledQueryRulesImpl,\n VMInsightsImpl,\n PrivateLinkScopesImpl,\n PrivateLinkScopeOperationStatusImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkScopedResourcesImpl,\n ActivityLogAlertsImpl,\n DataCollectionEndpointsImpl,\n DataCollectionRuleAssociationsImpl,\n DataCollectionRulesImpl,\n} from \"./operations/index.js\";\nimport {\n MetricNamespaces,\n MetricDefinitions,\n MetricsOperations,\n AzureMonitorWorkspaces,\n MonitorOperations,\n AutoscaleSettings,\n PredictiveMetric,\n Operations,\n AlertRuleIncidents,\n AlertRules,\n LogProfiles,\n DiagnosticSettings,\n DiagnosticSettingsCategory,\n ActionGroups,\n TenantActionGroups,\n ActivityLogs,\n EventCategories,\n TenantActivityLogs,\n Baselines,\n MetricAlerts,\n MetricAlertsStatus,\n ScheduledQueryRules,\n VMInsights,\n PrivateLinkScopes,\n PrivateLinkScopeOperationStatus,\n PrivateLinkResources,\n PrivateEndpointConnections,\n PrivateLinkScopedResources,\n ActivityLogAlerts,\n DataCollectionEndpoints,\n DataCollectionRuleAssociations,\n DataCollectionRules,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MonitorClientOptionalParams,\n TenantNotificationRequestBody,\n CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n GetTestNotificationsAtTenantActionGroupResourceLevelResponse,\n} from \"./models/index.js\";\n\nexport class MonitorClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MonitorClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MonitorClientOptionalParams | string,\n options?: MonitorClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MonitorClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-monitor/8.0.0-beta.6`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.metricNamespaces = new MetricNamespacesImpl(this);\n this.metricDefinitions = new MetricDefinitionsImpl(this);\n this.metricsOperations = new MetricsOperationsImpl(this);\n this.azureMonitorWorkspaces = new AzureMonitorWorkspacesImpl(this);\n this.monitorOperations = new MonitorOperationsImpl(this);\n this.autoscaleSettings = new AutoscaleSettingsImpl(this);\n this.predictiveMetric = new PredictiveMetricImpl(this);\n this.operations = new OperationsImpl(this);\n this.alertRuleIncidents = new AlertRuleIncidentsImpl(this);\n this.alertRules = new AlertRulesImpl(this);\n this.logProfiles = new LogProfilesImpl(this);\n this.diagnosticSettings = new DiagnosticSettingsImpl(this);\n this.diagnosticSettingsCategory = new DiagnosticSettingsCategoryImpl(this);\n this.actionGroups = new ActionGroupsImpl(this);\n this.tenantActionGroups = new TenantActionGroupsImpl(this);\n this.activityLogs = new ActivityLogsImpl(this);\n this.eventCategories = new EventCategoriesImpl(this);\n this.tenantActivityLogs = new TenantActivityLogsImpl(this);\n this.baselines = new BaselinesImpl(this);\n this.metricAlerts = new MetricAlertsImpl(this);\n this.metricAlertsStatus = new MetricAlertsStatusImpl(this);\n this.scheduledQueryRules = new ScheduledQueryRulesImpl(this);\n this.vMInsights = new VMInsightsImpl(this);\n this.privateLinkScopes = new PrivateLinkScopesImpl(this);\n this.privateLinkScopeOperationStatus =\n new PrivateLinkScopeOperationStatusImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkScopedResources = new PrivateLinkScopedResourcesImpl(this);\n this.activityLogAlerts = new ActivityLogAlertsImpl(this);\n this.dataCollectionEndpoints = new DataCollectionEndpointsImpl(this);\n this.dataCollectionRuleAssociations =\n new DataCollectionRuleAssociationsImpl(this);\n this.dataCollectionRules = new DataCollectionRulesImpl(this);\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevelAndWait(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationId: string,\n options?: GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<GetTestNotificationsAtTenantActionGroupResourceLevelResponse> {\n return this.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationId,\n options,\n },\n getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n );\n }\n\n metricNamespaces: MetricNamespaces;\n metricDefinitions: MetricDefinitions;\n metricsOperations: MetricsOperations;\n azureMonitorWorkspaces: AzureMonitorWorkspaces;\n monitorOperations: MonitorOperations;\n autoscaleSettings: AutoscaleSettings;\n predictiveMetric: PredictiveMetric;\n operations: Operations;\n alertRuleIncidents: AlertRuleIncidents;\n alertRules: AlertRules;\n logProfiles: LogProfiles;\n diagnosticSettings: DiagnosticSettings;\n diagnosticSettingsCategory: DiagnosticSettingsCategory;\n actionGroups: ActionGroups;\n tenantActionGroups: TenantActionGroups;\n activityLogs: ActivityLogs;\n eventCategories: EventCategories;\n tenantActivityLogs: TenantActivityLogs;\n baselines: Baselines;\n metricAlerts: MetricAlerts;\n metricAlertsStatus: MetricAlertsStatus;\n scheduledQueryRules: ScheduledQueryRules;\n vMInsights: VMInsights;\n privateLinkScopes: PrivateLinkScopes;\n privateLinkScopeOperationStatus: PrivateLinkScopeOperationStatus;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkScopedResources: PrivateLinkScopedResources;\n activityLogAlerts: ActivityLogAlerts;\n dataCollectionEndpoints: DataCollectionEndpoints;\n dataCollectionRuleAssociations: DataCollectionRuleAssociations;\n dataCollectionRules: DataCollectionRules;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseAutoGenerated3,\n },\n },\n requestBody: Parameters.notificationRequest1,\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.xMsClientTenantId,\n ],\n mediaType: \"json\",\n serializer,\n };\nconst getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.notificationId,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n };\n"]}
@@ -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 * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
@@ -14,6 +13,7 @@ import { createLroSpec } from "../lroImpl.js";
14
13
  /// <reference lib="esnext.asynciterable" />
15
14
  /** Class containing ActionGroups operations. */
16
15
  export class ActionGroupsImpl {
16
+ client;
17
17
  /**
18
18
  * Initialize a new instance of the class ActionGroups class.
19
19
  * @param client Reference to the service client
@@ -35,39 +35,22 @@ export class ActionGroupsImpl {
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.listBySubscriptionIdPagingPage(options, settings);
42
42
  },
43
43
  };
44
44
  }
45
- listBySubscriptionIdPagingPage(options, _settings) {
46
- return __asyncGenerator(this, arguments, function* listBySubscriptionIdPagingPage_1() {
47
- let result;
48
- result = yield __await(this._listBySubscriptionId(options));
49
- yield yield __await(result.value || []);
50
- });
45
+ async *listBySubscriptionIdPagingPage(options, _settings) {
46
+ let result;
47
+ result = await this._listBySubscriptionId(options);
48
+ yield result.value || [];
51
49
  }
52
- listBySubscriptionIdPagingAll(options) {
53
- return __asyncGenerator(this, arguments, function* listBySubscriptionIdPagingAll_1() {
54
- var _a, e_1, _b, _c;
55
- try {
56
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionIdPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
57
- _c = _f.value;
58
- _d = false;
59
- const page = _c;
60
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
61
- }
62
- }
63
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
64
- finally {
65
- try {
66
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
67
- }
68
- finally { if (e_1) throw e_1.error; }
69
- }
70
- });
50
+ async *listBySubscriptionIdPagingAll(options) {
51
+ for await (const page of this.listBySubscriptionIdPagingPage(options)) {
52
+ yield* page;
53
+ }
71
54
  }
72
55
  /**
73
56
  * Get a list of all action groups in a resource group.
@@ -84,39 +67,22 @@ export class ActionGroupsImpl {
84
67
  return this;
85
68
  },
86
69
  byPage: (settings) => {
87
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
70
+ if (settings?.maxPageSize) {
88
71
  throw new Error("maxPageSize is not supported by this operation.");
89
72
  }
90
73
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
91
74
  },
92
75
  };
93
76
  }
94
- listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
95
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
96
- let result;
97
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
98
- yield yield __await(result.value || []);
99
- });
77
+ async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
78
+ let result;
79
+ result = await this._listByResourceGroup(resourceGroupName, options);
80
+ yield result.value || [];
100
81
  }
101
- listByResourceGroupPagingAll(resourceGroupName, options) {
102
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
103
- var _a, e_2, _b, _c;
104
- try {
105
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
106
- _c = _f.value;
107
- _d = false;
108
- const page = _c;
109
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
110
- }
111
- }
112
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
113
- finally {
114
- try {
115
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
116
- }
117
- finally { if (e_2) throw e_2.error; }
118
- }
119
- });
82
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
83
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
84
+ yield* page;
85
+ }
120
86
  }
121
87
  /**
122
88
  * Create a new action group or update an existing one.
@@ -168,14 +134,19 @@ export class ActionGroupsImpl {
168
134
  return this.client.sendOperationRequest(args, spec);
169
135
  };
170
136
  const sendOperationFn = async (args, spec) => {
171
- var _a;
172
137
  let currentRawResponse = undefined;
173
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
138
+ const providedCallback = args.options?.onResponse;
174
139
  const callback = (rawResponse, flatResponse) => {
175
140
  currentRawResponse = rawResponse;
176
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
141
+ providedCallback?.(rawResponse, flatResponse);
142
+ };
143
+ const updatedArgs = {
144
+ ...args,
145
+ options: {
146
+ ...args.options,
147
+ onResponse: callback,
148
+ },
177
149
  };
178
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
179
150
  const flatResponse = await directSendOperation(updatedArgs, spec);
180
151
  return {
181
152
  flatResponse,
@@ -197,8 +168,8 @@ export class ActionGroupsImpl {
197
168
  spec: createNotificationsAtActionGroupResourceLevelOperationSpec,
198
169
  });
199
170
  const poller = await createHttpPoller(lro, {
200
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
201
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
171
+ restoreFrom: options?.resumeFrom,
172
+ intervalInMs: options?.updateIntervalInMs,
202
173
  resourceLocationConfig: "location",
203
174
  });
204
175
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"actionGroups.js","sourceRoot":"","sources":["../../../src/operations/actionGroups.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO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EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EAAE,0IAA0I;IAChJ,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE;YACH,OAAO,EAAE,IAAI;SACd;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,aAAa;IACrC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { ActionGroups } 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 SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n ActionGroupResource,\n ActionGroupsListBySubscriptionIdOptionalParams,\n ActionGroupsListBySubscriptionIdResponse,\n ActionGroupsListByResourceGroupOptionalParams,\n ActionGroupsListByResourceGroupResponse,\n ActionGroupsCreateOrUpdateOptionalParams,\n ActionGroupsCreateOrUpdateResponse,\n ActionGroupsGetOptionalParams,\n ActionGroupsGetResponse,\n ActionGroupsDeleteOptionalParams,\n ActionGroupPatchBody,\n ActionGroupsUpdateOptionalParams,\n ActionGroupsUpdateResponse,\n NotificationRequestBody,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse,\n EnableRequest,\n ActionGroupsEnableReceiverOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ActionGroups operations. */\nexport class ActionGroupsImpl implements ActionGroups {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class ActionGroups class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Get a list of all action groups in a subscription.\n * @param options The options parameters.\n */\n public listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\n const iter = this.listBySubscriptionIdPagingAll(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.listBySubscriptionIdPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionIdPagingPage(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListBySubscriptionIdResponse;\n result = await this._listBySubscriptionId(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionIdPagingAll(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listBySubscriptionIdPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get a list of all action groups in a 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\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?: ActionGroupsListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: ActionGroupsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create a new action group or update an existing one.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroup The action group to create or use for the update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroup: ActionGroupResource,\n options?: ActionGroupsCreateOrUpdateOptionalParams,\n ): Promise<ActionGroupsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroup, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Get an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsGetOptionalParams,\n ): Promise<ActionGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Delete an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroupPatch Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroupPatch: ActionGroupPatchBody,\n options?: ActionGroupsUpdateOptionalParams,\n ): Promise<ActionGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroupPatch, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevelAndWait(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationId: string,\n options?: ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, notificationId, options },\n getTestNotificationsAtActionGroupResourceLevelOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): Promise<ActionGroupsListBySubscriptionIdResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionIdOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups in a 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): Promise<ActionGroupsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.\n * This operation is only supported for Email or SMS receivers.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param enableRequest The receiver to re-enable.\n * @param options The options parameters.\n */\n enableReceiver(\n resourceGroupName: string,\n actionGroupName: string,\n enableRequest: EnableRequest,\n options?: ActionGroupsEnableReceiverOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, enableRequest, options },\n enableReceiverOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n 201: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroup,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroupPatch,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.notificationRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst getTestNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n Parameters.notificationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n };\nconst listBySubscriptionIdOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst enableReceiverOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 409: {\n isError: true,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.enableRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,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C,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EAAE,0IAA0I;IAChJ,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE;YACH,OAAO,EAAE,IAAI;SACd;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,aAAa;IACrC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { ActionGroups } 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 SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n ActionGroupResource,\n ActionGroupsListBySubscriptionIdOptionalParams,\n ActionGroupsListBySubscriptionIdResponse,\n ActionGroupsListByResourceGroupOptionalParams,\n ActionGroupsListByResourceGroupResponse,\n ActionGroupsCreateOrUpdateOptionalParams,\n ActionGroupsCreateOrUpdateResponse,\n ActionGroupsGetOptionalParams,\n ActionGroupsGetResponse,\n ActionGroupsDeleteOptionalParams,\n ActionGroupPatchBody,\n ActionGroupsUpdateOptionalParams,\n ActionGroupsUpdateResponse,\n NotificationRequestBody,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse,\n EnableRequest,\n ActionGroupsEnableReceiverOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ActionGroups operations. */\nexport class ActionGroupsImpl implements ActionGroups {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class ActionGroups class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Get a list of all action groups in a subscription.\n * @param options The options parameters.\n */\n public listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\n const iter = this.listBySubscriptionIdPagingAll(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.listBySubscriptionIdPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionIdPagingPage(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListBySubscriptionIdResponse;\n result = await this._listBySubscriptionId(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionIdPagingAll(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listBySubscriptionIdPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get a list of all action groups in a 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\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?: ActionGroupsListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: ActionGroupsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create a new action group or update an existing one.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroup The action group to create or use for the update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroup: ActionGroupResource,\n options?: ActionGroupsCreateOrUpdateOptionalParams,\n ): Promise<ActionGroupsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroup, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Get an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsGetOptionalParams,\n ): Promise<ActionGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Delete an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroupPatch Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroupPatch: ActionGroupPatchBody,\n options?: ActionGroupsUpdateOptionalParams,\n ): Promise<ActionGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroupPatch, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevelAndWait(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationId: string,\n options?: ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, notificationId, options },\n getTestNotificationsAtActionGroupResourceLevelOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): Promise<ActionGroupsListBySubscriptionIdResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionIdOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups in a 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): Promise<ActionGroupsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.\n * This operation is only supported for Email or SMS receivers.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param enableRequest The receiver to re-enable.\n * @param options The options parameters.\n */\n enableReceiver(\n resourceGroupName: string,\n actionGroupName: string,\n enableRequest: EnableRequest,\n options?: ActionGroupsEnableReceiverOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, enableRequest, options },\n enableReceiverOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n 201: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroup,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroupPatch,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.notificationRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst getTestNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n Parameters.notificationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n };\nconst listBySubscriptionIdOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst enableReceiverOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 409: {\n isError: true,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.enableRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"]}