@azure/arm-costmanagement 1.0.0-alpha.20250718.1 → 1.0.0-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/browser/costManagementClient.js +28 -5
  2. package/dist/browser/costManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +256 -117
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/alerts.js +1 -0
  8. package/dist/browser/operations/alerts.js.map +1 -1
  9. package/dist/browser/operations/benefitRecommendations.js +23 -40
  10. package/dist/browser/operations/benefitRecommendations.js.map +1 -1
  11. package/dist/browser/operations/benefitUtilizationSummaries.js +89 -157
  12. package/dist/browser/operations/benefitUtilizationSummaries.js.map +1 -1
  13. package/dist/browser/operations/dimensions.js +19 -53
  14. package/dist/browser/operations/dimensions.js.map +1 -1
  15. package/dist/browser/operations/exports.js +1 -0
  16. package/dist/browser/operations/exports.js.map +1 -1
  17. package/dist/browser/operations/forecast.js +1 -0
  18. package/dist/browser/operations/forecast.js.map +1 -1
  19. package/dist/browser/operations/generateCostDetailsReport.js +23 -12
  20. package/dist/browser/operations/generateCostDetailsReport.js.map +1 -1
  21. package/dist/browser/operations/generateDetailedCostReport.js +12 -6
  22. package/dist/browser/operations/generateDetailedCostReport.js.map +1 -1
  23. package/dist/browser/operations/generateDetailedCostReportOperationResults.js +12 -6
  24. package/dist/browser/operations/generateDetailedCostReportOperationResults.js.map +1 -1
  25. package/dist/browser/operations/generateDetailedCostReportOperationStatus.js +1 -0
  26. package/dist/browser/operations/generateDetailedCostReportOperationStatus.js.map +1 -1
  27. package/dist/browser/operations/generateReservationDetailsReport.js +23 -12
  28. package/dist/browser/operations/generateReservationDetailsReport.js.map +1 -1
  29. package/dist/browser/operations/operations.js +23 -40
  30. package/dist/browser/operations/operations.js.map +1 -1
  31. package/dist/browser/operations/priceSheet.js +23 -12
  32. package/dist/browser/operations/priceSheet.js.map +1 -1
  33. package/dist/browser/operations/query.js +1 -0
  34. package/dist/browser/operations/query.js.map +1 -1
  35. package/dist/browser/operations/scheduledActions.js +45 -79
  36. package/dist/browser/operations/scheduledActions.js.map +1 -1
  37. package/dist/browser/operations/views.js +45 -79
  38. package/dist/browser/operations/views.js.map +1 -1
  39. package/dist/browser/pagingHelper.js +2 -4
  40. package/dist/browser/pagingHelper.js.map +1 -1
  41. package/dist/commonjs/costManagementClient.js +28 -5
  42. package/dist/commonjs/costManagementClient.js.map +1 -1
  43. package/dist/commonjs/lroImpl.js +7 -3
  44. package/dist/commonjs/lroImpl.js.map +1 -1
  45. package/dist/commonjs/models/mappers.js +256 -117
  46. package/dist/commonjs/models/mappers.js.map +1 -1
  47. package/dist/commonjs/operations/alerts.js +1 -0
  48. package/dist/commonjs/operations/alerts.js.map +1 -1
  49. package/dist/commonjs/operations/benefitRecommendations.js +23 -39
  50. package/dist/commonjs/operations/benefitRecommendations.js.map +1 -1
  51. package/dist/commonjs/operations/benefitUtilizationSummaries.js +89 -156
  52. package/dist/commonjs/operations/benefitUtilizationSummaries.js.map +1 -1
  53. package/dist/commonjs/operations/dimensions.js +19 -52
  54. package/dist/commonjs/operations/dimensions.js.map +1 -1
  55. package/dist/commonjs/operations/exports.js +1 -0
  56. package/dist/commonjs/operations/exports.js.map +1 -1
  57. package/dist/commonjs/operations/forecast.js +1 -0
  58. package/dist/commonjs/operations/forecast.js.map +1 -1
  59. package/dist/commonjs/operations/generateCostDetailsReport.js +23 -12
  60. package/dist/commonjs/operations/generateCostDetailsReport.js.map +1 -1
  61. package/dist/commonjs/operations/generateDetailedCostReport.js +12 -6
  62. package/dist/commonjs/operations/generateDetailedCostReport.js.map +1 -1
  63. package/dist/commonjs/operations/generateDetailedCostReportOperationResults.js +12 -6
  64. package/dist/commonjs/operations/generateDetailedCostReportOperationResults.js.map +1 -1
  65. package/dist/commonjs/operations/generateDetailedCostReportOperationStatus.js +1 -0
  66. package/dist/commonjs/operations/generateDetailedCostReportOperationStatus.js.map +1 -1
  67. package/dist/commonjs/operations/generateReservationDetailsReport.js +23 -12
  68. package/dist/commonjs/operations/generateReservationDetailsReport.js.map +1 -1
  69. package/dist/commonjs/operations/operations.js +23 -39
  70. package/dist/commonjs/operations/operations.js.map +1 -1
  71. package/dist/commonjs/operations/priceSheet.js +23 -12
  72. package/dist/commonjs/operations/priceSheet.js.map +1 -1
  73. package/dist/commonjs/operations/query.js +1 -0
  74. package/dist/commonjs/operations/query.js.map +1 -1
  75. package/dist/commonjs/operations/scheduledActions.js +45 -78
  76. package/dist/commonjs/operations/scheduledActions.js.map +1 -1
  77. package/dist/commonjs/operations/views.js +45 -78
  78. package/dist/commonjs/operations/views.js.map +1 -1
  79. package/dist/commonjs/pagingHelper.js +2 -4
  80. package/dist/commonjs/pagingHelper.js.map +1 -1
  81. package/dist/commonjs/tsdoc-metadata.json +11 -11
  82. package/dist/esm/costManagementClient.js +28 -5
  83. package/dist/esm/costManagementClient.js.map +1 -1
  84. package/dist/esm/lroImpl.js +7 -3
  85. package/dist/esm/lroImpl.js.map +1 -1
  86. package/dist/esm/models/mappers.js +256 -117
  87. package/dist/esm/models/mappers.js.map +1 -1
  88. package/dist/esm/operations/alerts.js +1 -0
  89. package/dist/esm/operations/alerts.js.map +1 -1
  90. package/dist/esm/operations/benefitRecommendations.js +23 -40
  91. package/dist/esm/operations/benefitRecommendations.js.map +1 -1
  92. package/dist/esm/operations/benefitUtilizationSummaries.js +89 -157
  93. package/dist/esm/operations/benefitUtilizationSummaries.js.map +1 -1
  94. package/dist/esm/operations/dimensions.js +19 -53
  95. package/dist/esm/operations/dimensions.js.map +1 -1
  96. package/dist/esm/operations/exports.js +1 -0
  97. package/dist/esm/operations/exports.js.map +1 -1
  98. package/dist/esm/operations/forecast.js +1 -0
  99. package/dist/esm/operations/forecast.js.map +1 -1
  100. package/dist/esm/operations/generateCostDetailsReport.js +23 -12
  101. package/dist/esm/operations/generateCostDetailsReport.js.map +1 -1
  102. package/dist/esm/operations/generateDetailedCostReport.js +12 -6
  103. package/dist/esm/operations/generateDetailedCostReport.js.map +1 -1
  104. package/dist/esm/operations/generateDetailedCostReportOperationResults.js +12 -6
  105. package/dist/esm/operations/generateDetailedCostReportOperationResults.js.map +1 -1
  106. package/dist/esm/operations/generateDetailedCostReportOperationStatus.js +1 -0
  107. package/dist/esm/operations/generateDetailedCostReportOperationStatus.js.map +1 -1
  108. package/dist/esm/operations/generateReservationDetailsReport.js +23 -12
  109. package/dist/esm/operations/generateReservationDetailsReport.js.map +1 -1
  110. package/dist/esm/operations/operations.js +23 -40
  111. package/dist/esm/operations/operations.js.map +1 -1
  112. package/dist/esm/operations/priceSheet.js +23 -12
  113. package/dist/esm/operations/priceSheet.js.map +1 -1
  114. package/dist/esm/operations/query.js +1 -0
  115. package/dist/esm/operations/query.js.map +1 -1
  116. package/dist/esm/operations/scheduledActions.js +45 -79
  117. package/dist/esm/operations/scheduledActions.js.map +1 -1
  118. package/dist/esm/operations/views.js +45 -79
  119. package/dist/esm/operations/views.js.map +1 -1
  120. package/dist/esm/pagingHelper.js +2 -4
  121. package/dist/esm/pagingHelper.js.map +1 -1
  122. package/dist/react-native/costManagementClient.js +28 -5
  123. package/dist/react-native/costManagementClient.js.map +1 -1
  124. package/dist/react-native/lroImpl.js +7 -3
  125. package/dist/react-native/lroImpl.js.map +1 -1
  126. package/dist/react-native/models/mappers.js +256 -117
  127. package/dist/react-native/models/mappers.js.map +1 -1
  128. package/dist/react-native/operations/alerts.js +1 -0
  129. package/dist/react-native/operations/alerts.js.map +1 -1
  130. package/dist/react-native/operations/benefitRecommendations.js +23 -40
  131. package/dist/react-native/operations/benefitRecommendations.js.map +1 -1
  132. package/dist/react-native/operations/benefitUtilizationSummaries.js +89 -157
  133. package/dist/react-native/operations/benefitUtilizationSummaries.js.map +1 -1
  134. package/dist/react-native/operations/dimensions.js +19 -53
  135. package/dist/react-native/operations/dimensions.js.map +1 -1
  136. package/dist/react-native/operations/exports.js +1 -0
  137. package/dist/react-native/operations/exports.js.map +1 -1
  138. package/dist/react-native/operations/forecast.js +1 -0
  139. package/dist/react-native/operations/forecast.js.map +1 -1
  140. package/dist/react-native/operations/generateCostDetailsReport.js +23 -12
  141. package/dist/react-native/operations/generateCostDetailsReport.js.map +1 -1
  142. package/dist/react-native/operations/generateDetailedCostReport.js +12 -6
  143. package/dist/react-native/operations/generateDetailedCostReport.js.map +1 -1
  144. package/dist/react-native/operations/generateDetailedCostReportOperationResults.js +12 -6
  145. package/dist/react-native/operations/generateDetailedCostReportOperationResults.js.map +1 -1
  146. package/dist/react-native/operations/generateDetailedCostReportOperationStatus.js +1 -0
  147. package/dist/react-native/operations/generateDetailedCostReportOperationStatus.js.map +1 -1
  148. package/dist/react-native/operations/generateReservationDetailsReport.js +23 -12
  149. package/dist/react-native/operations/generateReservationDetailsReport.js.map +1 -1
  150. package/dist/react-native/operations/operations.js +23 -40
  151. package/dist/react-native/operations/operations.js.map +1 -1
  152. package/dist/react-native/operations/priceSheet.js +23 -12
  153. package/dist/react-native/operations/priceSheet.js.map +1 -1
  154. package/dist/react-native/operations/query.js +1 -0
  155. package/dist/react-native/operations/query.js.map +1 -1
  156. package/dist/react-native/operations/scheduledActions.js +45 -79
  157. package/dist/react-native/operations/scheduledActions.js.map +1 -1
  158. package/dist/react-native/operations/views.js +45 -79
  159. package/dist/react-native/operations/views.js.map +1 -1
  160. package/dist/react-native/pagingHelper.js +2 -4
  161. package/dist/react-native/pagingHelper.js.map +1 -1
  162. package/package.json +2 -2
  163. package/review/arm-costmanagement-node.api.md +2064 -2064
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
10
10
  import * as Parameters from "../models/parameters.js";
11
11
  /** Class containing Alerts operations. */
12
12
  export class AlertsImpl {
13
+ client;
13
14
  /**
14
15
  * Initialize a new instance of the class Alerts class.
15
16
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"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CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC;IACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,yBAAyB,GAA6B;IAC1D,IAAI,EACF,kGAAkG;IACpG,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,YAAY;SACjC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,uBAAuB;KACnC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Alerts } 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 { CostManagementClient } from \"../costManagementClient.js\";\nimport {\n AlertsListOptionalParams,\n AlertsListResponse,\n AlertsGetOptionalParams,\n AlertsGetResponse,\n DismissAlertPayload,\n AlertsDismissOptionalParams,\n AlertsDismissResponse,\n ExternalCloudProviderType,\n AlertsListExternalOptionalParams,\n AlertsListExternalResponse\n} from \"../models/index.js\";\n\n/** Class containing Alerts operations. */\nexport class AlertsImpl implements Alerts {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class Alerts class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the alerts for scope defined.\n * @param scope The scope associated with alerts operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific\n * for partners.\n * @param options The options parameters.\n */\n list(\n scope: string,\n options?: AlertsListOptionalParams\n ): Promise<AlertsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * Gets the alert for the scope by alert ID.\n * @param scope The scope associated with alerts operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific\n * for partners.\n * @param alertId Alert ID\n * @param options The options parameters.\n */\n get(\n scope: string,\n alertId: string,\n options?: AlertsGetOptionalParams\n ): Promise<AlertsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, alertId, options },\n getOperationSpec\n );\n }\n\n /**\n * Dismisses the specified alert\n * @param scope The scope associated with alerts operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific\n * for partners.\n * @param alertId Alert ID\n * @param parameters Parameters supplied to the Dismiss Alert operation.\n * @param options The options parameters.\n */\n dismiss(\n scope: string,\n alertId: string,\n parameters: DismissAlertPayload,\n options?: AlertsDismissOptionalParams\n ): Promise<AlertsDismissResponse> {\n return this.client.sendOperationRequest(\n { scope, alertId, parameters, options },\n dismissOperationSpec\n );\n }\n\n /**\n * Lists the Alerts for external cloud provider type defined.\n * @param externalCloudProviderType The external cloud provider type associated with dimension/query\n * operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts'\n * for consolidated account.\n * @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or\n * '{externalBillingAccountId}' for consolidated account used with dimension/query operations.\n * @param options The options parameters.\n */\n listExternal(\n externalCloudProviderType: ExternalCloudProviderType,\n externalCloudProviderId: string,\n options?: AlertsListExternalOptionalParams\n ): Promise<AlertsListExternalResponse> {\n return this.client.sendOperationRequest(\n { externalCloudProviderType, externalCloudProviderId, options },\n listExternalOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/alerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertsResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Alert\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1, Parameters.alertId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst dismissOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Alert\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1, Parameters.alertId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listExternalOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertsResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.externalCloudProviderType,\n Parameters.externalCloudProviderId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../../src/operations/alerts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,0CAA0C;AAC1C,MAAM,OAAO,UAAU;IACJ,MAAM,CAAuB;IAE9C;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,KAAa,EACb,OAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,OAAO,EAAE,EAClB,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,GAAG,CACD,KAAa,EACb,OAAe,EACf,OAAiC;QAEjC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAC3B,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CACL,KAAa,EACb,OAAe,EACf,UAA+B,EAC/B,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,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UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,8DAA8D;IACpE,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,KAAK;SAC1B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC;IACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,yBAAyB,GAA6B;IAC1D,IAAI,EACF,kGAAkG;IACpG,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,YAAY;SACjC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,uBAAuB;KACnC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Alerts } 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 { CostManagementClient } from \"../costManagementClient.js\";\nimport {\n AlertsListOptionalParams,\n AlertsListResponse,\n AlertsGetOptionalParams,\n AlertsGetResponse,\n DismissAlertPayload,\n AlertsDismissOptionalParams,\n AlertsDismissResponse,\n ExternalCloudProviderType,\n AlertsListExternalOptionalParams,\n AlertsListExternalResponse\n} from \"../models/index.js\";\n\n/** Class containing Alerts operations. */\nexport class AlertsImpl implements Alerts {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class Alerts class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the alerts for scope defined.\n * @param scope The scope associated with alerts operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific\n * for partners.\n * @param options The options parameters.\n */\n list(\n scope: string,\n options?: AlertsListOptionalParams\n ): Promise<AlertsListResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listOperationSpec\n );\n }\n\n /**\n * Gets the alert for the scope by alert ID.\n * @param scope The scope associated with alerts operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific\n * for partners.\n * @param alertId Alert ID\n * @param options The options parameters.\n */\n get(\n scope: string,\n alertId: string,\n options?: AlertsGetOptionalParams\n ): Promise<AlertsGetResponse> {\n return this.client.sendOperationRequest(\n { scope, alertId, options },\n getOperationSpec\n );\n }\n\n /**\n * Dismisses the specified alert\n * @param scope The scope associated with alerts operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}\n * for Management Group scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billingProfile scope,\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'\n * for invoiceSection scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific\n * for partners.\n * @param alertId Alert ID\n * @param parameters Parameters supplied to the Dismiss Alert operation.\n * @param options The options parameters.\n */\n dismiss(\n scope: string,\n alertId: string,\n parameters: DismissAlertPayload,\n options?: AlertsDismissOptionalParams\n ): Promise<AlertsDismissResponse> {\n return this.client.sendOperationRequest(\n { scope, alertId, parameters, options },\n dismissOperationSpec\n );\n }\n\n /**\n * Lists the Alerts for external cloud provider type defined.\n * @param externalCloudProviderType The external cloud provider type associated with dimension/query\n * operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts'\n * for consolidated account.\n * @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or\n * '{externalBillingAccountId}' for consolidated account used with dimension/query operations.\n * @param options The options parameters.\n */\n listExternal(\n externalCloudProviderType: ExternalCloudProviderType,\n externalCloudProviderId: string,\n options?: AlertsListExternalOptionalParams\n ): Promise<AlertsListExternalResponse> {\n return this.client.sendOperationRequest(\n { externalCloudProviderType, externalCloudProviderId, options },\n listExternalOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/alerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertsResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Alert\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1, Parameters.alertId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst dismissOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Alert\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1, Parameters.alertId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listExternalOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertsResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.externalCloudProviderType,\n Parameters.externalCloudProviderId\n ],\n headerParameters: [Parameters.accept],\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 { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing BenefitRecommendations operations. */
15
14
  export class BenefitRecommendationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class BenefitRecommendations class.
18
18
  * @param client Reference to the service client
@@ -40,52 +40,35 @@ export class BenefitRecommendationsImpl {
40
40
  return this;
41
41
  },
42
42
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
44
44
  throw new Error("maxPageSize is not supported by this operation.");
45
45
  }
46
46
  return this.listPagingPage(billingScope, options, settings);
47
47
  }
48
48
  };
49
49
  }
50
- listPagingPage(billingScope, options, settings) {
51
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
54
- if (!continuationToken) {
55
- result = yield __await(this._list(billingScope, options));
56
- let page = result.value || [];
57
- continuationToken = result.nextLink;
58
- setContinuationToken(page, continuationToken);
59
- yield yield __await(page);
60
- }
61
- while (continuationToken) {
62
- result = yield __await(this._listNext(billingScope, continuationToken, options));
63
- continuationToken = result.nextLink;
64
- let page = result.value || [];
65
- setContinuationToken(page, continuationToken);
66
- yield yield __await(page);
67
- }
68
- });
50
+ async *listPagingPage(billingScope, options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._list(billingScope, options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ setContinuationToken(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listNext(billingScope, continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ setContinuationToken(page, continuationToken);
65
+ yield page;
66
+ }
69
67
  }
70
- listPagingAll(billingScope, options) {
71
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = __asyncValues(this.listPagingPage(billingScope, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
75
- _c = _f.value;
76
- _d = false;
77
- const page = _c;
78
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
79
- }
80
- }
81
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
82
- finally {
83
- try {
84
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- });
68
+ async *listPagingAll(billingScope, options) {
69
+ for await (const page of this.listPagingPage(billingScope, options)) {
70
+ yield* page;
71
+ }
89
72
  }
90
73
  /**
91
74
  * List of recommendations for purchasing savings plan.
@@ -1 +1 @@
1
- {"version":3,"file":"benefitRecommendations.js","sourceRoot":"","sources":["../../../src/operations/benefitRecommendations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,IAAI,CACT,YAAoB,EACpB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACvD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC9D,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,YAAoB,EACpB,OAAkD,EAClD,QAAuB;;YAEvB,IAAI,MAA0C,CAAC;YAC/C,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copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { BenefitRecommendations } 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 { CostManagementClient } from \"../costManagementClient.js\";\nimport {\n BenefitRecommendationModel,\n BenefitRecommendationsListNextOptionalParams,\n BenefitRecommendationsListOptionalParams,\n BenefitRecommendationsListResponse,\n BenefitRecommendationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing BenefitRecommendations operations. */\nexport class BenefitRecommendationsImpl implements BenefitRecommendations {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class BenefitRecommendations class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * List of recommendations for purchasing savings plan.\n * @param billingScope The scope associated with benefit recommendation operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billing profile scope\n * @param options The options parameters.\n */\n public list(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams\n ): PagedAsyncIterableIterator<BenefitRecommendationModel> {\n const iter = this.listPagingAll(billingScope, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(billingScope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<BenefitRecommendationModel[]> {\n let result: BenefitRecommendationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(billingScope, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(billingScope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams\n ): AsyncIterableIterator<BenefitRecommendationModel> {\n for await (const page of this.listPagingPage(billingScope, options)) {\n yield* page;\n }\n }\n\n /**\n * List of recommendations for purchasing savings plan.\n * @param billingScope The scope associated with benefit recommendation operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billing profile scope\n * @param options The options parameters.\n */\n private _list(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams\n ): Promise<BenefitRecommendationsListResponse> {\n return this.client.sendOperationRequest(\n { billingScope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param billingScope The scope associated with benefit recommendation operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billing profile scope\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n billingScope: string,\n nextLink: string,\n options?: BenefitRecommendationsListNextOptionalParams\n ): Promise<BenefitRecommendationsListNextResponse> {\n return this.client.sendOperationRequest(\n { billingScope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BenefitRecommendationsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.expand,\n Parameters.orderby\n ],\n urlParameters: [Parameters.$host, Parameters.billingScope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BenefitRecommendationsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingScope\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"benefitRecommendations.js","sourceRoot":"","sources":["../../../src/operations/benefitRecommendations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IACpB,MAAM,CAAuB;IAE9C;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,C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AAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { BenefitRecommendations } 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 { CostManagementClient } from \"../costManagementClient.js\";\nimport {\n BenefitRecommendationModel,\n BenefitRecommendationsListNextOptionalParams,\n BenefitRecommendationsListOptionalParams,\n BenefitRecommendationsListResponse,\n BenefitRecommendationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing BenefitRecommendations operations. */\nexport class BenefitRecommendationsImpl implements BenefitRecommendations {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class BenefitRecommendations class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * List of recommendations for purchasing savings plan.\n * @param billingScope The scope associated with benefit recommendation operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billing profile scope\n * @param options The options parameters.\n */\n public list(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams\n ): PagedAsyncIterableIterator<BenefitRecommendationModel> {\n const iter = this.listPagingAll(billingScope, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(billingScope, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<BenefitRecommendationModel[]> {\n let result: BenefitRecommendationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(billingScope, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(billingScope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams\n ): AsyncIterableIterator<BenefitRecommendationModel> {\n for await (const page of this.listPagingPage(billingScope, options)) {\n yield* page;\n }\n }\n\n /**\n * List of recommendations for purchasing savings plan.\n * @param billingScope The scope associated with benefit recommendation operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billing profile scope\n * @param options The options parameters.\n */\n private _list(\n billingScope: string,\n options?: BenefitRecommendationsListOptionalParams\n ): Promise<BenefitRecommendationsListResponse> {\n return this.client.sendOperationRequest(\n { billingScope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param billingScope The scope associated with benefit recommendation operations. This includes\n * '/subscriptions/{subscriptionId}/' for subscription scope,\n * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,\n * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and\n * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for billing profile scope\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n billingScope: string,\n nextLink: string,\n options?: BenefitRecommendationsListNextOptionalParams\n ): Promise<BenefitRecommendationsListNextResponse> {\n return this.client.sendOperationRequest(\n { billingScope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BenefitRecommendationsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.filter,\n Parameters.expand,\n Parameters.orderby\n ],\n urlParameters: [Parameters.$host, Parameters.billingScope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BenefitRecommendationsListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.billingScope\n ],\n headerParameters: [Parameters.accept],\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 { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing BenefitUtilizationSummaries operations. */
15
14
  export class BenefitUtilizationSummariesImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class BenefitUtilizationSummaries class.
18
18
  * @param client Reference to the service client
@@ -36,52 +36,35 @@ export class BenefitUtilizationSummariesImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listByBillingAccountIdPagingPage(billingAccountId, options, settings);
43
43
  }
44
44
  };
45
45
  }
46
- listByBillingAccountIdPagingPage(billingAccountId, options, settings) {
47
- return __asyncGenerator(this, arguments, function* listByBillingAccountIdPagingPage_1() {
48
- let result;
49
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
- if (!continuationToken) {
51
- result = yield __await(this._listByBillingAccountId(billingAccountId, options));
52
- let page = result.value || [];
53
- continuationToken = result.nextLink;
54
- setContinuationToken(page, continuationToken);
55
- yield yield __await(page);
56
- }
57
- while (continuationToken) {
58
- result = yield __await(this._listByBillingAccountIdNext(billingAccountId, continuationToken, options));
59
- continuationToken = result.nextLink;
60
- let page = result.value || [];
61
- setContinuationToken(page, continuationToken);
62
- yield yield __await(page);
63
- }
64
- });
46
+ async *listByBillingAccountIdPagingPage(billingAccountId, options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._listByBillingAccountId(billingAccountId, options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listByBillingAccountIdNext(billingAccountId, continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
65
63
  }
66
- listByBillingAccountIdPagingAll(billingAccountId, options) {
67
- return __asyncGenerator(this, arguments, function* listByBillingAccountIdPagingAll_1() {
68
- var _a, e_1, _b, _c;
69
- try {
70
- for (var _d = true, _e = __asyncValues(this.listByBillingAccountIdPagingPage(billingAccountId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
- _c = _f.value;
72
- _d = false;
73
- const page = _c;
74
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
- }
76
- }
77
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
- finally {
79
- try {
80
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
- }
82
- finally { if (e_1) throw e_1.error; }
83
- }
84
- });
64
+ async *listByBillingAccountIdPagingAll(billingAccountId, options) {
65
+ for await (const page of this.listByBillingAccountIdPagingPage(billingAccountId, options)) {
66
+ yield* page;
67
+ }
85
68
  }
86
69
  /**
87
70
  * Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and
@@ -100,52 +83,35 @@ export class BenefitUtilizationSummariesImpl {
100
83
  return this;
101
84
  },
102
85
  byPage: (settings) => {
103
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
86
+ if (settings?.maxPageSize) {
104
87
  throw new Error("maxPageSize is not supported by this operation.");
105
88
  }
106
89
  return this.listByBillingProfileIdPagingPage(billingAccountId, billingProfileId, options, settings);
107
90
  }
108
91
  };
109
92
  }
110
- listByBillingProfileIdPagingPage(billingAccountId, billingProfileId, options, settings) {
111
- return __asyncGenerator(this, arguments, function* listByBillingProfileIdPagingPage_1() {
112
- let result;
113
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
114
- if (!continuationToken) {
115
- result = yield __await(this._listByBillingProfileId(billingAccountId, billingProfileId, options));
116
- let page = result.value || [];
117
- continuationToken = result.nextLink;
118
- setContinuationToken(page, continuationToken);
119
- yield yield __await(page);
120
- }
121
- while (continuationToken) {
122
- result = yield __await(this._listByBillingProfileIdNext(billingAccountId, billingProfileId, continuationToken, options));
123
- continuationToken = result.nextLink;
124
- let page = result.value || [];
125
- setContinuationToken(page, continuationToken);
126
- yield yield __await(page);
127
- }
128
- });
93
+ async *listByBillingProfileIdPagingPage(billingAccountId, billingProfileId, options, settings) {
94
+ let result;
95
+ let continuationToken = settings?.continuationToken;
96
+ if (!continuationToken) {
97
+ result = await this._listByBillingProfileId(billingAccountId, billingProfileId, options);
98
+ let page = result.value || [];
99
+ continuationToken = result.nextLink;
100
+ setContinuationToken(page, continuationToken);
101
+ yield page;
102
+ }
103
+ while (continuationToken) {
104
+ result = await this._listByBillingProfileIdNext(billingAccountId, billingProfileId, continuationToken, options);
105
+ continuationToken = result.nextLink;
106
+ let page = result.value || [];
107
+ setContinuationToken(page, continuationToken);
108
+ yield page;
109
+ }
129
110
  }
130
- listByBillingProfileIdPagingAll(billingAccountId, billingProfileId, options) {
131
- return __asyncGenerator(this, arguments, function* listByBillingProfileIdPagingAll_1() {
132
- var _a, e_2, _b, _c;
133
- try {
134
- for (var _d = true, _e = __asyncValues(this.listByBillingProfileIdPagingPage(billingAccountId, billingProfileId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
135
- _c = _f.value;
136
- _d = false;
137
- const page = _c;
138
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
139
- }
140
- }
141
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
142
- finally {
143
- try {
144
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
145
- }
146
- finally { if (e_2) throw e_2.error; }
147
- }
148
- });
111
+ async *listByBillingProfileIdPagingAll(billingAccountId, billingProfileId, options) {
112
+ for await (const page of this.listByBillingProfileIdPagingPage(billingAccountId, billingProfileId, options)) {
113
+ yield* page;
114
+ }
149
115
  }
150
116
  /**
151
117
  * Lists the savings plan utilization summaries for daily or monthly grain.
@@ -162,52 +128,35 @@ export class BenefitUtilizationSummariesImpl {
162
128
  return this;
163
129
  },
164
130
  byPage: (settings) => {
165
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
131
+ if (settings?.maxPageSize) {
166
132
  throw new Error("maxPageSize is not supported by this operation.");
167
133
  }
168
134
  return this.listBySavingsPlanOrderPagingPage(savingsPlanOrderId, options, settings);
169
135
  }
170
136
  };
171
137
  }
172
- listBySavingsPlanOrderPagingPage(savingsPlanOrderId, options, settings) {
173
- return __asyncGenerator(this, arguments, function* listBySavingsPlanOrderPagingPage_1() {
174
- let result;
175
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
176
- if (!continuationToken) {
177
- result = yield __await(this._listBySavingsPlanOrder(savingsPlanOrderId, options));
178
- let page = result.value || [];
179
- continuationToken = result.nextLink;
180
- setContinuationToken(page, continuationToken);
181
- yield yield __await(page);
182
- }
183
- while (continuationToken) {
184
- result = yield __await(this._listBySavingsPlanOrderNext(savingsPlanOrderId, continuationToken, options));
185
- continuationToken = result.nextLink;
186
- let page = result.value || [];
187
- setContinuationToken(page, continuationToken);
188
- yield yield __await(page);
189
- }
190
- });
138
+ async *listBySavingsPlanOrderPagingPage(savingsPlanOrderId, options, settings) {
139
+ let result;
140
+ let continuationToken = settings?.continuationToken;
141
+ if (!continuationToken) {
142
+ result = await this._listBySavingsPlanOrder(savingsPlanOrderId, options);
143
+ let page = result.value || [];
144
+ continuationToken = result.nextLink;
145
+ setContinuationToken(page, continuationToken);
146
+ yield page;
147
+ }
148
+ while (continuationToken) {
149
+ result = await this._listBySavingsPlanOrderNext(savingsPlanOrderId, continuationToken, options);
150
+ continuationToken = result.nextLink;
151
+ let page = result.value || [];
152
+ setContinuationToken(page, continuationToken);
153
+ yield page;
154
+ }
191
155
  }
192
- listBySavingsPlanOrderPagingAll(savingsPlanOrderId, options) {
193
- return __asyncGenerator(this, arguments, function* listBySavingsPlanOrderPagingAll_1() {
194
- var _a, e_3, _b, _c;
195
- try {
196
- for (var _d = true, _e = __asyncValues(this.listBySavingsPlanOrderPagingPage(savingsPlanOrderId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
197
- _c = _f.value;
198
- _d = false;
199
- const page = _c;
200
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
201
- }
202
- }
203
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
204
- finally {
205
- try {
206
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
207
- }
208
- finally { if (e_3) throw e_3.error; }
209
- }
210
- });
156
+ async *listBySavingsPlanOrderPagingAll(savingsPlanOrderId, options) {
157
+ for await (const page of this.listBySavingsPlanOrderPagingPage(savingsPlanOrderId, options)) {
158
+ yield* page;
159
+ }
211
160
  }
212
161
  /**
213
162
  * Lists the savings plan utilization summaries for daily or monthly grain.
@@ -225,52 +174,35 @@ export class BenefitUtilizationSummariesImpl {
225
174
  return this;
226
175
  },
227
176
  byPage: (settings) => {
228
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
177
+ if (settings?.maxPageSize) {
229
178
  throw new Error("maxPageSize is not supported by this operation.");
230
179
  }
231
180
  return this.listBySavingsPlanIdPagingPage(savingsPlanOrderId, savingsPlanId, options, settings);
232
181
  }
233
182
  };
234
183
  }
235
- listBySavingsPlanIdPagingPage(savingsPlanOrderId, savingsPlanId, options, settings) {
236
- return __asyncGenerator(this, arguments, function* listBySavingsPlanIdPagingPage_1() {
237
- let result;
238
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
239
- if (!continuationToken) {
240
- result = yield __await(this._listBySavingsPlanId(savingsPlanOrderId, savingsPlanId, options));
241
- let page = result.value || [];
242
- continuationToken = result.nextLink;
243
- setContinuationToken(page, continuationToken);
244
- yield yield __await(page);
245
- }
246
- while (continuationToken) {
247
- result = yield __await(this._listBySavingsPlanIdNext(savingsPlanOrderId, savingsPlanId, continuationToken, options));
248
- continuationToken = result.nextLink;
249
- let page = result.value || [];
250
- setContinuationToken(page, continuationToken);
251
- yield yield __await(page);
252
- }
253
- });
184
+ async *listBySavingsPlanIdPagingPage(savingsPlanOrderId, savingsPlanId, options, settings) {
185
+ let result;
186
+ let continuationToken = settings?.continuationToken;
187
+ if (!continuationToken) {
188
+ result = await this._listBySavingsPlanId(savingsPlanOrderId, savingsPlanId, options);
189
+ let page = result.value || [];
190
+ continuationToken = result.nextLink;
191
+ setContinuationToken(page, continuationToken);
192
+ yield page;
193
+ }
194
+ while (continuationToken) {
195
+ result = await this._listBySavingsPlanIdNext(savingsPlanOrderId, savingsPlanId, continuationToken, options);
196
+ continuationToken = result.nextLink;
197
+ let page = result.value || [];
198
+ setContinuationToken(page, continuationToken);
199
+ yield page;
200
+ }
254
201
  }
255
- listBySavingsPlanIdPagingAll(savingsPlanOrderId, savingsPlanId, options) {
256
- return __asyncGenerator(this, arguments, function* listBySavingsPlanIdPagingAll_1() {
257
- var _a, e_4, _b, _c;
258
- try {
259
- for (var _d = true, _e = __asyncValues(this.listBySavingsPlanIdPagingPage(savingsPlanOrderId, savingsPlanId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
260
- _c = _f.value;
261
- _d = false;
262
- const page = _c;
263
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
264
- }
265
- }
266
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
267
- finally {
268
- try {
269
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
270
- }
271
- finally { if (e_4) throw e_4.error; }
272
- }
273
- });
202
+ async *listBySavingsPlanIdPagingAll(savingsPlanOrderId, savingsPlanId, options) {
203
+ for await (const page of this.listBySavingsPlanIdPagingPage(savingsPlanOrderId, savingsPlanId, options)) {
204
+ yield* page;
205
+ }
274
206
  }
275
207
  /**
276
208
  * Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain