@azure/arm-commerce 4.0.0-beta.1 → 4.0.0-beta.3
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.
- package/CHANGELOG.md +2 -2
- package/README.md +12 -1
- package/dist/index.js +132 -19
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/rateCardGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/rateCardGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/rateCardGetSample.js +30 -0
- package/dist-esm/samples-dev/rateCardGetSample.js.map +1 -0
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +6 -6
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/usageAggregates.d.ts.map +1 -1
- package/dist-esm/src/operations/usageAggregates.js +19 -7
- package/dist-esm/src/operations/usageAggregates.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/usageManagementClient.d.ts +2 -0
- package/dist-esm/src/usageManagementClient.d.ts.map +1 -1
- package/dist-esm/src/usageManagementClient.js +54 -5
- package/dist-esm/src/usageManagementClient.js.map +1 -1
- package/dist-esm/test/commerce_examples.d.ts.map +1 -1
- package/dist-esm/test/commerce_examples.js +16 -18
- package/dist-esm/test/commerce_examples.js.map +1 -1
- package/package.json +41 -22
- package/review/arm-commerce.api.md +11 -8
- package/rollup.config.js +6 -72
- package/src/index.ts +1 -0
- package/src/models/index.ts +7 -6
- package/src/operations/usageAggregates.ts +26 -8
- package/src/pagingHelper.ts +39 -0
- package/src/usageManagementClient.ts +70 -5
- package/tsconfig.json +18 -5
- package/types/arm-commerce.d.ts +17 -6
- package/types/tsdoc-metadata.json +1 -1
- package/LICENSE.txt +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 4.0.0-beta.
|
|
3
|
+
## 4.0.0-beta.3 (2022-11-17)
|
|
4
4
|
|
|
5
|
-
The package of @azure/arm-commerce is using our next generation design principles since version 4.0.0-beta.
|
|
5
|
+
The package of @azure/arm-commerce is using our next generation design principles since version 4.0.0-beta.3, which contains breaking changes.
|
|
6
6
|
|
|
7
7
|
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -13,9 +13,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
|
|
|
13
13
|
|
|
14
14
|
### Currently supported environments
|
|
15
15
|
|
|
16
|
-
- [LTS versions of Node.js](https://
|
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
|
+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
20
|
+
|
|
19
21
|
### Prerequisites
|
|
20
22
|
|
|
21
23
|
- An [Azure subscription][azure_sub].
|
|
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|
|
49
51
|
```javascript
|
|
50
52
|
const { UsageManagementClient } = require("@azure/arm-commerce");
|
|
51
53
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
|
+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
|
+
|
|
52
56
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
53
57
|
const client = new UsageManagementClient(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
+
|
|
59
|
+
// For client-side applications running in the browser, use this code instead:
|
|
60
|
+
// const credential = new InteractiveBrowserCredential({
|
|
61
|
+
// tenantId: "<YOUR_TENANT_ID>",
|
|
62
|
+
// clientId: "<YOUR_CLIENT_ID>"
|
|
63
|
+
// });
|
|
64
|
+
// const client = new UsageManagementClient(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var coreClient = require('@azure/core-client');
|
|
6
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* Copyright (c) Microsoft Corporation.
|
|
32
|
+
* Licensed under the MIT License.
|
|
33
|
+
*
|
|
34
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
35
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
36
|
+
*/
|
|
37
|
+
const pageMap = new WeakMap();
|
|
38
|
+
/**
|
|
39
|
+
* Given a result page from a pageable operation, returns a
|
|
40
|
+
* continuation token that can be used to begin paging from
|
|
41
|
+
* that point later.
|
|
42
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
43
|
+
* @returns The continuation token that can be passed into byPage().
|
|
44
|
+
*/
|
|
45
|
+
function getContinuationToken(page) {
|
|
46
|
+
var _a;
|
|
47
|
+
if (typeof page !== "object" || page === null) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
51
|
+
}
|
|
52
|
+
function setContinuationToken(page, continuationToken) {
|
|
53
|
+
var _a;
|
|
54
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
58
|
+
pageInfo.continuationToken = continuationToken;
|
|
59
|
+
pageMap.set(page, pageInfo);
|
|
60
|
+
}
|
|
7
61
|
|
|
8
62
|
/*
|
|
9
63
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -607,20 +661,31 @@ class UsageAggregatesImpl {
|
|
|
607
661
|
[Symbol.asyncIterator]() {
|
|
608
662
|
return this;
|
|
609
663
|
},
|
|
610
|
-
byPage: () => {
|
|
611
|
-
|
|
664
|
+
byPage: (settings) => {
|
|
665
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
666
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
667
|
+
}
|
|
668
|
+
return this.listPagingPage(reportedStartTime, reportedEndTime, options, settings);
|
|
612
669
|
}
|
|
613
670
|
};
|
|
614
671
|
}
|
|
615
|
-
listPagingPage(reportedStartTime, reportedEndTime, options) {
|
|
672
|
+
listPagingPage(reportedStartTime, reportedEndTime, options, settings) {
|
|
616
673
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
617
|
-
let result
|
|
618
|
-
|
|
619
|
-
|
|
674
|
+
let result;
|
|
675
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
676
|
+
if (!continuationToken) {
|
|
677
|
+
result = yield tslib.__await(this._list(reportedStartTime, reportedEndTime, options));
|
|
678
|
+
let page = result.value || [];
|
|
679
|
+
continuationToken = result.nextLink;
|
|
680
|
+
setContinuationToken(page, continuationToken);
|
|
681
|
+
yield yield tslib.__await(page);
|
|
682
|
+
}
|
|
620
683
|
while (continuationToken) {
|
|
621
684
|
result = yield tslib.__await(this._listNext(reportedStartTime, reportedEndTime, continuationToken, options));
|
|
622
685
|
continuationToken = result.nextLink;
|
|
623
|
-
|
|
686
|
+
let page = result.value || [];
|
|
687
|
+
setContinuationToken(page, continuationToken);
|
|
688
|
+
yield yield tslib.__await(page);
|
|
624
689
|
}
|
|
625
690
|
});
|
|
626
691
|
}
|
|
@@ -663,7 +728,7 @@ class UsageAggregatesImpl {
|
|
|
663
728
|
}
|
|
664
729
|
}
|
|
665
730
|
// Operation Specifications
|
|
666
|
-
const serializer =
|
|
731
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
667
732
|
const listOperationSpec = {
|
|
668
733
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates",
|
|
669
734
|
httpMethod: "GET",
|
|
@@ -685,7 +750,7 @@ const listOperationSpec = {
|
|
|
685
750
|
],
|
|
686
751
|
urlParameters: [$host, subscriptionId],
|
|
687
752
|
headerParameters: [accept],
|
|
688
|
-
serializer
|
|
753
|
+
serializer: serializer$1
|
|
689
754
|
};
|
|
690
755
|
const listNextOperationSpec = {
|
|
691
756
|
path: "{nextLink}",
|
|
@@ -712,7 +777,7 @@ const listNextOperationSpec = {
|
|
|
712
777
|
nextLink
|
|
713
778
|
],
|
|
714
779
|
headerParameters: [accept],
|
|
715
|
-
serializer
|
|
780
|
+
serializer: serializer$1
|
|
716
781
|
};
|
|
717
782
|
|
|
718
783
|
/*
|
|
@@ -749,7 +814,7 @@ class RateCardImpl {
|
|
|
749
814
|
}
|
|
750
815
|
}
|
|
751
816
|
// Operation Specifications
|
|
752
|
-
const serializer
|
|
817
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
753
818
|
const getOperationSpec = {
|
|
754
819
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard",
|
|
755
820
|
httpMethod: "GET",
|
|
@@ -764,7 +829,7 @@ const getOperationSpec = {
|
|
|
764
829
|
queryParameters: [apiVersion, filter],
|
|
765
830
|
urlParameters: [$host, subscriptionId],
|
|
766
831
|
headerParameters: [accept],
|
|
767
|
-
serializer
|
|
832
|
+
serializer
|
|
768
833
|
};
|
|
769
834
|
|
|
770
835
|
/*
|
|
@@ -774,7 +839,7 @@ const getOperationSpec = {
|
|
|
774
839
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
775
840
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
776
841
|
*/
|
|
777
|
-
class UsageManagementClient extends
|
|
842
|
+
class UsageManagementClient extends coreClient__namespace.ServiceClient {
|
|
778
843
|
/**
|
|
779
844
|
* Initializes a new instance of the UsageManagementClient class.
|
|
780
845
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -783,6 +848,7 @@ class UsageManagementClient extends coreClient.ServiceClient {
|
|
|
783
848
|
* @param options The parameter options
|
|
784
849
|
*/
|
|
785
850
|
constructor(credentials, subscriptionId, options) {
|
|
851
|
+
var _a, _b, _c;
|
|
786
852
|
if (credentials === undefined) {
|
|
787
853
|
throw new Error("'credentials' cannot be null");
|
|
788
854
|
}
|
|
@@ -797,17 +863,35 @@ class UsageManagementClient extends coreClient.ServiceClient {
|
|
|
797
863
|
requestContentType: "application/json; charset=utf-8",
|
|
798
864
|
credential: credentials
|
|
799
865
|
};
|
|
800
|
-
const packageDetails = `azsdk-js-arm-commerce/4.0.0-beta.
|
|
866
|
+
const packageDetails = `azsdk-js-arm-commerce/4.0.0-beta.3`;
|
|
801
867
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
802
868
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
803
869
|
: `${packageDetails}`;
|
|
804
|
-
if (!options.credentialScopes) {
|
|
805
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
806
|
-
}
|
|
807
870
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
808
871
|
userAgentPrefix
|
|
809
|
-
},
|
|
872
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
810
873
|
super(optionsWithDefaults);
|
|
874
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
875
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
876
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
877
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
878
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
879
|
+
}
|
|
880
|
+
if (!options ||
|
|
881
|
+
!options.pipeline ||
|
|
882
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
883
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
884
|
+
this.pipeline.removePolicy({
|
|
885
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
886
|
+
});
|
|
887
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
888
|
+
credential: credentials,
|
|
889
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
890
|
+
challengeCallbacks: {
|
|
891
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
892
|
+
}
|
|
893
|
+
}));
|
|
894
|
+
}
|
|
811
895
|
// Parameter assignments
|
|
812
896
|
this.subscriptionId = subscriptionId;
|
|
813
897
|
// Assigning values to Constant parameters
|
|
@@ -815,8 +899,37 @@ class UsageManagementClient extends coreClient.ServiceClient {
|
|
|
815
899
|
this.apiVersion = options.apiVersion || "2015-06-01-preview";
|
|
816
900
|
this.usageAggregates = new UsageAggregatesImpl(this);
|
|
817
901
|
this.rateCard = new RateCardImpl(this);
|
|
902
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
903
|
+
}
|
|
904
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
905
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
906
|
+
if (!apiVersion) {
|
|
907
|
+
return;
|
|
908
|
+
}
|
|
909
|
+
const apiVersionPolicy = {
|
|
910
|
+
name: "CustomApiVersionPolicy",
|
|
911
|
+
sendRequest(request, next) {
|
|
912
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
913
|
+
const param = request.url.split("?");
|
|
914
|
+
if (param.length > 1) {
|
|
915
|
+
const newParams = param[1].split("&").map((item) => {
|
|
916
|
+
if (item.indexOf("api-version") > -1) {
|
|
917
|
+
return "api-version=" + apiVersion;
|
|
918
|
+
}
|
|
919
|
+
else {
|
|
920
|
+
return item;
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
924
|
+
}
|
|
925
|
+
return next(request);
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
818
930
|
}
|
|
819
931
|
}
|
|
820
932
|
|
|
821
933
|
exports.UsageManagementClient = UsageManagementClient;
|
|
934
|
+
exports.getContinuationToken = getContinuationToken;
|
|
822
935
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/models/mappers.ts","../src/models/parameters.ts","../src/operations/usageAggregates.ts","../src/operations/rateCard.ts","../src/usageManagementClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const UsageAggregationListResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"UsageAggregationListResult\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"UsageAggregation\"\n }\n }\n }\n },\n nextLink: {\n serializedName: \"nextLink\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const UsageAggregation: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"UsageAggregation\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n type: {\n name: \"String\"\n }\n },\n name: {\n serializedName: \"name\",\n type: {\n name: \"String\"\n }\n },\n type: {\n serializedName: \"type\",\n type: {\n name: \"String\"\n }\n },\n subscriptionId: {\n serializedName: \"properties.subscriptionId\",\n type: {\n name: \"Uuid\"\n }\n },\n meterId: {\n serializedName: \"properties.meterId\",\n type: {\n name: \"String\"\n }\n },\n usageStartTime: {\n serializedName: \"properties.usageStartTime\",\n type: {\n name: \"DateTime\"\n }\n },\n usageEndTime: {\n serializedName: \"properties.usageEndTime\",\n type: {\n name: \"DateTime\"\n }\n },\n quantity: {\n serializedName: \"properties.quantity\",\n type: {\n name: \"Number\"\n }\n },\n unit: {\n serializedName: \"properties.unit\",\n type: {\n name: \"String\"\n }\n },\n meterName: {\n serializedName: \"properties.meterName\",\n type: {\n name: \"String\"\n }\n },\n meterCategory: {\n serializedName: \"properties.meterCategory\",\n type: {\n name: \"String\"\n }\n },\n meterSubCategory: {\n serializedName: \"properties.meterSubCategory\",\n type: {\n name: \"String\"\n }\n },\n meterRegion: {\n serializedName: \"properties.meterRegion\",\n type: {\n name: \"String\"\n }\n },\n infoFields: {\n serializedName: \"properties.infoFields\",\n type: {\n name: \"Composite\",\n className: \"InfoField\"\n }\n },\n instanceData: {\n serializedName: \"properties.instanceData\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const InfoField: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"InfoField\",\n modelProperties: {\n project: {\n serializedName: \"project\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ErrorResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"ErrorResponse\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ResourceRateCardInfo: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"ResourceRateCardInfo\",\n modelProperties: {\n currency: {\n serializedName: \"Currency\",\n type: {\n name: \"String\"\n }\n },\n locale: {\n serializedName: \"Locale\",\n type: {\n name: \"String\"\n }\n },\n isTaxIncluded: {\n serializedName: \"IsTaxIncluded\",\n type: {\n name: \"Boolean\"\n }\n },\n offerTerms: {\n serializedName: \"OfferTerms\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"OfferTermInfoAutoGenerated\"\n }\n }\n }\n },\n meters: {\n serializedName: \"Meters\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"MeterInfo\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const OfferTermInfoAutoGenerated: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OfferTermInfoAutoGenerated\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator: {\n serializedName: \"Name\",\n clientName: \"name\"\n },\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Recurring Charge\",\n \"Monetary Commitment\",\n \"Monetary Credit\"\n ]\n }\n },\n effectiveDate: {\n serializedName: \"EffectiveDate\",\n type: {\n name: \"DateTime\"\n }\n }\n }\n }\n};\n\nexport const MeterInfo: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MeterInfo\",\n modelProperties: {\n meterId: {\n serializedName: \"MeterId\",\n type: {\n name: \"Uuid\"\n }\n },\n meterName: {\n serializedName: \"MeterName\",\n type: {\n name: \"String\"\n }\n },\n meterCategory: {\n serializedName: \"MeterCategory\",\n type: {\n name: \"String\"\n }\n },\n meterSubCategory: {\n serializedName: \"MeterSubCategory\",\n type: {\n name: \"String\"\n }\n },\n unit: {\n serializedName: \"Unit\",\n type: {\n name: \"String\"\n }\n },\n meterTags: {\n serializedName: \"MeterTags\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n meterRegion: {\n serializedName: \"MeterRegion\",\n type: {\n name: \"String\"\n }\n },\n meterRates: {\n serializedName: \"MeterRates\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } }\n }\n },\n effectiveDate: {\n serializedName: \"EffectiveDate\",\n type: {\n name: \"DateTime\"\n }\n },\n includedQuantity: {\n serializedName: \"IncludedQuantity\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const RateCardQueryParameters: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RateCardQueryParameters\",\n modelProperties: {\n offerDurableId: {\n constraints: {\n Pattern: new RegExp(\"^MS-AZR-\\\\d{4}P(-\\\\d{4}P)*$\")\n },\n serializedName: \"OfferDurableId\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n currency: {\n serializedName: \"Currency\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n locale: {\n serializedName: \"Locale\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n regionInfo: {\n serializedName: \"RegionInfo\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const MonetaryCredit: coreClient.CompositeMapper = {\n serializedName: \"Monetary Credit\",\n type: {\n name: \"Composite\",\n className: \"MonetaryCredit\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator:\n OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,\n modelProperties: {\n ...OfferTermInfoAutoGenerated.type.modelProperties,\n credit: {\n serializedName: \"Credit\",\n type: {\n name: \"Number\"\n }\n },\n excludedMeterIds: {\n serializedName: \"ExcludedMeterIds\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Uuid\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const MonetaryCommitment: coreClient.CompositeMapper = {\n serializedName: \"Monetary Commitment\",\n type: {\n name: \"Composite\",\n className: \"MonetaryCommitment\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator:\n OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,\n modelProperties: {\n ...OfferTermInfoAutoGenerated.type.modelProperties,\n tieredDiscount: {\n serializedName: \"TieredDiscount\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } }\n }\n },\n excludedMeterIds: {\n serializedName: \"ExcludedMeterIds\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Uuid\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const RecurringCharge: coreClient.CompositeMapper = {\n serializedName: \"Recurring Charge\",\n type: {\n name: \"Composite\",\n className: \"RecurringCharge\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator:\n OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,\n modelProperties: {\n ...OfferTermInfoAutoGenerated.type.modelProperties,\n recurringCharge: {\n serializedName: \"RecurringCharge\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport let discriminators = {\n OfferTermInfoAutoGenerated: OfferTermInfoAutoGenerated,\n \"OfferTermInfoAutoGenerated.Monetary Credit\": MonetaryCredit,\n \"OfferTermInfoAutoGenerated.Monetary Commitment\": MonetaryCommitment,\n \"OfferTermInfoAutoGenerated.Recurring Charge\": RecurringCharge\n};\n","/*\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 {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json, text/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const $host: OperationURLParameter = {\n parameterPath: \"$host\",\n mapper: {\n serializedName: \"$host\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const reportedStartTime: OperationQueryParameter = {\n parameterPath: \"reportedStartTime\",\n mapper: {\n serializedName: \"reportedStartTime\",\n required: true,\n type: {\n name: \"DateTime\"\n }\n }\n};\n\nexport const reportedEndTime: OperationQueryParameter = {\n parameterPath: \"reportedEndTime\",\n mapper: {\n serializedName: \"reportedEndTime\",\n required: true,\n type: {\n name: \"DateTime\"\n }\n }\n};\n\nexport const showDetails: OperationQueryParameter = {\n parameterPath: [\"options\", \"showDetails\"],\n mapper: {\n serializedName: \"showDetails\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const aggregationGranularity: OperationQueryParameter = {\n parameterPath: [\"options\", \"aggregationGranularity\"],\n mapper: {\n defaultValue: \"Daily\",\n serializedName: \"aggregationGranularity\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Daily\", \"Hourly\"]\n }\n }\n};\n\nexport const continuationToken: OperationQueryParameter = {\n parameterPath: [\"options\", \"continuationToken\"],\n mapper: {\n serializedName: \"continuationToken\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2015-06-01-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const subscriptionId: OperationURLParameter = {\n parameterPath: \"subscriptionId\",\n mapper: {\n serializedName: \"subscriptionId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const nextLink: OperationURLParameter = {\n parameterPath: \"nextLink\",\n mapper: {\n serializedName: \"nextLink\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const filter: OperationQueryParameter = {\n parameterPath: \"filter\",\n mapper: {\n serializedName: \"$filter\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n","/*\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 } from \"@azure/core-paging\";\nimport { UsageAggregates } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { UsageManagementClient } from \"../usageManagementClient\";\nimport {\n UsageAggregation,\n UsageAggregatesListNextOptionalParams,\n UsageAggregatesListOptionalParams,\n UsageAggregatesListResponse,\n UsageAggregatesListNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing UsageAggregates operations. */\nexport class UsageAggregatesImpl implements UsageAggregates {\n private readonly client: UsageManagementClient;\n\n /**\n * Initialize a new instance of the class UsageAggregates class.\n * @param client Reference to the service client\n */\n constructor(client: UsageManagementClient) {\n this.client = client;\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n public list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): PagedAsyncIterableIterator<UsageAggregation> {\n const iter = this.listPagingAll(\n reportedStartTime,\n reportedEndTime,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listPagingPage(reportedStartTime, reportedEndTime, options);\n }\n };\n }\n\n private async *listPagingPage(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): AsyncIterableIterator<UsageAggregation[]> {\n let result = await this._list(reportedStartTime, reportedEndTime, options);\n yield result.value || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._listNext(\n reportedStartTime,\n reportedEndTime,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n yield result.value || [];\n }\n }\n\n private async *listPagingAll(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): AsyncIterableIterator<UsageAggregation> {\n for await (const page of this.listPagingPage(\n reportedStartTime,\n reportedEndTime,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n private _list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): Promise<UsageAggregatesListResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\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 reportedStartTime: Date,\n reportedEndTime: Date,\n nextLink: string,\n options?: UsageAggregatesListNextOptionalParams\n ): Promise<UsageAggregatesListNextResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n","/*\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 { RateCard } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { UsageManagementClient } from \"../usageManagementClient\";\nimport { RateCardGetOptionalParams, RateCardGetResponse } from \"../models\";\n\n/** Class containing RateCard operations. */\nexport class RateCardImpl implements RateCard {\n private readonly client: UsageManagementClient;\n\n /**\n * Initialize a new instance of the class RateCard class.\n * @param client Reference to the service client\n */\n constructor(client: UsageManagementClient) {\n this.client = client;\n }\n\n /**\n * Enables you to query for the resource/meter metadata and related prices used in a given subscription\n * by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including\n * but not limited to service names, types, resources, units of measure, and regions, is subject to\n * change at any time and without notice. If you intend to use this billing data in an automated\n * fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing\n * meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the\n * change.\n * @param filter The filter to apply on the operation. It ONLY supports the 'eq' and 'and' logical\n * operators at this time. All the 4 query parameters 'OfferDurableId', 'Currency', 'Locale', 'Region'\n * are required to be a part of the $filter.\n * @param options The options parameters.\n */\n get(\n filter: string,\n options?: RateCardGetOptionalParams\n ): Promise<RateCardGetResponse> {\n return this.client.sendOperationRequest(\n { filter, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ResourceRateCardInfo\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { UsageAggregatesImpl, RateCardImpl } from \"./operations\";\nimport { UsageAggregates, RateCard } from \"./operationsInterfaces\";\nimport { UsageManagementClientOptionalParams } from \"./models\";\n\nexport class UsageManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the UsageManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId It uniquely identifies Microsoft Azure subscription. The subscription ID forms\n * part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: UsageManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: UsageManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-commerce/4.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n if (!options.credentialScopes) {\n options.credentialScopes = [\"https://management.azure.com/.default\"];\n }\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2015-06-01-preview\";\n this.usageAggregates = new UsageAggregatesImpl(this);\n this.rateCard = new RateCardImpl(this);\n }\n\n usageAggregates: UsageAggregates;\n rateCard: RateCard;\n}\n"],"names":["__asyncValues","__asyncDelegator","coreClient.createSerializer","Mappers.UsageAggregationListResult","Mappers.ErrorResponse","Parameters.reportedStartTime","Parameters.reportedEndTime","Parameters.showDetails","Parameters.aggregationGranularity","Parameters.continuationToken","Parameters.apiVersion","Parameters.$host","Parameters.subscriptionId","Parameters.accept","Parameters.nextLink","serializer","Mappers.ResourceRateCardInfo","Parameters.filter","coreClient.ServiceClient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src/pagingHelper.ts","../src/models/mappers.ts","../src/models/parameters.ts","../src/operations/usageAggregates.ts","../src/operations/rateCard.ts","../src/usageManagementClient.ts"],"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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const UsageAggregationListResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"UsageAggregationListResult\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"UsageAggregation\"\n }\n }\n }\n },\n nextLink: {\n serializedName: \"nextLink\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const UsageAggregation: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"UsageAggregation\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n type: {\n name: \"String\"\n }\n },\n name: {\n serializedName: \"name\",\n type: {\n name: \"String\"\n }\n },\n type: {\n serializedName: \"type\",\n type: {\n name: \"String\"\n }\n },\n subscriptionId: {\n serializedName: \"properties.subscriptionId\",\n type: {\n name: \"Uuid\"\n }\n },\n meterId: {\n serializedName: \"properties.meterId\",\n type: {\n name: \"String\"\n }\n },\n usageStartTime: {\n serializedName: \"properties.usageStartTime\",\n type: {\n name: \"DateTime\"\n }\n },\n usageEndTime: {\n serializedName: \"properties.usageEndTime\",\n type: {\n name: \"DateTime\"\n }\n },\n quantity: {\n serializedName: \"properties.quantity\",\n type: {\n name: \"Number\"\n }\n },\n unit: {\n serializedName: \"properties.unit\",\n type: {\n name: \"String\"\n }\n },\n meterName: {\n serializedName: \"properties.meterName\",\n type: {\n name: \"String\"\n }\n },\n meterCategory: {\n serializedName: \"properties.meterCategory\",\n type: {\n name: \"String\"\n }\n },\n meterSubCategory: {\n serializedName: \"properties.meterSubCategory\",\n type: {\n name: \"String\"\n }\n },\n meterRegion: {\n serializedName: \"properties.meterRegion\",\n type: {\n name: \"String\"\n }\n },\n infoFields: {\n serializedName: \"properties.infoFields\",\n type: {\n name: \"Composite\",\n className: \"InfoField\"\n }\n },\n instanceData: {\n serializedName: \"properties.instanceData\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const InfoField: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"InfoField\",\n modelProperties: {\n project: {\n serializedName: \"project\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ErrorResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"ErrorResponse\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ResourceRateCardInfo: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"ResourceRateCardInfo\",\n modelProperties: {\n currency: {\n serializedName: \"Currency\",\n type: {\n name: \"String\"\n }\n },\n locale: {\n serializedName: \"Locale\",\n type: {\n name: \"String\"\n }\n },\n isTaxIncluded: {\n serializedName: \"IsTaxIncluded\",\n type: {\n name: \"Boolean\"\n }\n },\n offerTerms: {\n serializedName: \"OfferTerms\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"OfferTermInfoAutoGenerated\"\n }\n }\n }\n },\n meters: {\n serializedName: \"Meters\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"MeterInfo\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const OfferTermInfoAutoGenerated: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OfferTermInfoAutoGenerated\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator: {\n serializedName: \"Name\",\n clientName: \"name\"\n },\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Recurring Charge\",\n \"Monetary Commitment\",\n \"Monetary Credit\"\n ]\n }\n },\n effectiveDate: {\n serializedName: \"EffectiveDate\",\n type: {\n name: \"DateTime\"\n }\n }\n }\n }\n};\n\nexport const MeterInfo: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MeterInfo\",\n modelProperties: {\n meterId: {\n serializedName: \"MeterId\",\n type: {\n name: \"Uuid\"\n }\n },\n meterName: {\n serializedName: \"MeterName\",\n type: {\n name: \"String\"\n }\n },\n meterCategory: {\n serializedName: \"MeterCategory\",\n type: {\n name: \"String\"\n }\n },\n meterSubCategory: {\n serializedName: \"MeterSubCategory\",\n type: {\n name: \"String\"\n }\n },\n unit: {\n serializedName: \"Unit\",\n type: {\n name: \"String\"\n }\n },\n meterTags: {\n serializedName: \"MeterTags\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n meterRegion: {\n serializedName: \"MeterRegion\",\n type: {\n name: \"String\"\n }\n },\n meterRates: {\n serializedName: \"MeterRates\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } }\n }\n },\n effectiveDate: {\n serializedName: \"EffectiveDate\",\n type: {\n name: \"DateTime\"\n }\n },\n includedQuantity: {\n serializedName: \"IncludedQuantity\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const RateCardQueryParameters: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RateCardQueryParameters\",\n modelProperties: {\n offerDurableId: {\n constraints: {\n Pattern: new RegExp(\"^MS-AZR-\\\\d{4}P(-\\\\d{4}P)*$\")\n },\n serializedName: \"OfferDurableId\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n currency: {\n serializedName: \"Currency\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n locale: {\n serializedName: \"Locale\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n regionInfo: {\n serializedName: \"RegionInfo\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const MonetaryCredit: coreClient.CompositeMapper = {\n serializedName: \"Monetary Credit\",\n type: {\n name: \"Composite\",\n className: \"MonetaryCredit\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator:\n OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,\n modelProperties: {\n ...OfferTermInfoAutoGenerated.type.modelProperties,\n credit: {\n serializedName: \"Credit\",\n type: {\n name: \"Number\"\n }\n },\n excludedMeterIds: {\n serializedName: \"ExcludedMeterIds\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Uuid\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const MonetaryCommitment: coreClient.CompositeMapper = {\n serializedName: \"Monetary Commitment\",\n type: {\n name: \"Composite\",\n className: \"MonetaryCommitment\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator:\n OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,\n modelProperties: {\n ...OfferTermInfoAutoGenerated.type.modelProperties,\n tieredDiscount: {\n serializedName: \"TieredDiscount\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"Number\" } }\n }\n },\n excludedMeterIds: {\n serializedName: \"ExcludedMeterIds\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Uuid\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const RecurringCharge: coreClient.CompositeMapper = {\n serializedName: \"Recurring Charge\",\n type: {\n name: \"Composite\",\n className: \"RecurringCharge\",\n uberParent: \"OfferTermInfoAutoGenerated\",\n polymorphicDiscriminator:\n OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,\n modelProperties: {\n ...OfferTermInfoAutoGenerated.type.modelProperties,\n recurringCharge: {\n serializedName: \"RecurringCharge\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport let discriminators = {\n OfferTermInfoAutoGenerated: OfferTermInfoAutoGenerated,\n \"OfferTermInfoAutoGenerated.Monetary Credit\": MonetaryCredit,\n \"OfferTermInfoAutoGenerated.Monetary Commitment\": MonetaryCommitment,\n \"OfferTermInfoAutoGenerated.Recurring Charge\": RecurringCharge\n};\n","/*\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 {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json, text/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const $host: OperationURLParameter = {\n parameterPath: \"$host\",\n mapper: {\n serializedName: \"$host\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const reportedStartTime: OperationQueryParameter = {\n parameterPath: \"reportedStartTime\",\n mapper: {\n serializedName: \"reportedStartTime\",\n required: true,\n type: {\n name: \"DateTime\"\n }\n }\n};\n\nexport const reportedEndTime: OperationQueryParameter = {\n parameterPath: \"reportedEndTime\",\n mapper: {\n serializedName: \"reportedEndTime\",\n required: true,\n type: {\n name: \"DateTime\"\n }\n }\n};\n\nexport const showDetails: OperationQueryParameter = {\n parameterPath: [\"options\", \"showDetails\"],\n mapper: {\n serializedName: \"showDetails\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const aggregationGranularity: OperationQueryParameter = {\n parameterPath: [\"options\", \"aggregationGranularity\"],\n mapper: {\n defaultValue: \"Daily\",\n serializedName: \"aggregationGranularity\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Daily\", \"Hourly\"]\n }\n }\n};\n\nexport const continuationToken: OperationQueryParameter = {\n parameterPath: [\"options\", \"continuationToken\"],\n mapper: {\n serializedName: \"continuationToken\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2015-06-01-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const subscriptionId: OperationURLParameter = {\n parameterPath: \"subscriptionId\",\n mapper: {\n serializedName: \"subscriptionId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const nextLink: OperationURLParameter = {\n parameterPath: \"nextLink\",\n mapper: {\n serializedName: \"nextLink\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const filter: OperationQueryParameter = {\n parameterPath: \"filter\",\n mapper: {\n serializedName: \"$filter\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n","/*\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\";\nimport { UsageAggregates } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { UsageManagementClient } from \"../usageManagementClient\";\nimport {\n UsageAggregation,\n UsageAggregatesListNextOptionalParams,\n UsageAggregatesListOptionalParams,\n UsageAggregatesListResponse,\n UsageAggregatesListNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing UsageAggregates operations. */\nexport class UsageAggregatesImpl implements UsageAggregates {\n private readonly client: UsageManagementClient;\n\n /**\n * Initialize a new instance of the class UsageAggregates class.\n * @param client Reference to the service client\n */\n constructor(client: UsageManagementClient) {\n this.client = client;\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n public list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): PagedAsyncIterableIterator<UsageAggregation> {\n const iter = this.listPagingAll(\n reportedStartTime,\n reportedEndTime,\n options\n );\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(\n reportedStartTime,\n reportedEndTime,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<UsageAggregation[]> {\n let result: UsageAggregatesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(reportedStartTime, reportedEndTime, 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(\n reportedStartTime,\n reportedEndTime,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): AsyncIterableIterator<UsageAggregation> {\n for await (const page of this.listPagingPage(\n reportedStartTime,\n reportedEndTime,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n private _list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): Promise<UsageAggregatesListResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\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 reportedStartTime: Date,\n reportedEndTime: Date,\n nextLink: string,\n options?: UsageAggregatesListNextOptionalParams\n ): Promise<UsageAggregatesListNextResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n","/*\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 { RateCard } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { UsageManagementClient } from \"../usageManagementClient\";\nimport { RateCardGetOptionalParams, RateCardGetResponse } from \"../models\";\n\n/** Class containing RateCard operations. */\nexport class RateCardImpl implements RateCard {\n private readonly client: UsageManagementClient;\n\n /**\n * Initialize a new instance of the class RateCard class.\n * @param client Reference to the service client\n */\n constructor(client: UsageManagementClient) {\n this.client = client;\n }\n\n /**\n * Enables you to query for the resource/meter metadata and related prices used in a given subscription\n * by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including\n * but not limited to service names, types, resources, units of measure, and regions, is subject to\n * change at any time and without notice. If you intend to use this billing data in an automated\n * fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing\n * meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the\n * change.\n * @param filter The filter to apply on the operation. It ONLY supports the 'eq' and 'and' logical\n * operators at this time. All the 4 query parameters 'OfferDurableId', 'Currency', 'Locale', 'Region'\n * are required to be a part of the $filter.\n * @param options The options parameters.\n */\n get(\n filter: string,\n options?: RateCardGetOptionalParams\n ): Promise<RateCardGetResponse> {\n return this.client.sendOperationRequest(\n { filter, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ResourceRateCardInfo\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { UsageAggregatesImpl, RateCardImpl } from \"./operations\";\nimport { UsageAggregates, RateCard } from \"./operationsInterfaces\";\nimport { UsageManagementClientOptionalParams } from \"./models\";\n\nexport class UsageManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the UsageManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId It uniquely identifies Microsoft Azure subscription. The subscription ID forms\n * part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: UsageManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: UsageManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-commerce/4.0.0-beta.3`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2015-06-01-preview\";\n this.usageAggregates = new UsageAggregatesImpl(this);\n this.rateCard = new RateCardImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n usageAggregates: UsageAggregates;\n rateCard: RateCard;\n}\n"],"names":["__await","__asyncValues","__asyncDelegator","serializer","coreClient","Mappers.UsageAggregationListResult","Mappers.ErrorResponse","Parameters.reportedStartTime","Parameters.reportedEndTime","Parameters.showDetails","Parameters.aggregationGranularity","Parameters.continuationToken","Parameters.apiVersion","Parameters.$host","Parameters.subscriptionId","Parameters.accept","Parameters.nextLink","Mappers.ResourceRateCardInfo","Parameters.filter","coreRestPipeline"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;AAMG;AACG,SAAU,oBAAoB,CAAC,IAAa,EAAA;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;AAC7C,QAAA,OAAO,SAAS,CAAC;AAClB,KAAA;IACD,OAAO,CAAA,EAAA,GAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,iBAAiB,CAAC;AAC9C,CAAC;AAEe,SAAA,oBAAoB,CAClC,IAAa,EACb,iBAAqC,EAAA;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACnE,OAAO;AACR,KAAA;IACD,MAAM,QAAQ,GAAG,CA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AC,UAAmB,EAAA;QACnD,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;AACR,SAAA;AACD,QAAA,MAAM,gBAAgB,GAAG;AACvB,YAAA,IAAI,EAAE,wBAAwB;YACxB,WAAW,CACf,OAAwB,EACxB,IAAiB,EAAA;;oBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrC,oBAAA,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AACpB,wBAAA,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;4BACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE;gCACpC,OAAO,cAAc,GAAG,UAAU,CAAC;AACpC,6BAAA;AAAM,iCAAA;AACL,gCAAA,OAAO,IAAI,CAAC;AACb,6BAAA;AACH,yBAAC,CAAC,CAAC;AACH,wBAAA,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,qBAAA;AACD,oBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;iBACtB,CAAA,CAAA;AAAA,aAAA;SACF,CAAC;AACF,QAAA,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;KAC3C;AAIF;;;;;"}
|
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var coreClient=require("@azure/core-client"),tslib=require("tslib");const UsageAggregationListResult={type:{name:"Composite",className:"UsageAggregationListResult",modelProperties:{value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"UsageAggregation"}}}},nextLink:{serializedName:"nextLink",type:{name:"String"}}}}},UsageAggregation={type:{name:"Composite",className:"UsageAggregation",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}},subscriptionId:{serializedName:"properties.subscriptionId",type:{name:"Uuid"}},meterId:{serializedName:"properties.meterId",type:{name:"String"}},usageStartTime:{serializedName:"properties.usageStartTime",type:{name:"DateTime"}},usageEndTime:{serializedName:"properties.usageEndTime",type:{name:"DateTime"}},quantity:{serializedName:"properties.quantity",type:{name:"Number"}},unit:{serializedName:"properties.unit",type:{name:"String"}},meterName:{serializedName:"properties.meterName",type:{name:"String"}},meterCategory:{serializedName:"properties.meterCategory",type:{name:"String"}},meterSubCategory:{serializedName:"properties.meterSubCategory",type:{name:"String"}},meterRegion:{serializedName:"properties.meterRegion",type:{name:"String"}},infoFields:{serializedName:"properties.infoFields",type:{name:"Composite",className:"InfoField"}},instanceData:{serializedName:"properties.instanceData",type:{name:"String"}}}}},InfoField={type:{name:"Composite",className:"InfoField",modelProperties:{project:{serializedName:"project",type:{name:"String"}}}}},ErrorResponse={type:{name:"Composite",className:"ErrorResponse",modelProperties:{code:{serializedName:"code",type:{name:"String"}},message:{serializedName:"message",type:{name:"String"}}}}},ResourceRateCardInfo={type:{name:"Composite",className:"ResourceRateCardInfo",modelProperties:{currency:{serializedName:"Currency",type:{name:"String"}},locale:{serializedName:"Locale",type:{name:"String"}},isTaxIncluded:{serializedName:"IsTaxIncluded",type:{name:"Boolean"}},offerTerms:{serializedName:"OfferTerms",type:{name:"Sequence",element:{type:{name:"Composite",className:"OfferTermInfoAutoGenerated"}}}},meters:{serializedName:"Meters",type:{name:"Sequence",element:{type:{name:"Composite",className:"MeterInfo"}}}}}}},OfferTermInfoAutoGenerated={type:{name:"Composite",className:"OfferTermInfoAutoGenerated",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:{serializedName:"Name",clientName:"name"},modelProperties:{name:{serializedName:"Name",required:!0,type:{name:"Enum",allowedValues:["Recurring Charge","Monetary Commitment","Monetary Credit"]}},effectiveDate:{serializedName:"EffectiveDate",type:{name:"DateTime"}}}}},MeterInfo={type:{name:"Composite",className:"MeterInfo",modelProperties:{meterId:{serializedName:"MeterId",type:{name:"Uuid"}},meterName:{serializedName:"MeterName",type:{name:"String"}},meterCategory:{serializedName:"MeterCategory",type:{name:"String"}},meterSubCategory:{serializedName:"MeterSubCategory",type:{name:"String"}},unit:{serializedName:"Unit",type:{name:"String"}},meterTags:{serializedName:"MeterTags",type:{name:"Sequence",element:{type:{name:"String"}}}},meterRegion:{serializedName:"MeterRegion",type:{name:"String"}},meterRates:{serializedName:"MeterRates",type:{name:"Dictionary",value:{type:{name:"Number"}}}},effectiveDate:{serializedName:"EffectiveDate",type:{name:"DateTime"}},includedQuantity:{serializedName:"IncludedQuantity",type:{name:"Number"}}}}},RateCardQueryParameters={type:{name:"Composite",className:"RateCardQueryParameters",modelProperties:{offerDurableId:{constraints:{Pattern:new RegExp("^MS-AZR-\\d{4}P(-\\d{4}P)*$")},serializedName:"OfferDurableId",required:!0,type:{name:"String"}},currency:{serializedName:"Currency",required:!0,type:{name:"String"}},locale:{serializedName:"Locale",required:!0,type:{name:"String"}},regionInfo:{serializedName:"RegionInfo",required:!0,type:{name:"String"}}}}},MonetaryCredit={serializedName:"Monetary Credit",type:{name:"Composite",className:"MonetaryCredit",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},OfferTermInfoAutoGenerated.type.modelProperties),{credit:{serializedName:"Credit",type:{name:"Number"}},excludedMeterIds:{serializedName:"ExcludedMeterIds",type:{name:"Sequence",element:{type:{name:"Uuid"}}}}})}},MonetaryCommitment={serializedName:"Monetary Commitment",type:{name:"Composite",className:"MonetaryCommitment",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},OfferTermInfoAutoGenerated.type.modelProperties),{tieredDiscount:{serializedName:"TieredDiscount",type:{name:"Dictionary",value:{type:{name:"Number"}}}},excludedMeterIds:{serializedName:"ExcludedMeterIds",type:{name:"Sequence",element:{type:{name:"Uuid"}}}}})}},RecurringCharge={serializedName:"Recurring Charge",type:{name:"Composite",className:"RecurringCharge",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},OfferTermInfoAutoGenerated.type.modelProperties),{recurringCharge:{serializedName:"RecurringCharge",type:{name:"Number"}}})}};let discriminators={OfferTermInfoAutoGenerated:OfferTermInfoAutoGenerated,"OfferTermInfoAutoGenerated.Monetary Credit":MonetaryCredit,"OfferTermInfoAutoGenerated.Monetary Commitment":MonetaryCommitment,"OfferTermInfoAutoGenerated.Recurring Charge":RecurringCharge};var Mappers=Object.freeze({__proto__:null,UsageAggregationListResult:UsageAggregationListResult,UsageAggregation:UsageAggregation,InfoField:InfoField,ErrorResponse:ErrorResponse,ResourceRateCardInfo:ResourceRateCardInfo,OfferTermInfoAutoGenerated:OfferTermInfoAutoGenerated,MeterInfo:MeterInfo,RateCardQueryParameters:RateCardQueryParameters,MonetaryCredit:MonetaryCredit,MonetaryCommitment:MonetaryCommitment,RecurringCharge:RecurringCharge,discriminators:discriminators});const accept={parameterPath:"accept",mapper:{defaultValue:"application/json, text/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},$host={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},reportedStartTime={parameterPath:"reportedStartTime",mapper:{serializedName:"reportedStartTime",required:!0,type:{name:"DateTime"}}},reportedEndTime={parameterPath:"reportedEndTime",mapper:{serializedName:"reportedEndTime",required:!0,type:{name:"DateTime"}}},showDetails={parameterPath:["options","showDetails"],mapper:{serializedName:"showDetails",type:{name:"Boolean"}}},aggregationGranularity={parameterPath:["options","aggregationGranularity"],mapper:{defaultValue:"Daily",serializedName:"aggregationGranularity",type:{name:"Enum",allowedValues:["Daily","Hourly"]}}},continuationToken={parameterPath:["options","continuationToken"],mapper:{serializedName:"continuationToken",type:{name:"String"}}},apiVersion={parameterPath:"apiVersion",mapper:{defaultValue:"2015-06-01-preview",isConstant:!0,serializedName:"api-version",type:{name:"String"}}},subscriptionId={parameterPath:"subscriptionId",mapper:{serializedName:"subscriptionId",required:!0,type:{name:"String"}}},nextLink={parameterPath:"nextLink",mapper:{serializedName:"nextLink",required:!0,type:{name:"String"}},skipEncoding:!0},filter={parameterPath:"filter",mapper:{serializedName:"$filter",required:!0,type:{name:"String"}}};class UsageAggregatesImpl{constructor(e){this.client=e}list(e,r,t){const a=this.listPagingAll(e,r,t);return{next(){return a.next()},[Symbol.asyncIterator](){return this},byPage:()=>this.listPagingPage(e,r,t)}}listPagingPage(t,a,i){return tslib.__asyncGenerator(this,arguments,function*(){var e=yield tslib.__await(this._list(t,a,i));yield yield tslib.__await(e.value||[]);let r=e.nextLink;for(;r;)e=yield tslib.__await(this._listNext(t,a,r,i)),r=e.nextLink,yield yield tslib.__await(e.value||[])})}listPagingAll(n,s,o){return tslib.__asyncGenerator(this,arguments,function*(){var r,e;try{for(var t,a=tslib.__asyncValues(this.listPagingPage(n,s,o));!(t=yield tslib.__await(a.next())).done;){var i=t.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(i)))}}catch(e){r={error:e}}finally{try{t&&!t.done&&(e=a.return)&&(yield tslib.__await(e.call(a)))}finally{if(r)throw r.error}}})}_list(e,r,t){return this.client.sendOperationRequest({reportedStartTime:e,reportedEndTime:r,options:t},listOperationSpec)}_listNext(e,r,t,a){return this.client.sendOperationRequest({reportedStartTime:e,reportedEndTime:r,nextLink:t,options:a},listNextOperationSpec)}}const serializer=coreClient.createSerializer(Mappers,!1),listOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates",httpMethod:"GET",responses:{200:{bodyMapper:UsageAggregationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[reportedStartTime,reportedEndTime,showDetails,aggregationGranularity,continuationToken,apiVersion],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer},listNextOperationSpec={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:UsageAggregationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[reportedStartTime,reportedEndTime,showDetails,aggregationGranularity,continuationToken,apiVersion],urlParameters:[$host,subscriptionId,nextLink],headerParameters:[accept],serializer:serializer};class RateCardImpl{constructor(e){this.client=e}get(e,r){return this.client.sendOperationRequest({filter:e,options:r},getOperationSpec)}}const serializer$1=coreClient.createSerializer(Mappers,!1),getOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard",httpMethod:"GET",responses:{200:{bodyMapper:ResourceRateCardInfo},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion,filter],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer$1};class UsageManagementClient extends coreClient.ServiceClient{constructor(e,r,t){if(void 0===e)throw new Error("'credentials' cannot be null");if(void 0===r)throw new Error("'subscriptionId' cannot be null");var a={requestContentType:"application/json; charset=utf-8",credential:e},e="azsdk-js-arm-commerce/4.0.0-beta.1",e=(t=t||{}).userAgentOptions&&t.userAgentOptions.userAgentPrefix?t.userAgentOptions.userAgentPrefix+" "+e:e;t.credentialScopes||(t.credentialScopes=["https://management.azure.com/.default"]),super(Object.assign(Object.assign(Object.assign({},a),t),{userAgentOptions:{userAgentPrefix:e},baseUri:t.endpoint||"https://management.azure.com"})),this.subscriptionId=r,this.$host=t.$host||"https://management.azure.com",this.apiVersion=t.apiVersion||"2015-06-01-preview",this.usageAggregates=new UsageAggregatesImpl(this),this.rateCard=new RateCardImpl(this)}}exports.UsageManagementClient=UsageManagementClient;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("tslib"),coreClient=require("@azure/core-client"),coreRestPipeline=require("@azure/core-rest-pipeline");function _interopNamespace(r){var a;return r&&r.__esModule?r:(a=Object.create(null),r&&Object.keys(r).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(r,e),Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return r[e]}}))}),a.default=r,Object.freeze(a))}var coreClient__namespace=_interopNamespace(coreClient),coreRestPipeline__namespace=_interopNamespace(coreRestPipeline);const pageMap=new WeakMap;function getContinuationToken(e){return"object"!=typeof e||null===e||null==(e=pageMap.get(e))?void 0:e.continuationToken}function setContinuationToken(e,t){var r;"object"==typeof e&&null!==e&&t&&((r=null!=(r=pageMap.get(e))?r:{}).continuationToken=t,pageMap.set(e,r))}const UsageAggregationListResult={type:{name:"Composite",className:"UsageAggregationListResult",modelProperties:{value:{serializedName:"value",type:{name:"Sequence",element:{type:{name:"Composite",className:"UsageAggregation"}}}},nextLink:{serializedName:"nextLink",type:{name:"String"}}}}},UsageAggregation={type:{name:"Composite",className:"UsageAggregation",modelProperties:{id:{serializedName:"id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},type:{serializedName:"type",type:{name:"String"}},subscriptionId:{serializedName:"properties.subscriptionId",type:{name:"Uuid"}},meterId:{serializedName:"properties.meterId",type:{name:"String"}},usageStartTime:{serializedName:"properties.usageStartTime",type:{name:"DateTime"}},usageEndTime:{serializedName:"properties.usageEndTime",type:{name:"DateTime"}},quantity:{serializedName:"properties.quantity",type:{name:"Number"}},unit:{serializedName:"properties.unit",type:{name:"String"}},meterName:{serializedName:"properties.meterName",type:{name:"String"}},meterCategory:{serializedName:"properties.meterCategory",type:{name:"String"}},meterSubCategory:{serializedName:"properties.meterSubCategory",type:{name:"String"}},meterRegion:{serializedName:"properties.meterRegion",type:{name:"String"}},infoFields:{serializedName:"properties.infoFields",type:{name:"Composite",className:"InfoField"}},instanceData:{serializedName:"properties.instanceData",type:{name:"String"}}}}},InfoField={type:{name:"Composite",className:"InfoField",modelProperties:{project:{serializedName:"project",type:{name:"String"}}}}},ErrorResponse={type:{name:"Composite",className:"ErrorResponse",modelProperties:{code:{serializedName:"code",type:{name:"String"}},message:{serializedName:"message",type:{name:"String"}}}}},ResourceRateCardInfo={type:{name:"Composite",className:"ResourceRateCardInfo",modelProperties:{currency:{serializedName:"Currency",type:{name:"String"}},locale:{serializedName:"Locale",type:{name:"String"}},isTaxIncluded:{serializedName:"IsTaxIncluded",type:{name:"Boolean"}},offerTerms:{serializedName:"OfferTerms",type:{name:"Sequence",element:{type:{name:"Composite",className:"OfferTermInfoAutoGenerated"}}}},meters:{serializedName:"Meters",type:{name:"Sequence",element:{type:{name:"Composite",className:"MeterInfo"}}}}}}},OfferTermInfoAutoGenerated={type:{name:"Composite",className:"OfferTermInfoAutoGenerated",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:{serializedName:"Name",clientName:"name"},modelProperties:{name:{serializedName:"Name",required:!0,type:{name:"Enum",allowedValues:["Recurring Charge","Monetary Commitment","Monetary Credit"]}},effectiveDate:{serializedName:"EffectiveDate",type:{name:"DateTime"}}}}},MeterInfo={type:{name:"Composite",className:"MeterInfo",modelProperties:{meterId:{serializedName:"MeterId",type:{name:"Uuid"}},meterName:{serializedName:"MeterName",type:{name:"String"}},meterCategory:{serializedName:"MeterCategory",type:{name:"String"}},meterSubCategory:{serializedName:"MeterSubCategory",type:{name:"String"}},unit:{serializedName:"Unit",type:{name:"String"}},meterTags:{serializedName:"MeterTags",type:{name:"Sequence",element:{type:{name:"String"}}}},meterRegion:{serializedName:"MeterRegion",type:{name:"String"}},meterRates:{serializedName:"MeterRates",type:{name:"Dictionary",value:{type:{name:"Number"}}}},effectiveDate:{serializedName:"EffectiveDate",type:{name:"DateTime"}},includedQuantity:{serializedName:"IncludedQuantity",type:{name:"Number"}}}}},RateCardQueryParameters={type:{name:"Composite",className:"RateCardQueryParameters",modelProperties:{offerDurableId:{constraints:{Pattern:new RegExp("^MS-AZR-\\d{4}P(-\\d{4}P)*$")},serializedName:"OfferDurableId",required:!0,type:{name:"String"}},currency:{serializedName:"Currency",required:!0,type:{name:"String"}},locale:{serializedName:"Locale",required:!0,type:{name:"String"}},regionInfo:{serializedName:"RegionInfo",required:!0,type:{name:"String"}}}}},MonetaryCredit={serializedName:"Monetary Credit",type:{name:"Composite",className:"MonetaryCredit",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},OfferTermInfoAutoGenerated.type.modelProperties),{credit:{serializedName:"Credit",type:{name:"Number"}},excludedMeterIds:{serializedName:"ExcludedMeterIds",type:{name:"Sequence",element:{type:{name:"Uuid"}}}}})}},MonetaryCommitment={serializedName:"Monetary Commitment",type:{name:"Composite",className:"MonetaryCommitment",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},OfferTermInfoAutoGenerated.type.modelProperties),{tieredDiscount:{serializedName:"TieredDiscount",type:{name:"Dictionary",value:{type:{name:"Number"}}}},excludedMeterIds:{serializedName:"ExcludedMeterIds",type:{name:"Sequence",element:{type:{name:"Uuid"}}}}})}},RecurringCharge={serializedName:"Recurring Charge",type:{name:"Composite",className:"RecurringCharge",uberParent:"OfferTermInfoAutoGenerated",polymorphicDiscriminator:OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,modelProperties:Object.assign(Object.assign({},OfferTermInfoAutoGenerated.type.modelProperties),{recurringCharge:{serializedName:"RecurringCharge",type:{name:"Number"}}})}};let discriminators={OfferTermInfoAutoGenerated:OfferTermInfoAutoGenerated,"OfferTermInfoAutoGenerated.Monetary Credit":MonetaryCredit,"OfferTermInfoAutoGenerated.Monetary Commitment":MonetaryCommitment,"OfferTermInfoAutoGenerated.Recurring Charge":RecurringCharge};var Mappers=Object.freeze({__proto__:null,UsageAggregationListResult:UsageAggregationListResult,UsageAggregation:UsageAggregation,InfoField:InfoField,ErrorResponse:ErrorResponse,ResourceRateCardInfo:ResourceRateCardInfo,OfferTermInfoAutoGenerated:OfferTermInfoAutoGenerated,MeterInfo:MeterInfo,RateCardQueryParameters:RateCardQueryParameters,MonetaryCredit:MonetaryCredit,MonetaryCommitment:MonetaryCommitment,RecurringCharge:RecurringCharge,discriminators:discriminators});const accept={parameterPath:"accept",mapper:{defaultValue:"application/json, text/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},$host={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},reportedStartTime={parameterPath:"reportedStartTime",mapper:{serializedName:"reportedStartTime",required:!0,type:{name:"DateTime"}}},reportedEndTime={parameterPath:"reportedEndTime",mapper:{serializedName:"reportedEndTime",required:!0,type:{name:"DateTime"}}},showDetails={parameterPath:["options","showDetails"],mapper:{serializedName:"showDetails",type:{name:"Boolean"}}},aggregationGranularity={parameterPath:["options","aggregationGranularity"],mapper:{defaultValue:"Daily",serializedName:"aggregationGranularity",type:{name:"Enum",allowedValues:["Daily","Hourly"]}}},continuationToken={parameterPath:["options","continuationToken"],mapper:{serializedName:"continuationToken",type:{name:"String"}}},apiVersion={parameterPath:"apiVersion",mapper:{defaultValue:"2015-06-01-preview",isConstant:!0,serializedName:"api-version",type:{name:"String"}}},subscriptionId={parameterPath:"subscriptionId",mapper:{serializedName:"subscriptionId",required:!0,type:{name:"String"}}},nextLink={parameterPath:"nextLink",mapper:{serializedName:"nextLink",required:!0,type:{name:"String"}},skipEncoding:!0},filter={parameterPath:"filter",mapper:{serializedName:"$filter",required:!0,type:{name:"String"}}};class UsageAggregatesImpl{constructor(e){this.client=e}list(t,r,a){const e=this.listPagingAll(t,r,a);return{next(){return e.next()},[Symbol.asyncIterator](){return this},byPage:e=>{if(null!=e&&e.maxPageSize)throw new Error("maxPageSize is not supported by this operation.");return this.listPagingPage(t,r,a,e)}}}listPagingPage(i,n,o,s){return tslib.__asyncGenerator(this,arguments,function*(){let e,t=null==s?void 0:s.continuationToken;var r;for(t||(setContinuationToken(r=(e=yield tslib.__await(this._list(i,n,o))).value||[],t=e.nextLink),yield yield tslib.__await(r));t;){e=yield tslib.__await(this._listNext(i,n,t,o)),t=e.nextLink;var a=e.value||[];setContinuationToken(a,t),yield yield tslib.__await(a)}})}listPagingAll(n,o,s){return tslib.__asyncGenerator(this,arguments,function*(){var t,e;try{for(var r,a=tslib.__asyncValues(this.listPagingPage(n,o,s));!(r=yield tslib.__await(a.next())).done;){var i=r.value;yield tslib.__await(yield*tslib.__asyncDelegator(tslib.__asyncValues(i)))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=a.return)&&(yield tslib.__await(e.call(a)))}finally{if(t)throw t.error}}})}_list(e,t,r){return this.client.sendOperationRequest({reportedStartTime:e,reportedEndTime:t,options:r},listOperationSpec)}_listNext(e,t,r,a){return this.client.sendOperationRequest({reportedStartTime:e,reportedEndTime:t,nextLink:r,options:a},listNextOperationSpec)}}const serializer$1=coreClient__namespace.createSerializer(Mappers,!1),listOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates",httpMethod:"GET",responses:{200:{bodyMapper:UsageAggregationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[reportedStartTime,reportedEndTime,showDetails,aggregationGranularity,continuationToken,apiVersion],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer$1},listNextOperationSpec={path:"{nextLink}",httpMethod:"GET",responses:{200:{bodyMapper:UsageAggregationListResult},default:{bodyMapper:ErrorResponse}},queryParameters:[reportedStartTime,reportedEndTime,showDetails,aggregationGranularity,continuationToken,apiVersion],urlParameters:[$host,subscriptionId,nextLink],headerParameters:[accept],serializer:serializer$1};class RateCardImpl{constructor(e){this.client=e}get(e,t){return this.client.sendOperationRequest({filter:e,options:t},getOperationSpec)}}const serializer=coreClient__namespace.createSerializer(Mappers,!1),getOperationSpec={path:"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/RateCard",httpMethod:"GET",responses:{200:{bodyMapper:ResourceRateCardInfo},default:{bodyMapper:ErrorResponse}},queryParameters:[apiVersion,filter],urlParameters:[$host,subscriptionId],headerParameters:[accept],serializer:serializer};class UsageManagementClient extends coreClient__namespace.ServiceClient{constructor(e,t,r){if(void 0===e)throw new Error("'credentials' cannot be null");if(void 0===t)throw new Error("'subscriptionId' cannot be null");var a,i="azsdk-js-arm-commerce/4.0.0-beta.3",i=(r=r||{}).userAgentOptions&&r.userAgentOptions.userAgentPrefix?r.userAgentOptions.userAgentPrefix+" "+i:i,i=Object.assign(Object.assign(Object.assign({},{requestContentType:"application/json; charset=utf-8",credential:e}),r),{userAgentOptions:{userAgentPrefix:i},endpoint:null!=(i=null!=(i=r.endpoint)?i:r.baseUri)?i:"https://management.azure.com"});super(i);let n=!1;null!=r&&r.pipeline&&0<r.pipeline.getOrderedPolicies().length&&(a=r.pipeline.getOrderedPolicies(),n=a.some(e=>e.name===coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName)),r&&r.pipeline&&0!=r.pipeline.getOrderedPolicies().length&&n||(this.pipeline.removePolicy({name:coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName}),this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({credential:e,scopes:null!=(a=i.credentialScopes)?a:i.endpoint+"/.default",challengeCallbacks:{authorizeRequestOnChallenge:coreClient__namespace.authorizeRequestOnClaimChallenge}}))),this.subscriptionId=t,this.$host=r.$host||"https://management.azure.com",this.apiVersion=r.apiVersion||"2015-06-01-preview",this.usageAggregates=new UsageAggregatesImpl(this),this.rateCard=new RateCardImpl(this),this.addCustomApiVersionPolicy(r.apiVersion)}addCustomApiVersionPolicy(i){i&&this.pipeline.addPolicy({name:"CustomApiVersionPolicy",sendRequest(r,a){return tslib.__awaiter(this,void 0,void 0,function*(){var e,t=r.url.split("?");return 1<t.length&&(e=t[1].split("&").map(e=>-1<e.indexOf("api-version")?"api-version="+i:e),r.url=t[0]+"?"+e.join("&")),a(r)})}})}}exports.UsageManagementClient=UsageManagementClient,exports.getContinuationToken=getContinuationToken;
|