-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR consumption/resource-manager] Adding new properties to Consum…
…ption Usage Details (#2877) * Generated from 4394e3bd84d0e9012dd1acac36ce2a82fd02edd6 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs * Generated from 8d551a2fd9eb30b4c6b9f38b30924f06fed0b02c Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs * Generated from bac7ebe031f40801bd2aca9a368dd9eeaeaa7509 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs * Generated from 891beecde5b53a8b2fc5a700670df861cc80b1f0 Modified the Operation Id to follow the best practices. * Generated from b9b62fdf3ee427a1f2c1b71293cc422eedbdbd63 Fixed model namings for - ReservationSummaries (now: ReservationSummary), ReservationDetails (now: ReservationDetail) and ReservationRecommendations (now: ReservationRecommendation) * Generated from 5d36df6e4f6b3ddde06f975bfa42fa095a5ad29e Fixed the naming for model CostTags. * Generated from c5a8c67ddd9601adc30c1a968a85629fbe79ccdf Fixing the SDKViolation error on - model Tags. * Generated from b28e418996a4b847984d198b4c0ccbd003466d0a Changed the CostTagResult to CostTag as per review comments. Also changed operations - Marketplaces_ListByEnrollmentAccount and Marketplaces_ListForBillingPeriodByEnrollmentAccount.
- Loading branch information
1 parent
112756d
commit 91f516d
Showing
55 changed files
with
3,074 additions
and
1,442 deletions.
There are no files selected for viewing
288 changes: 44 additions & 244 deletions
288
azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .resource import Resource | ||
|
||
|
||
class Balance(Resource): | ||
"""A balance resource. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
:ivar id: Resource Id. | ||
:vartype id: str | ||
:ivar name: Resource name. | ||
:vartype name: str | ||
:ivar type: Resource type. | ||
:vartype type: str | ||
:ivar tags: Resource tags. | ||
:vartype tags: dict[str, str] | ||
:ivar currency: The ISO currency in which the meter is charged, for | ||
example, USD. | ||
:vartype currency: str | ||
:ivar beginning_balance: The beginning balance for the billing period. | ||
:vartype beginning_balance: decimal.Decimal | ||
:ivar ending_balance: The ending balance for the billing period (for open | ||
periods this will be updated daily). | ||
:vartype ending_balance: decimal.Decimal | ||
:ivar new_purchases: Total new purchase amount. | ||
:vartype new_purchases: decimal.Decimal | ||
:ivar adjustments: Total adjustment amount. | ||
:vartype adjustments: decimal.Decimal | ||
:ivar utilized: Total Commitment usage. | ||
:vartype utilized: decimal.Decimal | ||
:ivar service_overage: Overage for Azure services. | ||
:vartype service_overage: decimal.Decimal | ||
:ivar charges_billed_separately: Charges Billed separately. | ||
:vartype charges_billed_separately: decimal.Decimal | ||
:ivar total_overage: serviceOverage + chargesBilledSeparately. | ||
:vartype total_overage: decimal.Decimal | ||
:ivar total_usage: Azure service commitment + total Overage. | ||
:vartype total_usage: decimal.Decimal | ||
:ivar azure_marketplace_service_charges: Total charges for Azure | ||
Marketplace. | ||
:vartype azure_marketplace_service_charges: decimal.Decimal | ||
:param billing_frequency: The billing frequency. Possible values include: | ||
'Month', 'Quarter', 'Year' | ||
:type billing_frequency: str or | ||
~azure.mgmt.consumption.models.BillingFrequency | ||
:ivar price_hidden: Price is hidden or not. | ||
:vartype price_hidden: bool | ||
:ivar new_purchases_details: List of new purchases. | ||
:vartype new_purchases_details: | ||
list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] | ||
:ivar adjustment_details: List of Adjustments (Promo credit, SIE credit | ||
etc.). | ||
:vartype adjustment_details: | ||
list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'tags': {'readonly': True}, | ||
'currency': {'readonly': True}, | ||
'beginning_balance': {'readonly': True}, | ||
'ending_balance': {'readonly': True}, | ||
'new_purchases': {'readonly': True}, | ||
'adjustments': {'readonly': True}, | ||
'utilized': {'readonly': True}, | ||
'service_overage': {'readonly': True}, | ||
'charges_billed_separately': {'readonly': True}, | ||
'total_overage': {'readonly': True}, | ||
'total_usage': {'readonly': True}, | ||
'azure_marketplace_service_charges': {'readonly': True}, | ||
'price_hidden': {'readonly': True}, | ||
'new_purchases_details': {'readonly': True}, | ||
'adjustment_details': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'tags': {'key': 'tags', 'type': '{str}'}, | ||
'currency': {'key': 'properties.currency', 'type': 'str'}, | ||
'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, | ||
'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, | ||
'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, | ||
'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, | ||
'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, | ||
'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, | ||
'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, | ||
'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, | ||
'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, | ||
'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, | ||
'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, | ||
'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, | ||
'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, | ||
'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, | ||
} | ||
|
||
def __init__(self, billing_frequency=None): | ||
super(Balance, self).__init__() | ||
self.currency = None | ||
self.beginning_balance = None | ||
self.ending_balance = None | ||
self.new_purchases = None | ||
self.adjustments = None | ||
self.utilized = None | ||
self.service_overage = None | ||
self.charges_billed_separately = None | ||
self.total_overage = None | ||
self.total_usage = None | ||
self.azure_marketplace_service_charges = None | ||
self.billing_frequency = billing_frequency | ||
self.price_hidden = None | ||
self.new_purchases_details = None | ||
self.adjustment_details = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.