@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
@@ -16,6 +16,7 @@ const core_lro_1 = require("@azure/core-lro");
16
16
  const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /** Class containing PriceSheet operations. */
18
18
  class PriceSheetImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class PriceSheet class.
21
22
  * @param client Reference to the service client
@@ -36,14 +37,19 @@ class PriceSheetImpl {
36
37
  return this.client.sendOperationRequest(args, spec);
37
38
  };
38
39
  const sendOperationFn = async (args, spec) => {
39
- var _a;
40
40
  let currentRawResponse = undefined;
41
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
41
+ const providedCallback = args.options?.onResponse;
42
42
  const callback = (rawResponse, flatResponse) => {
43
43
  currentRawResponse = rawResponse;
44
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
44
+ providedCallback?.(rawResponse, flatResponse);
45
+ };
46
+ const updatedArgs = {
47
+ ...args,
48
+ options: {
49
+ ...args.options,
50
+ onResponse: callback
51
+ }
45
52
  };
46
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
47
53
  const flatResponse = await directSendOperation(updatedArgs, spec);
48
54
  return {
49
55
  flatResponse,
@@ -60,8 +66,8 @@ class PriceSheetImpl {
60
66
  spec: downloadOperationSpec
61
67
  });
62
68
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
63
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
64
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
69
+ restoreFrom: options?.resumeFrom,
70
+ intervalInMs: options?.updateIntervalInMs,
65
71
  resourceLocationConfig: "location"
66
72
  });
67
73
  await poller.poll();
@@ -94,14 +100,19 @@ class PriceSheetImpl {
94
100
  return this.client.sendOperationRequest(args, spec);
95
101
  };
96
102
  const sendOperationFn = async (args, spec) => {
97
- var _a;
98
103
  let currentRawResponse = undefined;
99
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
104
+ const providedCallback = args.options?.onResponse;
100
105
  const callback = (rawResponse, flatResponse) => {
101
106
  currentRawResponse = rawResponse;
102
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
107
+ providedCallback?.(rawResponse, flatResponse);
108
+ };
109
+ const updatedArgs = {
110
+ ...args,
111
+ options: {
112
+ ...args.options,
113
+ onResponse: callback
114
+ }
103
115
  };
104
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
105
116
  const flatResponse = await directSendOperation(updatedArgs, spec);
106
117
  return {
107
118
  flatResponse,
@@ -118,8 +129,8 @@ class PriceSheetImpl {
118
129
  spec: downloadByBillingProfileOperationSpec
119
130
  });
120
131
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
121
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
122
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
132
+ restoreFrom: options?.resumeFrom,
133
+ intervalInMs: options?.updateIntervalInMs,
123
134
  resourceLocationConfig: "location"
124
135
  });
125
136
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"priceSheet.js","sourceRoot":"","sources":["../../../src/operations/priceSheet.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAQ9C,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa,CACjB,kBAA0B,EAC1B,kBAA0B,EAC1B,WAAmB,EACnB,OAA0C;QAO1C,MAAM,mBAAmB,GAAG,KAAK,EAC/B,IAAmC,EACnC,IAA8B,EACO,EAAE;YACvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtD,CAAC,CAAC;QACF,MAAM,eAAe,GAAG,KAAK,EAC3B,IAAmC,EACnC,IAA8B,EAC9B,EAAE;;YACF,IAAI,kBAAkB,GAEN,SAAS,CAAC;YAC1B,MAAM,gBAAgB,G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C,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EACF,wKAAwK;IAC1K,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;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,kBAAkB;QAC7B,UAAU,CAAC,kBAAkB;KAC9B;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 { PriceSheet } 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 SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n PriceSheetDownloadOptionalParams,\n PriceSheetDownloadResponse,\n PriceSheetDownloadByBillingProfileOptionalParams,\n PriceSheetDownloadByBillingProfileResponse\n} from \"../models/index.js\";\n\n/** Class containing PriceSheet operations. */\nexport class PriceSheetImpl implements PriceSheet {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class PriceSheet class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets a URL to download the pricesheet for an invoice. The operation is supported for billing\n * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param invoiceName The ID that uniquely identifies an invoice.\n * @param options The options parameters.\n */\n async beginDownload(\n billingAccountName: string,\n billingProfileName: string,\n invoiceName: string,\n options?: PriceSheetDownloadOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<PriceSheetDownloadResponse>,\n PriceSheetDownloadResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<PriceSheetDownloadResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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: { billingAccountName, billingProfileName, invoiceName, options },\n spec: downloadOperationSpec\n });\n const poller = await createHttpPoller<\n PriceSheetDownloadResponse,\n OperationState<PriceSheetDownloadResponse>\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 * Gets a URL to download the pricesheet for an invoice. The operation is supported for billing\n * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param invoiceName The ID that uniquely identifies an invoice.\n * @param options The options parameters.\n */\n async beginDownloadAndWait(\n billingAccountName: string,\n billingProfileName: string,\n invoiceName: string,\n options?: PriceSheetDownloadOptionalParams\n ): Promise<PriceSheetDownloadResponse> {\n const poller = await this.beginDownload(\n billingAccountName,\n billingProfileName,\n invoiceName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a URL to download the current month's pricesheet for a billing profile. The operation is\n * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer\n * Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview\n * version will be updated from a single csv file to a Zip file containing multiple csv files, each\n * with max 200k records.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n async beginDownloadByBillingProfile(\n billingAccountName: string,\n billingProfileName: string,\n options?: PriceSheetDownloadByBillingProfileOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<PriceSheetDownloadByBillingProfileResponse>,\n PriceSheetDownloadByBillingProfileResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<PriceSheetDownloadByBillingProfileResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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: { billingAccountName, billingProfileName, options },\n spec: downloadByBillingProfileOperationSpec\n });\n const poller = await createHttpPoller<\n PriceSheetDownloadByBillingProfileResponse,\n OperationState<PriceSheetDownloadByBillingProfileResponse>\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 * Gets a URL to download the current month's pricesheet for a billing profile. The operation is\n * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer\n * Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview\n * version will be updated from a single csv file to a Zip file containing multiple csv files, each\n * with max 200k records.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n async beginDownloadByBillingProfileAndWait(\n billingAccountName: string,\n billingProfileName: string,\n options?: PriceSheetDownloadByBillingProfileOptionalParams\n ): Promise<PriceSheetDownloadByBillingProfileResponse> {\n const poller = await this.beginDownloadByBillingProfile(\n billingAccountName,\n billingProfileName,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst downloadOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DownloadURL\n },\n 201: {\n bodyMapper: Mappers.DownloadURL\n },\n 202: {\n bodyMapper: Mappers.DownloadURL\n },\n 204: {\n bodyMapper: Mappers.DownloadURL\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.billingProfileName,\n Parameters.invoiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst downloadByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DownloadURL\n },\n 201: {\n bodyMapper: Mappers.DownloadURL\n },\n 202: {\n bodyMapper: Mappers.DownloadURL\n },\n 204: {\n bodyMapper: Mappers.DownloadURL\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.billingProfileName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"priceSheet.js","sourceRoot":"","sources":["../../../src/operations/priceSheet.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAQ9C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAuB;IAE9C;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa,CACjB,kBAA0B,EAC1B,kBAA0B,EAC1B,WAAmB,EACnB,OAA0C;Q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ACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;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,kBAAkB;QAC7B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EACF,wKAAwK;IAC1K,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;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,kBAAkB;QAC7B,UAAU,CAAC,kBAAkB;KAC9B;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 { PriceSheet } 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 SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n PriceSheetDownloadOptionalParams,\n PriceSheetDownloadResponse,\n PriceSheetDownloadByBillingProfileOptionalParams,\n PriceSheetDownloadByBillingProfileResponse\n} from \"../models/index.js\";\n\n/** Class containing PriceSheet operations. */\nexport class PriceSheetImpl implements PriceSheet {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class PriceSheet class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets a URL to download the pricesheet for an invoice. The operation is supported for billing\n * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param invoiceName The ID that uniquely identifies an invoice.\n * @param options The options parameters.\n */\n async beginDownload(\n billingAccountName: string,\n billingProfileName: string,\n invoiceName: string,\n options?: PriceSheetDownloadOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<PriceSheetDownloadResponse>,\n PriceSheetDownloadResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<PriceSheetDownloadResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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: { billingAccountName, billingProfileName, invoiceName, options },\n spec: downloadOperationSpec\n });\n const poller = await createHttpPoller<\n PriceSheetDownloadResponse,\n OperationState<PriceSheetDownloadResponse>\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 * Gets a URL to download the pricesheet for an invoice. The operation is supported for billing\n * accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param invoiceName The ID that uniquely identifies an invoice.\n * @param options The options parameters.\n */\n async beginDownloadAndWait(\n billingAccountName: string,\n billingProfileName: string,\n invoiceName: string,\n options?: PriceSheetDownloadOptionalParams\n ): Promise<PriceSheetDownloadResponse> {\n const poller = await this.beginDownload(\n billingAccountName,\n billingProfileName,\n invoiceName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a URL to download the current month's pricesheet for a billing profile. The operation is\n * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer\n * Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview\n * version will be updated from a single csv file to a Zip file containing multiple csv files, each\n * with max 200k records.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n async beginDownloadByBillingProfile(\n billingAccountName: string,\n billingProfileName: string,\n options?: PriceSheetDownloadByBillingProfileOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<PriceSheetDownloadByBillingProfileResponse>,\n PriceSheetDownloadByBillingProfileResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<PriceSheetDownloadByBillingProfileResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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: { billingAccountName, billingProfileName, options },\n spec: downloadByBillingProfileOperationSpec\n });\n const poller = await createHttpPoller<\n PriceSheetDownloadByBillingProfileResponse,\n OperationState<PriceSheetDownloadByBillingProfileResponse>\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 * Gets a URL to download the current month's pricesheet for a billing profile. The operation is\n * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer\n * Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview\n * version will be updated from a single csv file to a Zip file containing multiple csv files, each\n * with max 200k records.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n async beginDownloadByBillingProfileAndWait(\n billingAccountName: string,\n billingProfileName: string,\n options?: PriceSheetDownloadByBillingProfileOptionalParams\n ): Promise<PriceSheetDownloadByBillingProfileResponse> {\n const poller = await this.beginDownloadByBillingProfile(\n billingAccountName,\n billingProfileName,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst downloadOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DownloadURL\n },\n 201: {\n bodyMapper: Mappers.DownloadURL\n },\n 202: {\n bodyMapper: Mappers.DownloadURL\n },\n 204: {\n bodyMapper: Mappers.DownloadURL\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.billingProfileName,\n Parameters.invoiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst downloadByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DownloadURL\n },\n 201: {\n bodyMapper: Mappers.DownloadURL\n },\n 202: {\n bodyMapper: Mappers.DownloadURL\n },\n 204: {\n bodyMapper: Mappers.DownloadURL\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.billingProfileName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing Query operations. */
16
16
  class QueryImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class Query class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/operations/query.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAWtD,yCAAyC;AACzC,MAAa,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CACH,KAAa,EACb,UAA2B,EAC3B,OAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAC9B,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,gCAAgC,CAC9B,yBAAoD,EACpD,uBAA+B,EAC/B,UAA2B,EAC3B,OAA6D;QAE7D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,yBAAyB;YACzB,uBAAuB;YACvB,UAAU;YACV,OAAO;SACR,EACD,6CAA6C,CAC9C,CAAC;IACJ,CAAC;CACF;AApED,8BAoEC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,kBAAkB,GAA6B;IACnD,IAAI,EAAE,mDAAmD;IACzD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,GAAG,EAAE,EAAE;QACP,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,CAAC;IACpD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,6CAA6C,GAA6B;IAC9E,IAAI,EACF,iGAAiG;IACnG,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;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;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,uBAAuB;KACnC;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 { Query } 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 QueryDefinition,\n QueryUsageOptionalParams,\n QueryUsageResponse,\n ExternalCloudProviderType,\n QueryUsageByExternalCloudProviderTypeOptionalParams,\n QueryUsageByExternalCloudProviderTypeResponse\n} from \"../models/index.js\";\n\n/** Class containing Query operations. */\nexport class QueryImpl implements Query {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class Query class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * Query the usage data for scope defined.\n * @param scope The scope associated with query and export 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 parameters Parameters supplied to the CreateOrUpdate Query Config operation.\n * @param options The options parameters.\n */\n usage(\n scope: string,\n parameters: QueryDefinition,\n options?: QueryUsageOptionalParams\n ): Promise<QueryUsageResponse> {\n return this.client.sendOperationRequest(\n { scope, parameters, options },\n usageOperationSpec\n );\n }\n\n /**\n * Query the usage data 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 parameters Parameters supplied to the CreateOrUpdate Query Config operation.\n * @param options The options parameters.\n */\n usageByExternalCloudProviderType(\n externalCloudProviderType: ExternalCloudProviderType,\n externalCloudProviderId: string,\n parameters: QueryDefinition,\n options?: QueryUsageByExternalCloudProviderTypeOptionalParams\n ): Promise<QueryUsageByExternalCloudProviderTypeResponse> {\n return this.client.sendOperationRequest(\n {\n externalCloudProviderType,\n externalCloudProviderId,\n parameters,\n options\n },\n usageByExternalCloudProviderTypeOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst usageOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/query\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.QueryResult\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst usageByExternalCloudProviderTypeOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.QueryResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.externalCloudProviderType,\n Parameters.externalCloudProviderId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/operations/query.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAWtD,yCAAyC;AACzC,MAAa,SAAS;IACH,MAAM,CAAuB;IAE9C;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CACH,KAAa,EACb,UAA2B,EAC3B,OAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,UAAU,EAA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;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,uBAAuB;KACnC;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 { Query } 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 QueryDefinition,\n QueryUsageOptionalParams,\n QueryUsageResponse,\n ExternalCloudProviderType,\n QueryUsageByExternalCloudProviderTypeOptionalParams,\n QueryUsageByExternalCloudProviderTypeResponse\n} from \"../models/index.js\";\n\n/** Class containing Query operations. */\nexport class QueryImpl implements Query {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class Query class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * Query the usage data for scope defined.\n * @param scope The scope associated with query and export 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 parameters Parameters supplied to the CreateOrUpdate Query Config operation.\n * @param options The options parameters.\n */\n usage(\n scope: string,\n parameters: QueryDefinition,\n options?: QueryUsageOptionalParams\n ): Promise<QueryUsageResponse> {\n return this.client.sendOperationRequest(\n { scope, parameters, options },\n usageOperationSpec\n );\n }\n\n /**\n * Query the usage data 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 parameters Parameters supplied to the CreateOrUpdate Query Config operation.\n * @param options The options parameters.\n */\n usageByExternalCloudProviderType(\n externalCloudProviderType: ExternalCloudProviderType,\n externalCloudProviderId: string,\n parameters: QueryDefinition,\n options?: QueryUsageByExternalCloudProviderTypeOptionalParams\n ): Promise<QueryUsageByExternalCloudProviderTypeResponse> {\n return this.client.sendOperationRequest(\n {\n externalCloudProviderType,\n externalCloudProviderId,\n parameters,\n options\n },\n usageByExternalCloudProviderTypeOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst usageOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/query\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.QueryResult\n },\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope1],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst usageByExternalCloudProviderTypeOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.QueryResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.externalCloudProviderType,\n Parameters.externalCloudProviderId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing ScheduledActions operations. */
18
18
  class ScheduledActionsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class ScheduledActions class.
21
22
  * @param client Reference to the service client
@@ -37,52 +38,35 @@ class ScheduledActionsImpl {
37
38
  return this;
38
39
  },
39
40
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
41
42
  throw new Error("maxPageSize is not supported by this operation.");
42
43
  }
43
44
  return this.listPagingPage(options, settings);
44
45
  }
45
46
  };
46
47
  }
47
- listPagingPage(options, settings) {
48
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield tslib_1.__await(this._list(options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
- yield yield tslib_1.__await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield tslib_1.__await(this._listNext(continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
- yield yield tslib_1.__await(page);
64
- }
65
- });
48
+ async *listPagingPage(options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._list(options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listNext(continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
+ yield page;
64
+ }
66
65
  }
67
- listPagingAll(options) {
68
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
66
+ async *listPagingAll(options) {
67
+ for await (const page of this.listPagingPage(options)) {
68
+ yield* page;
69
+ }
86
70
  }
87
71
  /**
88
72
  * List all shared scheduled actions within the given scope.
@@ -114,52 +98,35 @@ class ScheduledActionsImpl {
114
98
  return this;
115
99
  },
116
100
  byPage: (settings) => {
117
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
101
+ if (settings?.maxPageSize) {
118
102
  throw new Error("maxPageSize is not supported by this operation.");
119
103
  }
120
104
  return this.listByScopePagingPage(scope, options, settings);
121
105
  }
122
106
  };
123
107
  }
124
- listByScopePagingPage(scope, options, settings) {
125
- return tslib_1.__asyncGenerator(this, arguments, function* listByScopePagingPage_1() {
126
- let result;
127
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
128
- if (!continuationToken) {
129
- result = yield tslib_1.__await(this._listByScope(scope, options));
130
- let page = result.value || [];
131
- continuationToken = result.nextLink;
132
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
133
- yield yield tslib_1.__await(page);
134
- }
135
- while (continuationToken) {
136
- result = yield tslib_1.__await(this._listByScopeNext(scope, continuationToken, options));
137
- continuationToken = result.nextLink;
138
- let page = result.value || [];
139
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
140
- yield yield tslib_1.__await(page);
141
- }
142
- });
108
+ async *listByScopePagingPage(scope, options, settings) {
109
+ let result;
110
+ let continuationToken = settings?.continuationToken;
111
+ if (!continuationToken) {
112
+ result = await this._listByScope(scope, options);
113
+ let page = result.value || [];
114
+ continuationToken = result.nextLink;
115
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
116
+ yield page;
117
+ }
118
+ while (continuationToken) {
119
+ result = await this._listByScopeNext(scope, continuationToken, options);
120
+ continuationToken = result.nextLink;
121
+ let page = result.value || [];
122
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
123
+ yield page;
124
+ }
143
125
  }
144
- listByScopePagingAll(scope, options) {
145
- return tslib_1.__asyncGenerator(this, arguments, function* listByScopePagingAll_1() {
146
- var _a, e_2, _b, _c;
147
- try {
148
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByScopePagingPage(scope, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
149
- _c = _f.value;
150
- _d = false;
151
- const page = _c;
152
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
153
- }
154
- }
155
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
156
- finally {
157
- try {
158
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
159
- }
160
- finally { if (e_2) throw e_2.error; }
161
- }
162
- });
126
+ async *listByScopePagingAll(scope, options) {
127
+ for await (const page of this.listByScopePagingPage(scope, options)) {
128
+ yield* page;
129
+ }
163
130
  }
164
131
  /**
165
132
  * List all private scheduled actions.
@@ -1 +1 @@
1
- {"version":3,"file":"scheduledActions.js","sourceRoot":"","sources":["../../../src/operations/scheduledActions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AA+BtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IAG/B;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAA4C;QAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAA4C,EAC5C,QAAuB;;YAEvB,IAAI,MAAoC,CAAC;YACzC,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,MAAM,GAAG,sBAAM,IAAI,CAAC,KAAK,CAAC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AAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;IACxE,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 { ScheduledActions } 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 ScheduledAction,\n ScheduledActionsListNextOptionalParams,\n ScheduledActionsListOptionalParams,\n ScheduledActionsListResponse,\n ScheduledActionsListByScopeNextOptionalParams,\n ScheduledActionsListByScopeOptionalParams,\n ScheduledActionsListByScopeResponse,\n ScheduledActionsCreateOrUpdateOptionalParams,\n ScheduledActionsCreateOrUpdateResponse,\n ScheduledActionsGetOptionalParams,\n ScheduledActionsGetResponse,\n ScheduledActionsDeleteOptionalParams,\n ScheduledActionsCreateOrUpdateByScopeOptionalParams,\n ScheduledActionsCreateOrUpdateByScopeResponse,\n ScheduledActionsGetByScopeOptionalParams,\n ScheduledActionsGetByScopeResponse,\n ScheduledActionsDeleteByScopeOptionalParams,\n ScheduledActionsRunOptionalParams,\n ScheduledActionsRunByScopeOptionalParams,\n CheckNameAvailabilityRequest,\n ScheduledActionsCheckNameAvailabilityOptionalParams,\n ScheduledActionsCheckNameAvailabilityResponse,\n ScheduledActionsCheckNameAvailabilityByScopeOptionalParams,\n ScheduledActionsCheckNameAvailabilityByScopeResponse,\n ScheduledActionsListNextResponse,\n ScheduledActionsListByScopeNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ScheduledActions operations. */\nexport class ScheduledActionsImpl implements ScheduledActions {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class ScheduledActions class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * List all private scheduled actions.\n * @param options The options parameters.\n */\n public list(\n options?: ScheduledActionsListOptionalParams\n ): PagedAsyncIterableIterator<ScheduledAction> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: ScheduledActionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ScheduledAction[]> {\n let result: ScheduledActionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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(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 options?: ScheduledActionsListOptionalParams\n ): AsyncIterableIterator<ScheduledAction> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List all shared scheduled actions within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param options The options parameters.\n */\n public listByScope(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams\n ): PagedAsyncIterableIterator<ScheduledAction> {\n const iter = this.listByScopePagingAll(scope, 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.listByScopePagingPage(scope, options, settings);\n }\n };\n }\n\n private async *listByScopePagingPage(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ScheduledAction[]> {\n let result: ScheduledActionsListByScopeResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByScope(scope, 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._listByScopeNext(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByScopePagingAll(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams\n ): AsyncIterableIterator<ScheduledAction> {\n for await (const page of this.listByScopePagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * List all private scheduled actions.\n * @param options The options parameters.\n */\n private _list(\n options?: ScheduledActionsListOptionalParams\n ): Promise<ScheduledActionsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * List all shared scheduled actions within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param options The options parameters.\n */\n private _listByScope(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams\n ): Promise<ScheduledActionsListByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listByScopeOperationSpec\n );\n }\n\n /**\n * Create or update a private scheduled action.\n * @param name Scheduled action name.\n * @param scheduledAction Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n createOrUpdate(\n name: string,\n scheduledAction: ScheduledAction,\n options?: ScheduledActionsCreateOrUpdateOptionalParams\n ): Promise<ScheduledActionsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { name, scheduledAction, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Get the private scheduled action by name.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n get(\n name: string,\n options?: ScheduledActionsGetOptionalParams\n ): Promise<ScheduledActionsGetResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getOperationSpec\n );\n }\n\n /**\n * Delete a private scheduled action.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n delete(\n name: string,\n options?: ScheduledActionsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Create or update a shared scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param scheduledAction Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n createOrUpdateByScope(\n scope: string,\n name: string,\n scheduledAction: ScheduledAction,\n options?: ScheduledActionsCreateOrUpdateByScopeOptionalParams\n ): Promise<ScheduledActionsCreateOrUpdateByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, name, scheduledAction, options },\n createOrUpdateByScopeOperationSpec\n );\n }\n\n /**\n * Get the shared scheduled action from the given scope by name.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n getByScope(\n scope: string,\n name: string,\n options?: ScheduledActionsGetByScopeOptionalParams\n ): Promise<ScheduledActionsGetByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, name, options },\n getByScopeOperationSpec\n );\n }\n\n /**\n * Delete a scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n deleteByScope(\n scope: string,\n name: string,\n options?: ScheduledActionsDeleteByScopeOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { scope, name, options },\n deleteByScopeOperationSpec\n );\n }\n\n /**\n * Processes a private scheduled action.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n run(\n name: string,\n options?: ScheduledActionsRunOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, options },\n runOperationSpec\n );\n }\n\n /**\n * Runs a shared scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n runByScope(\n scope: string,\n name: string,\n options?: ScheduledActionsRunByScopeOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { scope, name, options },\n runByScopeOperationSpec\n );\n }\n\n /**\n * Checks availability and correctness of the name for a scheduled action.\n * @param checkNameAvailabilityRequest Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: ScheduledActionsCheckNameAvailabilityOptionalParams\n ): Promise<ScheduledActionsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityRequest, options },\n checkNameAvailabilityOperationSpec\n );\n }\n\n /**\n * Checks availability and correctness of the name for a scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param checkNameAvailabilityRequest Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n checkNameAvailabilityByScope(\n scope: string,\n checkNameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: ScheduledActionsCheckNameAvailabilityByScopeOptionalParams\n ): Promise<ScheduledActionsCheckNameAvailabilityByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, checkNameAvailabilityRequest, options },\n checkNameAvailabilityByScopeOperationSpec\n );\n }\n\n /**\n * ListNext\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 nextLink: string,\n options?: ScheduledActionsListNextOptionalParams\n ): Promise<ScheduledActionsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n\n /**\n * ListByScopeNext\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param nextLink The nextLink from the previous successful call to the ListByScope method.\n * @param options The options parameters.\n */\n private _listByScopeNext(\n scope: string,\n nextLink: string,\n options?: ScheduledActionsListByScopeNextOptionalParams\n ): Promise<ScheduledActionsListByScopeNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listByScopeNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n 201: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.scheduledAction,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.ifMatch\n ],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n 201: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.scheduledAction,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.ifMatch\n ],\n mediaType: \"json\",\n serializer\n};\nconst getByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst runOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}/execute\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst runByScopeOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.checkNameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst checkNameAvailabilityByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.checkNameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"scheduledActions.js","sourceRoot":"","sources":["../../../src/operations/scheduledActions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AA+BtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IACd,MAAM,CAAuB;IAE9C;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAA4C;QAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YAC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,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;IACxE,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 { ScheduledActions } 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 ScheduledAction,\n ScheduledActionsListNextOptionalParams,\n ScheduledActionsListOptionalParams,\n ScheduledActionsListResponse,\n ScheduledActionsListByScopeNextOptionalParams,\n ScheduledActionsListByScopeOptionalParams,\n ScheduledActionsListByScopeResponse,\n ScheduledActionsCreateOrUpdateOptionalParams,\n ScheduledActionsCreateOrUpdateResponse,\n ScheduledActionsGetOptionalParams,\n ScheduledActionsGetResponse,\n ScheduledActionsDeleteOptionalParams,\n ScheduledActionsCreateOrUpdateByScopeOptionalParams,\n ScheduledActionsCreateOrUpdateByScopeResponse,\n ScheduledActionsGetByScopeOptionalParams,\n ScheduledActionsGetByScopeResponse,\n ScheduledActionsDeleteByScopeOptionalParams,\n ScheduledActionsRunOptionalParams,\n ScheduledActionsRunByScopeOptionalParams,\n CheckNameAvailabilityRequest,\n ScheduledActionsCheckNameAvailabilityOptionalParams,\n ScheduledActionsCheckNameAvailabilityResponse,\n ScheduledActionsCheckNameAvailabilityByScopeOptionalParams,\n ScheduledActionsCheckNameAvailabilityByScopeResponse,\n ScheduledActionsListNextResponse,\n ScheduledActionsListByScopeNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ScheduledActions operations. */\nexport class ScheduledActionsImpl implements ScheduledActions {\n private readonly client: CostManagementClient;\n\n /**\n * Initialize a new instance of the class ScheduledActions class.\n * @param client Reference to the service client\n */\n constructor(client: CostManagementClient) {\n this.client = client;\n }\n\n /**\n * List all private scheduled actions.\n * @param options The options parameters.\n */\n public list(\n options?: ScheduledActionsListOptionalParams\n ): PagedAsyncIterableIterator<ScheduledAction> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: ScheduledActionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ScheduledAction[]> {\n let result: ScheduledActionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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(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 options?: ScheduledActionsListOptionalParams\n ): AsyncIterableIterator<ScheduledAction> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List all shared scheduled actions within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param options The options parameters.\n */\n public listByScope(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams\n ): PagedAsyncIterableIterator<ScheduledAction> {\n const iter = this.listByScopePagingAll(scope, 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.listByScopePagingPage(scope, options, settings);\n }\n };\n }\n\n private async *listByScopePagingPage(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ScheduledAction[]> {\n let result: ScheduledActionsListByScopeResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByScope(scope, 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._listByScopeNext(scope, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByScopePagingAll(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams\n ): AsyncIterableIterator<ScheduledAction> {\n for await (const page of this.listByScopePagingPage(scope, options)) {\n yield* page;\n }\n }\n\n /**\n * List all private scheduled actions.\n * @param options The options parameters.\n */\n private _list(\n options?: ScheduledActionsListOptionalParams\n ): Promise<ScheduledActionsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * List all shared scheduled actions within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param options The options parameters.\n */\n private _listByScope(\n scope: string,\n options?: ScheduledActionsListByScopeOptionalParams\n ): Promise<ScheduledActionsListByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, options },\n listByScopeOperationSpec\n );\n }\n\n /**\n * Create or update a private scheduled action.\n * @param name Scheduled action name.\n * @param scheduledAction Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n createOrUpdate(\n name: string,\n scheduledAction: ScheduledAction,\n options?: ScheduledActionsCreateOrUpdateOptionalParams\n ): Promise<ScheduledActionsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { name, scheduledAction, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Get the private scheduled action by name.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n get(\n name: string,\n options?: ScheduledActionsGetOptionalParams\n ): Promise<ScheduledActionsGetResponse> {\n return this.client.sendOperationRequest(\n { name, options },\n getOperationSpec\n );\n }\n\n /**\n * Delete a private scheduled action.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n delete(\n name: string,\n options?: ScheduledActionsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Create or update a shared scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param scheduledAction Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n createOrUpdateByScope(\n scope: string,\n name: string,\n scheduledAction: ScheduledAction,\n options?: ScheduledActionsCreateOrUpdateByScopeOptionalParams\n ): Promise<ScheduledActionsCreateOrUpdateByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, name, scheduledAction, options },\n createOrUpdateByScopeOperationSpec\n );\n }\n\n /**\n * Get the shared scheduled action from the given scope by name.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n getByScope(\n scope: string,\n name: string,\n options?: ScheduledActionsGetByScopeOptionalParams\n ): Promise<ScheduledActionsGetByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, name, options },\n getByScopeOperationSpec\n );\n }\n\n /**\n * Delete a scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n deleteByScope(\n scope: string,\n name: string,\n options?: ScheduledActionsDeleteByScopeOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { scope, name, options },\n deleteByScopeOperationSpec\n );\n }\n\n /**\n * Processes a private scheduled action.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n run(\n name: string,\n options?: ScheduledActionsRunOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { name, options },\n runOperationSpec\n );\n }\n\n /**\n * Runs a shared scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param name Scheduled action name.\n * @param options The options parameters.\n */\n runByScope(\n scope: string,\n name: string,\n options?: ScheduledActionsRunByScopeOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { scope, name, options },\n runByScopeOperationSpec\n );\n }\n\n /**\n * Checks availability and correctness of the name for a scheduled action.\n * @param checkNameAvailabilityRequest Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: ScheduledActionsCheckNameAvailabilityOptionalParams\n ): Promise<ScheduledActionsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityRequest, options },\n checkNameAvailabilityOperationSpec\n );\n }\n\n /**\n * Checks availability and correctness of the name for a scheduled action within the given scope.\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param checkNameAvailabilityRequest Scheduled action to be created or updated.\n * @param options The options parameters.\n */\n checkNameAvailabilityByScope(\n scope: string,\n checkNameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: ScheduledActionsCheckNameAvailabilityByScopeOptionalParams\n ): Promise<ScheduledActionsCheckNameAvailabilityByScopeResponse> {\n return this.client.sendOperationRequest(\n { scope, checkNameAvailabilityRequest, options },\n checkNameAvailabilityByScopeOperationSpec\n );\n }\n\n /**\n * ListNext\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 nextLink: string,\n options?: ScheduledActionsListNextOptionalParams\n ): Promise<ScheduledActionsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n\n /**\n * ListByScopeNext\n * @param scope The scope associated with scheduled action 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,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for\n * Department scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'\n * for EnrollmentAccount scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'\n * for BillingProfile scope,\n * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}'\n * for InvoiceSection scope,\n * 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for\n * External Billing Account scope and\n * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External\n * Subscription scope. Note: Insight Alerts are only available on subscription scope.\n * @param nextLink The nextLink from the previous successful call to the ListByScope method.\n * @param options The options parameters.\n */\n private _listByScopeNext(\n scope: string,\n nextLink: string,\n options?: ScheduledActionsListByScopeNextOptionalParams\n ): Promise<ScheduledActionsListByScopeNextResponse> {\n return this.client.sendOperationRequest(\n { scope, nextLink, options },\n listByScopeNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n 201: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.scheduledAction,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.ifMatch\n ],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n 201: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.scheduledAction,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.ifMatch\n ],\n mediaType: \"json\",\n serializer\n};\nconst getByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledAction\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst runOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/scheduledActions/{name}/execute\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst runByScopeOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope, Parameters.name],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.CostManagement/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.checkNameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst checkNameAvailabilityByScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.CostManagement/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n requestBody: Parameters.checkNameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.scope],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledActionListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponseWithNestedDetails\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}