@azure/arm-commerce 4.0.0-alpha.20250718.1 → 4.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.
- package/dist/browser/models/mappers.js +19 -8
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/rateCard.js +1 -0
- package/dist/browser/operations/rateCard.js.map +1 -1
- package/dist/browser/operations/usageAggregates.js +23 -40
- package/dist/browser/operations/usageAggregates.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/browser/usageManagementClient.js +15 -5
- package/dist/browser/usageManagementClient.js.map +1 -1
- package/dist/commonjs/models/mappers.js +19 -8
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/rateCard.js +1 -0
- package/dist/commonjs/operations/rateCard.js.map +1 -1
- package/dist/commonjs/operations/usageAggregates.js +23 -39
- package/dist/commonjs/operations/usageAggregates.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/usageManagementClient.js +15 -5
- package/dist/commonjs/usageManagementClient.js.map +1 -1
- package/dist/esm/models/mappers.js +19 -8
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/rateCard.js +1 -0
- package/dist/esm/operations/rateCard.js.map +1 -1
- package/dist/esm/operations/usageAggregates.js +23 -40
- package/dist/esm/operations/usageAggregates.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/esm/usageManagementClient.js +15 -5
- package/dist/esm/usageManagementClient.js.map +1 -1
- package/dist/react-native/models/mappers.js +19 -8
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/rateCard.js +1 -0
- package/dist/react-native/operations/rateCard.js.map +1 -1
- package/dist/react-native/operations/usageAggregates.js +23 -40
- package/dist/react-native/operations/usageAggregates.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/dist/react-native/usageManagementClient.js +15 -5
- package/dist/react-native/usageManagementClient.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-commerce-node.api.md +181 -181
|
@@ -365,12 +365,15 @@ export const MonetaryCredit = {
|
|
|
365
365
|
className: "MonetaryCredit",
|
|
366
366
|
uberParent: "OfferTermInfoAutoGenerated",
|
|
367
367
|
polymorphicDiscriminator: OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,
|
|
368
|
-
modelProperties:
|
|
368
|
+
modelProperties: {
|
|
369
|
+
...OfferTermInfoAutoGenerated.type.modelProperties,
|
|
370
|
+
credit: {
|
|
369
371
|
serializedName: "Credit",
|
|
370
372
|
type: {
|
|
371
373
|
name: "Number"
|
|
372
374
|
}
|
|
373
|
-
},
|
|
375
|
+
},
|
|
376
|
+
excludedMeterIds: {
|
|
374
377
|
serializedName: "ExcludedMeterIds",
|
|
375
378
|
type: {
|
|
376
379
|
name: "Sequence",
|
|
@@ -380,7 +383,8 @@ export const MonetaryCredit = {
|
|
|
380
383
|
}
|
|
381
384
|
}
|
|
382
385
|
}
|
|
383
|
-
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
384
388
|
}
|
|
385
389
|
};
|
|
386
390
|
export const MonetaryCommitment = {
|
|
@@ -390,13 +394,16 @@ export const MonetaryCommitment = {
|
|
|
390
394
|
className: "MonetaryCommitment",
|
|
391
395
|
uberParent: "OfferTermInfoAutoGenerated",
|
|
392
396
|
polymorphicDiscriminator: OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,
|
|
393
|
-
modelProperties:
|
|
397
|
+
modelProperties: {
|
|
398
|
+
...OfferTermInfoAutoGenerated.type.modelProperties,
|
|
399
|
+
tieredDiscount: {
|
|
394
400
|
serializedName: "TieredDiscount",
|
|
395
401
|
type: {
|
|
396
402
|
name: "Dictionary",
|
|
397
403
|
value: { type: { name: "Number" } }
|
|
398
404
|
}
|
|
399
|
-
},
|
|
405
|
+
},
|
|
406
|
+
excludedMeterIds: {
|
|
400
407
|
serializedName: "ExcludedMeterIds",
|
|
401
408
|
type: {
|
|
402
409
|
name: "Sequence",
|
|
@@ -406,7 +413,8 @@ export const MonetaryCommitment = {
|
|
|
406
413
|
}
|
|
407
414
|
}
|
|
408
415
|
}
|
|
409
|
-
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
410
418
|
}
|
|
411
419
|
};
|
|
412
420
|
export const RecurringCharge = {
|
|
@@ -416,12 +424,15 @@ export const RecurringCharge = {
|
|
|
416
424
|
className: "RecurringCharge",
|
|
417
425
|
uberParent: "OfferTermInfoAutoGenerated",
|
|
418
426
|
polymorphicDiscriminator: OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,
|
|
419
|
-
modelProperties:
|
|
427
|
+
modelProperties: {
|
|
428
|
+
...OfferTermInfoAutoGenerated.type.modelProperties,
|
|
429
|
+
recurringCharge: {
|
|
420
430
|
serializedName: "RecurringCharge",
|
|
421
431
|
type: {
|
|
422
432
|
name: "Number"
|
|
423
433
|
}
|
|
424
|
-
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
425
436
|
}
|
|
426
437
|
};
|
|
427
438
|
export let discriminators = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,0BAA0B,GAA+B;IACpE,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,4BAA4B;QACvC,eAAe,EAAE;YACf,KAAK,EAAE;gBACL,cAAc,EAAE,OAAO;gBACvB,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE;wBACP,IAAI,EAAE;4BACJ,IAAI,EAAE,WAAW;4BACjB,SAAS,EAAE,kBAAkB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AAEF,MAAM,CAAC,IAAI,cAAc,GAAG;IAC1B,0BAA0B,EAAE,0BAA0B;IACtD,4CAA4C,EAAE,cAAc;IAC5D,gDAAgD,EAAE,kBAAkB;IACpE,6CAA6C,EAAE,eAAe;CAC/D,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\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"]}
|
|
1
|
+
{"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,0BAA0B,GAA+B;IACpE,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,4BAA4B;QACvC,eAAe,EAAE;YACf,KAAK,EAAE;gBACL,cAAc,EAAE,OAAO;gBACvB,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE;wBACP,IAAI,EAAE;4BACJ,IAAI,EAAE,WAAW;4BACjB,SAAS,EAAE,kBAAkB;yBAC9B;qBACF;iBACF;aACF;YACD,QAAQ,EAAE;gBACR,cAAc,EAAE,UAAU;gBAC1B,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA+B;IAC1D,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,kBAAkB;QAC7B,eAAe,EAAE;YACf,EAAE,EAAE;gBACF,cAAc,EAAE,IAAI;gBACpB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,cAAc,EAAE;gBACd,cAAc,EAAE,2BAA2B;gBAC3C,IAAI,EAAE;oBACJ,IAAI,EAAE,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E;iBACpC;aACF;YACD,gBAAgB,EAAE;gBAChB,cAAc,EAAE,kBAAkB;gBAClC,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE;wBACP,IAAI,EAAE;4BACJ,IAAI,EAAE,MAAM;yBACb;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAA+B;IACzD,cAAc,EAAE,kBAAkB;IAClC,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,iBAAiB;QAC5B,UAAU,EAAE,4BAA4B;QACxC,wBAAwB,EACtB,0BAA0B,CAAC,IAAI,CAAC,wBAAwB;QAC1D,eAAe,EAAE;YACf,GAAG,0BAA0B,CAAC,IAAI,CAAC,eAAe;YAClD,eAAe,EAAE;gBACf,cAAc,EAAE,iBAAiB;gBACjC,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,IAAI,cAAc,GAAG;IAC1B,0BAA0B,EAAE,0BAA0B;IACtD,4CAA4C,EAAE,cAAc;IAC5D,gDAAgD,EAAE,kBAAkB;IACpE,6CAA6C,EAAE,eAAe;CAC/D,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\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"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing RateCard operations. */
|
|
12
12
|
export class RateCardImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class RateCard class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rateCard.js","sourceRoot":"","sources":["../../../src/operations/rateCard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"rateCard.js","sourceRoot":"","sources":["../../../src/operations/rateCard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IACN,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,GAAG,CACD,MAAc,EACd,OAAmC;QAEnC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,MAAM,EAAE,OAAO,EAAE,EACnB,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,uEAAuE;IAC7E,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,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 { RateCard } 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 { UsageManagementClient } from \"../usageManagementClient.js\";\nimport { RateCardGetOptionalParams, RateCardGetResponse } from \"../models/index.js\";\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"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing UsageAggregates operations. */
|
|
15
14
|
export class UsageAggregatesImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class UsageAggregates class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -36,52 +36,35 @@ export class UsageAggregatesImpl {
|
|
|
36
36
|
return this;
|
|
37
37
|
},
|
|
38
38
|
byPage: (settings) => {
|
|
39
|
-
if (settings
|
|
39
|
+
if (settings?.maxPageSize) {
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listPagingPage(reportedStartTime, reportedEndTime, options, settings);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listPagingPage(reportedStartTime, reportedEndTime, options, settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
});
|
|
46
|
+
async *listPagingPage(reportedStartTime, reportedEndTime, options, settings) {
|
|
47
|
+
let result;
|
|
48
|
+
let continuationToken = settings?.continuationToken;
|
|
49
|
+
if (!continuationToken) {
|
|
50
|
+
result = await this._list(reportedStartTime, reportedEndTime, options);
|
|
51
|
+
let page = result.value || [];
|
|
52
|
+
continuationToken = result.nextLink;
|
|
53
|
+
setContinuationToken(page, continuationToken);
|
|
54
|
+
yield page;
|
|
55
|
+
}
|
|
56
|
+
while (continuationToken) {
|
|
57
|
+
result = await this._listNext(reportedStartTime, reportedEndTime, continuationToken, options);
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
setContinuationToken(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
65
63
|
}
|
|
66
|
-
listPagingAll(reportedStartTime, reportedEndTime, options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(reportedStartTime, reportedEndTime, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
71
|
-
_c = _f.value;
|
|
72
|
-
_d = false;
|
|
73
|
-
const page = _c;
|
|
74
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
78
|
-
finally {
|
|
79
|
-
try {
|
|
80
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
81
|
-
}
|
|
82
|
-
finally { if (e_1) throw e_1.error; }
|
|
83
|
-
}
|
|
84
|
-
});
|
|
64
|
+
async *listPagingAll(reportedStartTime, reportedEndTime, options) {
|
|
65
|
+
for await (const page of this.listPagingPage(reportedStartTime, reportedEndTime, options)) {
|
|
66
|
+
yield* page;
|
|
67
|
+
}
|
|
85
68
|
}
|
|
86
69
|
/**
|
|
87
70
|
* Query aggregated Azure subscription consumption data for a date range.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usageAggregates.js","sourceRoot":"","sources":["../../../src/operations/usageAggregates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"usageAggregates.js","sourceRoot":"","sources":["../../../src/operations/usageAggregates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IACb,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAuB,EACvB,eAAqB,EACrB,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAC7B,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CACxB,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,iBAAuB,EACvB,eAAqB,EACrB,OAA2C,EAC3C,QAAuB;QAEvB,IAAI,MAAmC,CAAC;QACxC,IAAI,iBAAiB,GAAG,QAA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UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { UsageAggregates } 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 { UsageManagementClient } from \"../usageManagementClient.js\";\nimport {\n UsageAggregation,\n UsageAggregatesListNextOptionalParams,\n UsageAggregatesListOptionalParams,\n UsageAggregatesListResponse,\n UsageAggregatesListNextResponse\n} from \"../models/index.js\";\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"]}
|
|
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
|
|
|
14
14
|
* @returns The continuation token that can be passed into byPage().
|
|
15
15
|
*/
|
|
16
16
|
export function getContinuationToken(page) {
|
|
17
|
-
var _a;
|
|
18
17
|
if (typeof page !== "object" || page === null) {
|
|
19
18
|
return undefined;
|
|
20
19
|
}
|
|
21
|
-
return
|
|
20
|
+
return pageMap.get(page)?.continuationToken;
|
|
22
21
|
}
|
|
23
22
|
export function setContinuationToken(page, continuationToken) {
|
|
24
|
-
var _a;
|
|
25
23
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
24
|
return;
|
|
27
25
|
}
|
|
28
|
-
const pageInfo =
|
|
26
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
29
27
|
pageInfo.continuationToken = continuationToken;
|
|
30
28
|
pageMap.set(page, pageInfo);
|
|
31
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\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"]}
|
|
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { UsageAggregatesImpl, RateCardImpl } from "./operations/index.js";
|
|
11
11
|
export class UsageManagementClient extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
14
|
+
subscriptionId;
|
|
12
15
|
/**
|
|
13
16
|
* Initializes a new instance of the UsageManagementClient class.
|
|
14
17
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -17,7 +20,6 @@ export class UsageManagementClient extends coreClient.ServiceClient {
|
|
|
17
20
|
* @param options The parameter options
|
|
18
21
|
*/
|
|
19
22
|
constructor(credentials, subscriptionId, options) {
|
|
20
|
-
var _a, _b, _c;
|
|
21
23
|
if (credentials === undefined) {
|
|
22
24
|
throw new Error("'credentials' cannot be null");
|
|
23
25
|
}
|
|
@@ -36,12 +38,17 @@ export class UsageManagementClient extends coreClient.ServiceClient {
|
|
|
36
38
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
37
39
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
38
40
|
: `${packageDetails}`;
|
|
39
|
-
const optionsWithDefaults =
|
|
41
|
+
const optionsWithDefaults = {
|
|
42
|
+
...defaults,
|
|
43
|
+
...options,
|
|
44
|
+
userAgentOptions: {
|
|
40
45
|
userAgentPrefix
|
|
41
|
-
},
|
|
46
|
+
},
|
|
47
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
48
|
+
};
|
|
42
49
|
super(optionsWithDefaults);
|
|
43
50
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
44
|
-
if (
|
|
51
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
45
52
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
46
53
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
47
54
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -55,7 +62,8 @@ export class UsageManagementClient extends coreClient.ServiceClient {
|
|
|
55
62
|
});
|
|
56
63
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
57
64
|
credential: credentials,
|
|
58
|
-
scopes:
|
|
65
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
66
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
59
67
|
challengeCallbacks: {
|
|
60
68
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
61
69
|
}
|
|
@@ -95,5 +103,7 @@ export class UsageManagementClient extends coreClient.ServiceClient {
|
|
|
95
103
|
};
|
|
96
104
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
97
105
|
}
|
|
106
|
+
usageAggregates;
|
|
107
|
+
rateCard;
|
|
98
108
|
}
|
|
99
109
|
//# sourceMappingURL=usageManagementClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usageManagementClient.js","sourceRoot":"","sources":["../../src/usageManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CA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,CAAkB;IACjC,QAAQ,CAAW;CACpB","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { UsageAggregatesImpl, RateCardImpl } from \"./operations/index.js\";\nimport { UsageAggregates, RateCard } from \"./operationsInterfaces/index.js\";\nimport { UsageManagementClientOptionalParams } from \"./models/index.js\";\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.4`;\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"]}
|
|
@@ -368,12 +368,15 @@ exports.MonetaryCredit = {
|
|
|
368
368
|
className: "MonetaryCredit",
|
|
369
369
|
uberParent: "OfferTermInfoAutoGenerated",
|
|
370
370
|
polymorphicDiscriminator: exports.OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,
|
|
371
|
-
modelProperties:
|
|
371
|
+
modelProperties: {
|
|
372
|
+
...exports.OfferTermInfoAutoGenerated.type.modelProperties,
|
|
373
|
+
credit: {
|
|
372
374
|
serializedName: "Credit",
|
|
373
375
|
type: {
|
|
374
376
|
name: "Number"
|
|
375
377
|
}
|
|
376
|
-
},
|
|
378
|
+
},
|
|
379
|
+
excludedMeterIds: {
|
|
377
380
|
serializedName: "ExcludedMeterIds",
|
|
378
381
|
type: {
|
|
379
382
|
name: "Sequence",
|
|
@@ -383,7 +386,8 @@ exports.MonetaryCredit = {
|
|
|
383
386
|
}
|
|
384
387
|
}
|
|
385
388
|
}
|
|
386
|
-
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
387
391
|
}
|
|
388
392
|
};
|
|
389
393
|
exports.MonetaryCommitment = {
|
|
@@ -393,13 +397,16 @@ exports.MonetaryCommitment = {
|
|
|
393
397
|
className: "MonetaryCommitment",
|
|
394
398
|
uberParent: "OfferTermInfoAutoGenerated",
|
|
395
399
|
polymorphicDiscriminator: exports.OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,
|
|
396
|
-
modelProperties:
|
|
400
|
+
modelProperties: {
|
|
401
|
+
...exports.OfferTermInfoAutoGenerated.type.modelProperties,
|
|
402
|
+
tieredDiscount: {
|
|
397
403
|
serializedName: "TieredDiscount",
|
|
398
404
|
type: {
|
|
399
405
|
name: "Dictionary",
|
|
400
406
|
value: { type: { name: "Number" } }
|
|
401
407
|
}
|
|
402
|
-
},
|
|
408
|
+
},
|
|
409
|
+
excludedMeterIds: {
|
|
403
410
|
serializedName: "ExcludedMeterIds",
|
|
404
411
|
type: {
|
|
405
412
|
name: "Sequence",
|
|
@@ -409,7 +416,8 @@ exports.MonetaryCommitment = {
|
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
418
|
}
|
|
412
|
-
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
413
421
|
}
|
|
414
422
|
};
|
|
415
423
|
exports.RecurringCharge = {
|
|
@@ -419,12 +427,15 @@ exports.RecurringCharge = {
|
|
|
419
427
|
className: "RecurringCharge",
|
|
420
428
|
uberParent: "OfferTermInfoAutoGenerated",
|
|
421
429
|
polymorphicDiscriminator: exports.OfferTermInfoAutoGenerated.type.polymorphicDiscriminator,
|
|
422
|
-
modelProperties:
|
|
430
|
+
modelProperties: {
|
|
431
|
+
...exports.OfferTermInfoAutoGenerated.type.modelProperties,
|
|
432
|
+
recurringCharge: {
|
|
423
433
|
serializedName: "RecurringCharge",
|
|
424
434
|
type: {
|
|
425
435
|
name: "Number"
|
|
426
436
|
}
|
|
427
|
-
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
428
439
|
}
|
|
429
440
|
};
|
|
430
441
|
exports.discriminators = {
|